Project Zomboid

Project Zomboid

Food Expiration Date and Bar
144 Comments
rez  [author] Apr 15 @ 1:31pm 
@*gönlümüzde orası,
I have written it in English and added all the translations people sent me. Noone has sent Turkish, thus this mod does not have this particular translation.
If you know English, you can help by submitting Turkish file with translation from English.
*gönlümüzde orası Apr 15 @ 12:41pm 
Bu kadar fazla dile çevirmişsiniz (gereksiz dillerde var) fakat neden türkçeye çevirmekle uğraşmadınız. Türklere karşı bir ırkçılık yapmanız hoş değil, genel olarak bizi adam yerine koymuyorsunuz.
шеколад74 Feb 4 @ 6:46am 
а будет роботать на всех версиях проджект зомбоид ктоме 42
rez  [author] Jan 27 @ 5:00pm 
@Nathan, maybe after b42 is released. I haven't tested it yet.
Nathan Jan 27 @ 4:30pm 
is this being worked on for b42?
Odoxon Dec 10, 2024 @ 3:10pm 
@Epathos but how does that make sense if frozen food lasts 25 times longer?
Epathos May 27, 2024 @ 10:39pm 
There is no difference in time between the freezer and fridge
BBA May 14, 2024 @ 9:06pm 
Does the time left before food turn stale/rotten scale with sandbox settings and if the item is in a fridge/freezer?
MoojinNoJinniderru Apr 15, 2024 @ 12:20pm 
A Good Food handling, Refrigerator shelves, cross contamination and Hygiene mod would be nice, I took a food handling course 5 years ago and the most notable thing about the game Is the complete lack of food handling procedures you can store meat with veggies which in food handling is not safe to eat, same with washing bloody clothes in the sink and immediately drinking from the same source, not cleaning utensils and cutting board before re-use, as well as not washing your hands before handling meat and other foods. My immersion is broken with the lack of these things in game, however I won't stop it from letting me enjoy it, thank you for listening to my rant, I know I will seem sorta over-analysing for saying this
aquelarrefox Apr 15, 2024 @ 9:15am 
good stuff, is posible to make a patch to truncate the time to days?
rez  [author] Mar 13, 2024 @ 7:56am 
@CLEO
For singleplayer game you can either give yourself the trait using Zomboid's debug mode OR you can temporary edit tooltip.lua file: there's an option that switches the behavior in the first lines of the file, named trait_logic. Set it to 'false' instead of 'true', that should allow skipping checks for trait.
CLEO Mar 13, 2024 @ 12:05am 
so this requires the trait??
i actually got into preserving food in my current playthrough smoking and pickling and stuff they are still perishable but i don't know for how long
i can't add this trait in an ongoing playthrough
rez  [author] Jan 30, 2024 @ 1:41pm 
@DivineAutismo
In-game time without fridge.
DivineAutismo Jan 29, 2024 @ 4:21pm 
I'm honestly confused about this. is the timer for ingame time or real time?
Zefiruz Jan 11, 2024 @ 12:14pm 
Mods que deberían ser vanilla.
rez  [author] Nov 16, 2023 @ 4:40am 
@tv.ramrod
It may've been on the verge of becoming stale by time you put it there, fridge may have low efficiency by game options etc. This mod translates objects' properties to human readable form with or without trait. No internal magic happening there, sorry. I see that 3 days till stale is written on PZwiki so it should be correct.
Also these 2 days are what's left when *unfrozen back*, take a note on slow timer ticks when frozen. That's by design as people don't eat frozen food for the most part, they wait till it thaws and then they have to spend some time cooking it. That's why people are usually interested in 'real time' that's left for food when they determine what happens first: they manage to cook it or it rots before.
tv.ramrod Nov 15, 2023 @ 9:51pm 
Frozen uncooked bacon in the freezer.. stale in 2 days? something ain't right
vsnegupal Nov 5, 2023 @ 6:14pm 
No thanks, I probably won't modify the code, I don't want to get into that right now.
rez  [author] Nov 5, 2023 @ 4:56am 
@vsnegupal
Yes of course you can include it unless you modify the source.
If you have any ideas for improvement and working code please contact me and maybe we can add them in mainstream later.
vsnegupal Nov 5, 2023 @ 12:31am 
Greetings. Can you please give me permission to include this mod in the modpack for my personal server? There will be a link to this mod in the modpack description, and I will always be in touch for original mod authors. You can post your approval/disapproval here or in private messages.
fing fing fing ravv ravv ravv Aug 13, 2023 @ 7:43am 
can you please add magazine for telling the exact time for foods??
Peni4 Apr 18, 2023 @ 9:41am 
@rez Then I dont know. I was just testing this and another food freshness mod on my main run, swapping them around and comparing them... so it's likely that something just broke along the way. ¯\_(ツ)_/¯
In any case, I was left unsatisfied, which is frustrating. To be honest, the countdown is only more confusing because of the way it's displayed. Given this, I personally would be quite happy with a simple bar with a dynamic color change.
Soylent Apr 18, 2023 @ 9:33am 
Awesome, thanks for the mod. By the way, is it possible for the mod to identify if food is frozen and change the expiration dates accordingly (rather than slow down the timer)?
rez  [author] Apr 18, 2023 @ 7:15am 
@Peni4
It does not eat anything, especially after removal ;)

@Soylent
This can be safely ignored and is left from 40.x era.
Peni4 Apr 18, 2023 @ 6:17am 
Mod noticeably eats FPS, even after removal.
Soylent Apr 17, 2023 @ 9:05am 
I see this error appear on the server console when I log out my character with the trait - "IsoGameCharacter$XP.load> unknown trait "foodexpiration"
Edokun Apr 12, 2023 @ 6:09am 
Imagine knowing when to exercise, eat, get drunk, smoke, sleep in any mode of the day or night :steamthis::steamthumbsup:
rez  [author] Apr 8, 2023 @ 8:17am 
@Sleepy Joe
It shouldn't. All that it does it reads additional info about food lifespan from items properties and displays it, nothing is replaced during this process.
John Fallout Apr 8, 2023 @ 8:03am 
Is it possible that this mod interferes with nutritional values? Beef Jerky still gives only 1g of protein to me although it's been supposedly fixed in 2021.
BargainSale Dec 22, 2022 @ 4:35am 
Nevermind, I figured it out
BargainSale Dec 22, 2022 @ 4:23am 
Is it possible to make it so you can only see days left, instead of hours and minutes?
BigHillsBigLegs Nov 27, 2022 @ 2:26pm 
new game rewuired?
DoktorFar Nov 13, 2022 @ 3:00am 
Hello, the countdown timers for stale and rotten are the same value depending if the item is at normal temperature, cooled or frozen. But the speed at which it ticks down is different, so slower/faster for each of the three states.

Could there perhaps be a way to calculate the actual ingame time left at the current decay rate?

Not really complaint, just wondering if that might be possible. Thanks for a great mod!
Space Moth Oct 19, 2022 @ 8:28am 
@Deon - I had the same issue, and managed to find the conflicting mod. It looks to be the "Personalized Zombies" mod causing the issue.

Both Personalized Zombies and this mod define "initMod". This results in the variable NAME_TRAIT not being defined and causes the error whenever you hover over any food item.

I would recommend renaming initMod to something more unique to avoid clash!
Survivator Oct 13, 2022 @ 4:34pm 
Thank you for a great mod! :cozybethesda:
Jet Gi Sep 8, 2022 @ 4:07pm 
Would it be possible to have an option where this starts happening at like cooking 5-6 or something? So as you get better with food you just kind of learn your way into it.
Deon ☣ Aug 22, 2022 @ 2:10am 
Thank you for your answer.
For others who check mod quality in comments: please dont take my comment as bashing on this mod.

My problem is purely due to mod combination I run, this mod works fine on its own.
rez  [author] Aug 21, 2022 @ 4:56pm 
This can be due to: mod that somehow corrupts traits, malformed food item from another mod or another mod using the same mechanics. Can't tell more at this time.
Deon ☣ Aug 21, 2022 @ 4:02pm 
Could you recommend me a direction of troubleshooting of this error besides turning mods off one by one? Or is it too few information?
Deon ☣ Aug 21, 2022 @ 4:02pm 
This is likely caused by other mods, but recently I started to get this error when putting my mouse over food items:
[22-08-22 01:57:20.809] LOG : General , 1661122640809> -------------------------------------------------------------
attempted index: NAME_TRAIT of non-table: function initMod:104.
[22-08-22 01:57:20.810] LOG : General , 1661122640810> -----------------------------------------
STACK TRACE
-----------------------------------------
function: get_trait -- file: tooltip.lua line # 219 | MOD: Food Expiration Date and Bar
function: fdxpr_render -- file: tooltip.lua line # 121 | MOD: Food Expiration Date and Bar.
[22-08-22 01:57:20.811] ERROR: General , 1661122640811> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: NAME_TRAIT of non-table: function initMod:104 at KahluaThread.tableget line:1689..
çar Aug 9, 2022 @ 9:32am 
Never mind I just need to activate the mods for ongoing game from load game menu. It works fine.
rez  [author] Aug 9, 2022 @ 6:55am 
@çar
I have just checked in both Single and Multiplayer modes. Works in 41.73 as intended, no issues.
Have no knowledge on advanced volume mod though, but it does not sound like something that should use tooltips in any way.
çar Aug 9, 2022 @ 6:32am 
Doesn't work on me. I only use, advanced volume enabler, no other mods. Is it because of the new update? Any help?
rez  [author] Aug 2, 2022 @ 1:39pm 
@charoles31
Yes. The whole point of this decision is in one's ability to predict how much time is left when the food is removed from the fridge, because I think there's no reason to see incorrect (rated) time before thaw happens and then just staring at the food that will rot as you cook it. Thus I made it show time left when put out of fridge instead that ticks slower in fridge/freezer so I don't have to make backward calculations in my head.
charoles31 Aug 1, 2022 @ 8:58pm 
Took me a while to figure out that this mod doesn't extrapolate refrigerated freshness rates. It just slows the countdown timer. I thought the damn thing was broke. Excellent mod but can I borrow your calculator?
YingSuHuaKai Jul 16, 2022 @ 6:07pm 
still working at 41.72:steamthumbsup:
SirVival Jun 30, 2022 @ 4:17am 
It might be my stuffed mod package, but this mod is the onliest causing visible problems atm.
The Bar is not shown at all, while the State of the Food is Shown... but like way out of the borders of the window where it should be. Otherwise i think this is great addition to game, thanks xD
Axebeard May 27, 2022 @ 6:52pm 
After looking at your LUA, I actually don't think your mod is causing the problem. I'll have to play with my modlist a little.
Axebeard May 27, 2022 @ 6:50pm 
From what I understand it allows you to edit only specific traits of items without editing the ENTIRE item if that makes sense. So two mods using ItemTweaker API could change the same food, but they wouldn't overwrite each other.
rez  [author] May 27, 2022 @ 5:41pm 
@Axebeard
What's 'Item Tweaker API' and why a standalone mod that does not tweak any items should use it? Could you please elaborate because it's the first time I hear about this API tbh.