Project Zomboid

Project Zomboid

Dan Feb 14, 2023 @ 11:48am
Any mod remove sink/bathtub water after shutoff?
It feels to me that having 100 units of water in every bathtub after the water shuts off rather undermines the need to set up your own water collection system... if you're playing typical urban-scavenger-style rather than farming in the wilderness, there's free water absolutely everywhere!

I can't seem to find any mods that disable sinks/bathtubs retaining leftover water. Can anyone point me to one?
< >
Showing 1-12 of 12 comments
Kaldrak Feb 14, 2023 @ 11:52am 
Doesn't disable it, but makes you need to make it drinkable again:

https://steamcommunity.com/sharedfiles/filedetails/?id=2849467715
Kaldrak Feb 14, 2023 @ 12:24pm 
Originally posted by Cat Supremacist SM:
Originally posted by Kaldrak:
Doesn't disable it, but makes you need to make it drinkable again:

https://steamcommunity.com/sharedfiles/filedetails/?id=2849467715
This mod also has a setting for the water draining, so you can set it to drain after water shutoff with a few different options such as chance to drain and how much it drains by per tick. With proper settings you can have all of the the water drain as soon as water turns off.

Oh? Neat. I didn't really look closely at the settings. Used it for a cryogenic winter playthrough I did, but didn't change anything from the default.
Dan Feb 14, 2023 @ 12:55pm 
Cheers, I'd seen that mod, but didn't realise is had settings for draining. That sounds ideal.
(I might do a personal mod-of-the-mod to strip out the other stuff and just have it auto-drain everything by default... I like to keep my mod use light and simple :-P)
Atréju Feb 14, 2023 @ 1:25pm 
Might sound foolish but just don't use sinks after shutoff?
Jarzzen Feb 14, 2023 @ 3:53pm 
To me the fact tubs have 100 units and sinks have 20 is odd. If the water is just what is left in the pipes of your house it should be X units across all usages within range.
Ittrix Feb 14, 2023 @ 4:00pm 
Originally posted by Jarzzen:
To me the fact tubs have 100 units and sinks have 20 is odd. If the water is just what is left in the pipes of your house it should be X units across all usages within range.
It's effectively a programming problem. As far as I can tell they don't have a way of measuring what is under the same 'roof' so to speak. Same reason player built houses struggle with that sort of thing.
Kasper (Banned) Feb 14, 2023 @ 4:12pm 
If anything the toilet should have the most water, because both the bowl and the upper tank are already full of water, regardless of what might be left in the pipes.
Jarzzen Feb 14, 2023 @ 4:21pm 
Originally posted by Kasera:
If anything the toilet should have the most water, because both the bowl and the upper tank are already full of water, regardless of what might be left in the pipes.
I will not be consuming water from the bowl portion...
Dan Feb 14, 2023 @ 4:45pm 
Originally posted by Jarzzen:
I will not be consuming water from the bowl portion...
You say that now, but what about when the realities of post-apocalyptic life set in?
Jarzzen Feb 14, 2023 @ 4:53pm 
Originally posted by Grimdanfango:
Originally posted by Jarzzen:
I will not be consuming water from the bowl portion...
You say that now, but what about when the realities of post-apocalyptic life set in?
I learned how to get maple syrup from a tree, so I'll figure something out.
Dan Feb 15, 2023 @ 12:42am 
Right, so after cannibalising the Water Goes Bad mod, and doing a bunch of my own tweaking and testing, I condensed it down to this:
local function emptyWaterFromSinksAndBaths(square) local objectList = square:getObjects() for i = 0, objectList:size() - 1 do local object = objectList:get(i) if object:hasWater() and object:getProperties():Is(IsoFlagType.waterPiped) and not object:getUsesExternalWaterSource() then object:setWaterAmount(0) object:getModData()["waterMax"] = 0 end end end Events.LoadGridsquare.Add(emptyWaterFromSinksAndBaths)
Slap that in a .lua file inside a basic mod, and it'll auto-override every sink and bathtub to have zero capacity as its tile becomes active. Before the cutoff, that won't matter, as it'll still have an unlimited supply attached, but as soon as it's cut, the basins are left empty.

You can still plumb a roof-located rain-catcher into an existing sink/bathtub to give it a supply again it seems.

Do note - in one debug-session, I started a standard game where I assume the water cutoff randomly picked "0" out of the "0-30 days" range... which threw me a little, as it looked like my mod had cut the supply instantly... but every other game I started it seemed to work fine before and after the cutoff.

(I only have the game on GOG, so if anyone feels inclined to test it out themselves and slap it on the Workshop, feel free!)
Last edited by Dan; Feb 15, 2023 @ 12:48am
Dan Feb 15, 2023 @ 10:48am 
Originally posted by Cat Supremacist SM:
The amount of times I've had the water or power shut off in the first minutes is crazy, it feels more common then it should be lmao. Pretty cool edit though, would likely need author permission to make a public mod of it though, since it's their code initially.
I suppose the chance is about 1-in-30 by default :-P (I think this test was the first time it's actually happened to me)

As with all demonstrably-high-quality RNG, it's entirely possible for lightning to strike twice in a row, or even three times... it's the nature of randomness to not necessarily be evenly distributed.

Not sure how much this would fall under "permission required" - it's boiled down to a tiny snippet that zeroes out a couple of numbers using a unique function. It's more an "inspired by" at this point, but I suppose it wouldn't hurt to ask permission if anyone wanted to put it out publicly.
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Feb 14, 2023 @ 11:48am
Posts: 12