Project Zomboid

Project Zomboid

Ei tarpeeksi arvosteluja
Sensible Balance: Food and Drink, Nutrition, and Water Weight
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tiedostokoko
Julkaistu
Päivitetty
358.628 KB
12.7. klo 9.29
7.8. klo 9.22
4 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Sensible Balance: Food and Drink, Nutrition, and Water Weight

2 kokoelmassa, tekijä unlockk
Vanilla Plus Plus Plus
211 luomusta
Sensible Mods
10 luomusta
Kuvaus
December 2024 Note: This is for Build 41 only, the Build 42 update will come in the future!

Fixes all food item nutrition discrepancies (calories, carbs/fat/protein) based off real-world (NCCDB) values. Optional fix for water containers. Optional file to make salt, pepper, etc. more common.
Items reweighed, some had their 'hunger reduction' values changed, so some (like butter, salt, coffee) can be used more times before they are depleted.
Some can dehydrate the player (dry or overly salted goods), strong alcohol dehydrates, more happiness from alcohol and less from sweets (the player is not a child).
Player-created pickled goods in jars last much longer (120 days to go stale, 400 to spoil, vs 30 and 90 default).
Added a penalty of unhappiness for boring, 'easy mode' foods like farming and eating raw cabbage should carry the unhappiness debuff - the game already applies this to plain unseasoned boiled pasta and rice which are far more palatable in real life to eat than a whole raw cabbage. Go and make some soup, it nullifies the penalty.
Some items cannot be eaten directly (e.g. teabags, salt, also dried beans that are toxic unless cooked in real life), nutritional differences between rice/pasta in pot vs when placed in bowls corrected, wild foraged herbs can eventually go stale and spoil, can freeze milk (not sure why it had a "CantBeFrozen" tag, etc...

Ensures compatibility with other related mods, even those which affect these items. Note when installing upon an existing save, the items that you already have will still have their old values. This sadly is a game limitation, discover more of the map or harvest more.

Optional - Water Weight:
Fixes the weirdness with the game's interpretation of water containers, e.g. holding a larger volume of water in a glass bourbon bottle somehow encumbers the player less than a plastic bottle holding less. Also changes the water containers such as cooking pots of water to be more cumbersome to carry around to simulate inconvenience (how do you fit that in your backpack anyway?).

Overall, it rebalances the water availability (e.g. vanilla: plastic water bottle 10 units = 100 thirst recovery, nobody cares and everyone always picks the High Thirst trait. Modded: 5 units). Larger containers like the wine bottle are more cumbersome but you can store more water. This way the water scarcity aspect of the game should hopefully be taken more seriously.

Optional - Food Spawns:
Improves the ProceduralDistribution (container spawns) of various food items to enhance player immersion. Some items are now more common such as salt and pepper, which is expected, and vinegar and sugar, which makes the preservation mechanic more useful.

Overall, the variety of food loot is slightly increased where appropriate. There is also more alcohol, and foraged herbs such as basil may appear in refrigerators, etc.

Does not conflict with other mods, cooking-related or otherwise, adding to the ProceduralDistribution of items, and being vanilla items, chances are heavily dependent upon the custom settings for loot. I personally play at insanely low settings for food, but I have tested my mod at default ‘apocalypse’ settings as well. I can't imagine what the game looks like when you increase the loot above that.

Optional - Fishing:
As I was editing all the fish item values I could not figure out why nothing was changing in-game. The entire hunger reduction/calories/weight, etc. were all assigned through the fishing menu script files! For compatibility's sake, if you're using any fishing mod, this is likely to conflict, so I am keeping it separate.

All the fish now restores an appropriate amount of hunger for their calories (vanilla: hunger restoration was very little so fishing was mainly a way to get fat), much lower encumbrance both raw or filleted, have more realistic world model size when dropped.

'Trash' items no longer just include socks or shoes alone, but twigs, plastic bags, dirty rags, scrap wood, unusable metal, and any other objects one may commonly expect to encounter whilst fishing.

Fishing being an idle fast-forward session of the game is somewhat more difficult now as a whole, with general sizes of each fish caught being smaller to compensate for the increases in hunger reduction values. You also will encounter a greater proportion of bait fish when you catch something, however the bait fish (minnow) now has been expanded as a 'lure' to all the larger fish as in real life, not just the pike as in vanilla code. Save your tackle and use it as bait.

It is a little bit more difficult to fish with a spear now, and generally the abundance for all sandbox 'Nature Abundance' settings is very slightly reduced. Winter also has a bit more of an effect on fishing. If you are fishing during dawn and dusk (4-6AM, 6-8PM as defined in vanilla code), you will receive a larger boost than before, so you can overcome the described increased penalties.

Optional - Food Miscellaneous Recipes:
Ability to craft cracker dough to make crackers. Requires no skill or previous recipe knowledge, and only requires flour and water. This is to avoid a scenario which I encounter on occasion where you are somehow going hungry if you don't have salt/yeast or recipe knowledge but you have bags of flour. This yields less hunger reduction and calories per 'unit' of flour than a bread.


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

-Create a caloric deficit moodle. It is easy to satisfy hunger penalties in the game by e.g. farming and eating raw vegetables whereas in reality your character is rapidly losing weight due to a high caloric deficit. I aim to implement a penalty for this using the MoodleFramework mod at some point when I have the time.

-Evolved recipes and hunger reduction values: It is hard to get this balanced as the value of a hunger reduction is used in an evolved recipe. E.g. if a food is -20 hunger, evolved recipes may be set to use 5 hunger max so 1/4th of the item and its nutrition is added when you click "Add to Soup" (unless you have less than 5 in which case the whole item is used). I've increased the amount of times you can e.g. mix a drink with bourbon or use butter as cooking fat by increasing their hunger reduction. If you start messing with the proportion used, you have to edit the "evolved recipe" parameter which, if you're using a cooking mod like Sapph's, I'd have to make a custom version where the parameter includes the lines for Sapph's new evolved recipes for every item. It's a lot of work for not much more gain. One thing I will definitely do is allow the player to add rice, oats, and pasta to soups and stews, and add rice/pasta to their own "pot of rice/pot of pasta" evolved recipes so that you may meal-prep larger amounts than 1/6th of rice or pasta the game currently allows for.

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

Extra Notes:

In the vanilla game, you cannot use items as bait in traps if they have less than 5 hunger reduction, which is why a lot of the insects had -5 hunger when eaten. I have reduced this to an appropriate amount, however this does not affect trapping because these insects have a zero chance of catching animals anyway! I highly recommend this mod, Advanced Trapping, to fix this, - it will allow you to use bait with less hunger reduction and they will actually catch something.

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: 3287678031
Mod ID: sensiblebalancefoodnutrition
Mod ID: sensiblebalancefoodnutritionfishing
Mod ID: sensiblebalancefoodrecipes
Mod ID: sensiblebalancefoodspawns
Mod ID: sensiblebalancefoodwater
21 kommenttia
Jaxon Goataar 14.8. klo 11.27 
I can say the mod works correctly now. Thank You so much for trying to fix this issue. :steamthumbsup:
unlockk  [tekijä] 7.8. klo 9.31 
1.3

Fix for the failure to find ItemTweaker_Core.

The game has code in three folders: client, shared, and server. Shared folder executes code both for client and server. It seems that once I restructured the mod to use the shared folder, the game could not find the Item Tweaker API as it was within the "client" folder, even if it was its own mod.

Installing Better Sorting fixed the issue and allowed the game and mod to function as it contained a copy of ItemTweaker_Core in its own shared lua folder. I have now done the same, the mod now includes ItemTweaker functionality on its own.
unlockk  [tekijä] 4.8. klo 1.11 
Hmm, that is a bit bizarre. Since you say it happens with all of the sensible tweak mods, and I checked line #16 in your error is thrown at "TweakItem(" " part of the code, it leads me to believe the ItemTweaker is somehow not recognised properly.

My suggestions are:

1. Use Mod Loader mod and Mod Loader Load Order plugin mod, sort your mods to make sure the item tweaker is somewhere near the top of your mod load order and all of my mods below.

2. Make sure that not only the item tweaker was enabled in the main menu/mods, but for your savegame as well.

3. Unsubscribe from ItemTweaker, then open the game, this will delete the mod, then quit and resubscribe to ItemTweaker.

4. Download Better Sorting: it uses its own ItemTweaker except it is copied into the mod so you don't have to download it. My mod won't recognise it, but the point is, see if the error gets thrown at Better Sorting and your java is glitching out somehow or whatnot...
Jaxon Goataar 3.8. klo 17.18 
And yes, I do have the Item Tweaker API installed. Even played with no mods other than "Sensibles" and those mods nessesary to run it. Still getting errors. No idea what's causing it.
Jaxon Goataar 3.8. klo 17.13 
at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:564)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:510)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:496)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:342)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:264)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:391)
at zombie.GameWindow.init(GameWindow.java:1206)
at zombie.GameWindow.mainThreadInit(GameWindow.java:576)
at zombie.GameWindow.mainThread(GameWindow.java:489)
at java.base/java.lang.Thread.run(Unknown Source)
Jaxon Goataar 3.8. klo 17.13 
`function: sensiblebalancefoodmodcomphl.lua -- file: sensiblebalancefoodmodcomphl.lua line # 16 | MOD: Sensible Balance: Food and Nutrition
java.lang.RuntimeException: Object tried to call nil in sensiblebalancefoodmodcomphl.lua
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
Jaxon Goataar 3.8. klo 17.12 
There's a bug I seem to be the only one to encounter,with the mod not working at all.

Same happens with other "Sensible" mods.
Gebirgsjäger 3.8. klo 12.23 
Mod works great btw! I appreciate your work!
Gebirgsjäger 3.8. klo 12.23 
Yeah as a matter of fact I already subbed that mod too. I used to host DayZ and while it took an overwhelming amount of time to redo it all from scratch (which I did) it was so easy to have a file that you could directly change each individual items loot chance (thousands of lines) or add new modded items accordingly finding the classnames in the mod menus. I wish the same could be said about PZ.

Especially when you want items to be special or rare because the loot is the heart and core feature of the game.
unlockk  [tekijä] 3.8. klo 1.41 
If I add a 10 chance to "Base.Salt" for the typical house kitchen, it does not mean 10% extra chance of spawning. Each loot table rolls 4 times typically, on common settings that might mean actual 10% * 4 = 40%, but on insanely low loot it may mean 1.5% * 4 or something, and then it depends on area. Mods add their own chances if they want their items to spawn, so its like an additional chance to spawn rather than something that will spawn in place of another object, vanilla or otherwise, though adding an object into the list will probably shift the weighing slightly.

There are ways to completely replace a loot table with another, which will definitely conflict with things, but my mods simply insert extra lines which does not overwrite anything. An example that I can think of is Loot Table Fixes https://steamproxy.com/sharedfiles/filedetails/?id=3033301901 , it evidently replaces existing attributes as it corrects the spelling of existing loot tables, and so on.