Project Zomboid

Project Zomboid

42 ratings
Sensible Balance: Temperature Affects Food Spoilage Rate
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
33.599 KB
27 Jul, 2024 @ 6:56am
31 Jul, 2024 @ 11:19am
2 Change Notes ( view )

Subscribe to download
Sensible Balance: Temperature Affects Food Spoilage Rate

In 2 collections by unlockk
Vanilla Plus Plus Plus
210 items
Sensible Mods
12 items
Description
December 2024 Note: This is created and tested for Build 41 only, the Build 42 update will come in the future! The mod may still work fine with Build 42 - but use at your own risk!

World temperature affects the food spoilage rate as you experience seasonal and day-to-day variations. Compatible with everything, works in multiplayer, works with existing items, temperature-dependent decay time/spoilage rate updates every in-game hour.

The example picture has been created with the help of Eris' Food Expiry, which shows the remaining freshness and time until the food is completely rotten.

The game does not differentiate between items left outside and inside, where it is typically warmer, which is a limitation for this mod, but has been accounted for to the best of my ability.

Items do not freeze unless are in the freezer, same as vanilla.

Future Plans:
-Update the mod for Build 42 when the time comes.

-Manually adjust some of the gratuitous spoilage times on some food items for better realism and immersion. I've already covered some in my Food and Drink, Nutrition, and Water Weight mod.

-If anyone has any idea how one could begin to code for items freezing once the temperatures are within the realm of freezing, please let me know. If it is possible for pots of water in the game to fill up with rain that means they know that: 1. they are on the outside tile, 2. the weather conditions are right. If the "amount of water" bar is able to fill up it should also be possible to fill up the "freezing" bar based on points 1 and 2. I would appreciate any insight into how one could code for this.

-Of course, if there are any issues or imbalances I will try and correct them. I use all my mods myself.

Extra Notes:
Because the refrigeration effectiveness sandbox setting is a flat multiplier against the decay timer, it is also adjusted to best fit realistic expectations (e.g. when it is freezing outside, refrigeration effectiveness is reduced given that refrigerators are meant to run between 0°C and 4°C). It is not possible to make food spoil faster in a refrigerator than outside, so when in doubt, use the fridge.

I would recommend using Surviving Through the Seasons to make the year last less than 365 in-game days so that you can actually experience all the seasonal variations through your average playthrough length. I would also suggest KYR Real Weather with the base minimum temperature to -4°C if you want the fairly typical real-life winter lows of Kentucky.
Lastly, Prepare For Winter to make farming below zero impossible.

Permissions:
Please do not mod-pack or reupload this mod anywhere else, just share the link to this page.
I hope you enjoy this mod.

Workshop ID: 3297793087
Mod ID: sensiblebalancetempfoodspoilage
19 Comments
diGGa 15 May @ 2:50pm 
Honestly, why apply this to refrigerators, bro... why so much realism? Please make a version without affecting anything on refrigerators.
🔰 30 Mar @ 3:36pm 
i tried it in b42 and it seems to work but it also resets the sandbox options for refrigeration efficiency to very low instead of the high that i used which means all my shit is rotten now cos i didnt notice :/
Dojyan 17 Mar @ 2:10pm 
There's a bug with "lard" item, for some reason when I hover over it the game basically freezes while showing how much time till Lard goes bad, it goes into thousand of years
NivJake 3 Mar @ 3:31pm 
has anyone tested if it does work in b42, i know it says use at your own risk
konte1m 17 Oct, 2024 @ 10:33am 
damn bro, you're doing the gods work with those mods
unlockk  [author] 23 Aug, 2024 @ 3:20pm 
If anyone has any idea how one could begin to code for items freezing, please let me know.

If it is possible for pots of water in the game to fill up with rain that means they know that: 1. they are on the outside tile, 2. the weather conditions are right. If the "amount of water" bar is able to fill up it should also be possible to fill up the "freezing" bar based on points 1 and 2. I would appreciate any insight into how one could code for this, as I could not find the lua file for rain behaviour which leads me to believe it is hardcoded.
unlockk  [author] 7 Aug, 2024 @ 2:21pm 
haha no problem
Anrik 7 Aug, 2024 @ 9:28am 
I have to apologize. I forgot that I had installed another mod at the same time. And that mod caused this.
unlockk  [author] 7 Aug, 2024 @ 6:50am 
Honestly, there's no way the code affects this, feel free to look through the mod files. Could I please see your entire modlist? Are you sure you don't have Surviving Through Seasons installed or something?
Anrik 7 Aug, 2024 @ 1:23am 
Sunday I installed the mod, and since Sunday I have had the problem that the date in the digital clock does not switch from e.g. 08.01. (dd/mm) to 09.01. but to 11.01. And this goes on and on. From 11.01. to 14.01. to 17.01. etc. Previously this error did not occur in my current run and it has now been running for 6 months and 2 days in the game. I have installed PZ on another computer and tried my savefile on this computer. The error is still there. So it seems that my savefile is defective somewhere. But where? And can I change it again?