Project Zomboid

Project Zomboid

Smart Hutch
18 Comments
ribs  [author] 7 Sep @ 8:26pm 
@CiTaLk ty :3

@ppernsteingolem
These are valid ideas, but the mod is meant to compensate for the vanilla hutch nerf. Requiring power for functioning would only exacerbate the nerf. I didn't quite understand the part about the silo and the water.
ppernsteingolem 7 Sep @ 2:24pm 
Sollte ein aktives Stromnetz benötigen. Dafür aber könnte man einen Wasser und Futtersilo anschließen,der regelmäßig Futter spendet. Ist das eine Idee? :steamhappy:
CiTaLk 6 Sep @ 4:03am 
Legendary mod
ribs  [author] 2 Sep @ 6:20pm 
@PeterHammerman Agree. Dirt buildup like this does not make sense.

@NovusNox The triggers use animal zones. If an animal zone includes a hutch it will work.
NovusNox 2 Sep @ 6:16pm 
can this be added to ongoing save?
PeterHammerman 2 Sep @ 2:11am 
passive clean - savior! :) Those hutches with dirt rate is nightmare in vanila.
ribs  [author] 30 Aug @ 2:12pm 
Thank you @TEMPEST :3
TEMPEST 30 Aug @ 9:14am 
Thank you so much! <take my points> awarded!
ribs  [author] 30 Aug @ 12:22am 
Added Timed Door: Opens and closes the hutch automatically at configurable hours.
ribs  [author] 29 Aug @ 5:03pm 
@BadMotherGamer Thank you! And a big shoutout to @ivmakk for the suggestions, they really made this mod shine brighter.
BadMotherGamer 29 Aug @ 4:54pm 
fantastic mod. I've been waiting for something like this. thank you!
ribs  [author] 28 Aug @ 8:58pm 
@ivmakk I added a Passive Clean option for what you mentioned.

I couldn’t add a full delta system because the mod is designed to stay stateless. Each cycle just scans all the hutches and runs the calculations without storing anything extra.

Passive Clean runs on in-game minute intervals and slows down dirt buildup using a multiplier. For example, if the dirtiness is 50 and the multiplier is 0.5, it will subtract 25 from the current dirtiness. This should give you the control you were looking for.
ivmakk 28 Aug @ 7:01am 
@ribs Lots of useful features added - great job!

I was thinking that a similar interval-based approach could also be applied to achieve a custom dirtiness speed by using a multiplier. Basically, on each interval you calculate the delta between the current and previous tick, then reduce it by the multiplier. For example: if the multiplier is 0.25, checked once per minute, and dirtiness increased from 20 → 28 by vanilla, the delta = 8, but you’d rewrite it to 22 (reduced by 75%).

This could be a balanced way to let players adjust vanilla dirtiness speed to their own preference. I don’t think 20 chickens should realistically require a hutch cleanup every single day to avoid sickness - that feels like a big gameplay imbalance.

That said, with all the current thresholds and options, a similar effect can already be achieved. Thanks again for all your work, and take some SP for inspiration :cherrypie:
ribs  [author] 27 Aug @ 10:35pm 
@ivmakk The mod has been updated! I included all the changes we discussed. Thanks again for your help!
ribs  [author] 27 Aug @ 6:38pm 
@ivmak Thanks for the info, it really saved me some time looking it up. I'm gonna set the default to 20% dirt. I also managed to tweak the animals' health and dirtiness. Right now I’ve created a few variables: health interval, min health, max health, and a health bonus. The mod checks within the interval, and if the chicken's health falls below the min health, it’ll heal back to that min health and then apply the health bonus until it hits the max health. For dirtiness, I’m thinking about only activating it when the hutch is closed. So when it closes because of dirtiness, it’ll auto-clean, and after a while, and once it hits 1% clean, it’ll open again, since there’s a bug in Lua that sometimes shows 0% cleanliness. The health part is almost done, but I’m still working on the dirtiness part.
ivmakk 27 Aug @ 3:24pm 
@ribs Thanks for the info! I just checked the implementation (you’re right, most of the logic is in IsoHutch.java):

- Below 20% dirt: chickens get a health boost and regenerate health.
- Above 20% dirt: chickens start taking health damage from dirty conditions.
- Above 40% dirt: chickens can’t regenerate health and suffer from poor conditions.

Now I get the point of the mod - when no chickens are inside, dirtiness shouldn’t keep increasing and damaging them further. Seems like a great way to keep them alive during long trips :happy_yeti:
ribs  [author] 27 Aug @ 2:48pm 
@ivmakk Thanks for the reply and the great mod. I’m looking into it now to see what we can use and how we can improve it. From what I know, when the hutch is closed, chickens can’t go in. Releasing them keeps them safe. I’m not sure what the exact thresholds are for dirtiness or how it affects health, as they are hardcoded in the Java. I will look into it and give you a full response. Fortunately, the mod you mentioned does some tricks I was unaware of that can help. I’ll follow up once I have something.
ivmakk 27 Aug @ 6:10am 
Hey @ribs , could you explain the value of the auto-close feature?
Will it stop dirtiness from increasing when the hutch is closed? Will chicks stay healthy if it’s closed?

I noticed that when dirtiness turns red (not sure of the exact values, but it seems to switch from green to red after ~40–50%), the chickens in that zone stop being healthy (orange health icons, tested with the mod Livestock Zones Expanded ).

Personally, I’d prefer if the mod slowed down the dirtiness buildup, since with the current vanilla speed a full hutch reaches the red state in about 3 days. Whenever I plan a long trip, I always end up worrying about how my chicks are doing at home :surprised_yeti: