Project Zomboid

Project Zomboid

33 ratings
Better Food
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.706 MB
11 May, 2023 @ 3:05pm
18 Dec, 2023 @ 3:14pm
6 Change Notes ( view )

Subscribe to download
Better Food

Description
Improves accuracy in nutrition calculation as an almost complete overhaul of the nutrition system and replaces the nutritional values for almost all food items to be more realistic.

Adds moodles that are based on character nutrition with optional effects.

Starvation is now due to lack of food (calories) instead of your hunger moodle. An example of this is:
A new male character without any traits, whom is unemployed and does nothing but sit on the ground and sometimes drink water and sleep will weigh 80 and die from starvation after ~22 days.
If he fights zombies and runs around a little he will die from starvation after ~17 days.
If he fights zombies and runs around a lot he will die from starvation after ~12 days.

Carbohydrates and lipids do not provide a bonus to character weight gain other than the fact that they provide calories.
A higher protein intake will provide a bonus to strength (if moodle effects are enabled).

Certain traits and professions have an effect on starting weight, fat percentage and activity modifier.

This mod is made with long term playing in mind. It also disables the game's default nutrition to remove conflicts with the mod.

Workshop ID: 2974603480
Mod ID: betterfood
50 Comments
PinkPiggy  [author] 22 Feb @ 3:51am 
I don't know. I haven't tested it for B42 yet but I intend on updating the mod for the full release when it comes out.
MainFish 22 Feb @ 3:40am 
Does it work in B42? (Love this mod!)
Zwierzax 3 Oct, 2024 @ 3:16am 
I've got a NaN wetness bug, and it's spread to NaN to protein and fat, then spread to weight.
Tried to recover by debug mode and SQL edit but failed... Still it's nice mod, I use it for months.
PinkPiggy  [author] 20 Aug, 2024 @ 12:02am 
@tonyzur are you using any other mod?
AbBrenner Bigmeat 25 Jul, 2024 @ 3:26pm 
I would think normal weight for a male would always just be 80, or at least be dynamic, converging to 80. If you go with the dynamic model, you could still start off at 120kg, then as you lose weight the normal weight could trail behind. For instance,
if(character loses weight)
normal weight = normal weight - .25 * weight loss
if(character gains weight)
normal weight = normal weight + .25*weight gain

This would still prevent people from losing/gaining weight too fast, and should work reasonably well with how you have it. Just have to adjust the value instead of set constant.
Just my 2 cents.
Thanks for the replies and looking into this so fast. I kinda don't wanna play on my character right now with this issue. I'm not sure what all will happen if I continue to lose weight.
PinkPiggy  [author] 25 Jul, 2024 @ 1:51pm 
No, the function cannot be called from console and not really used since the character tab to show the same thing was added as a game-option. The calories you are seeing are not your character's value as I'm using mod-specific values to remove conflicts with the base game but it sounds that if your character gained weight the moodle would disappear. I want to fix so that the "normal" weight for a character starting as obese etc. would not be ~120kg and be more in line with the base game.
AbBrenner Bigmeat 24 Jul, 2024 @ 11:13am 
I definitely didn't go through everything, but it does seem as though you're setting the moodles, then checking to see if the moodle is present to determine everything else.
Somehow with 3700 calories, my guy is passing the total_storage < 14 * (...) check. (I think that's malnourished? There are no comments) Either my base consumption is too high (I can't store more than 3700 cals), or something else is awry.
AbBrenner Bigmeat 24 Jul, 2024 @ 10:45am 
As for weight loss, as a simple fix you could change it from being strictly weight loss to weight loss/days survived, which would be much more realistic. Then you would only have to worry about losing weight too fast and dropping below minimum weight. I'm not sure what your overall goals are, but generally 1-2 pounds per week, so .5-1 kg per week is considered healthy levels of weight loss.
AbBrenner Bigmeat 24 Jul, 2024 @ 10:40am 
OK, so will me maintaining weight for a period fix the malnourished state? Also, is there a way for me to call the function BetterFood:printPlayerNutrition() from the debug console? I'm also on 3700 calories per the debug menu. I've never used the debug menu before.
I am down to about 111 kg from whatever you start as with obese (maybe 130?)
PinkPiggy  [author] 24 Jul, 2024 @ 3:31am 
Ok, I think I know what the problem is. Right now the "lose weight" function in the mod is simpler than I want to it be due to me not knowing too much about biology and therefore there is only a certain weight that a character can lose before starving (as weight-loss is currently only fat and not including water etc.) and I think that you are hitting that limit. I want to fix this but I am going to have to read a bit before fixing it so it might take a while.