Project Zomboid

Project Zomboid

192 个评价
Food Preservation Buff
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
80.336 KB
2022 年 1 月 2 日 下午 1:47
2022 年 2 月 19 日 上午 10:30
12 项改动说明 ( 查看 )

订阅以下载
Food Preservation Buff

描述
Build 41.56+ MP Compatible

The default preservation mechanics for jarring are pretty unrealistic. This mod aims to consolidate several different ideas into a single mod. This mod does not remove the default recipe for jarring but adds two alternative ways to jar and pickle food more reflective of reality.

Jarred Food:
  • Jarred food now returns the lid and the jar when opened.
  • Jarring food only requires water but still needs to be cooked. The requirement for vinegar and sugar is removed.
  • Jarred food will last up to 1 year until stale and 2 years until rotten (Default in the vanilla game is 3 months until rotten).

Pickled Foods:
  • Pickling food requires a lid, jar, water, vinegar, salt and sugar.
  • They do not require cooking and will keep food fresh for 3 years and from rotting up to 5 years.
  • Pickled food are more in-line with the vanilla recipe but with a greatly increased shelf life to better reflect the difficulty involved in acquiring all the ingredients to pickle.

Preserving Meat and Fruit:
  • You can jar or pickle meat in the same way as outlined above. Only works on food acquired through fishing or trapping (Rabbit, Bird etc).
  • You can create jerky by combining salt and 2 butchered meats. The final result will add the hunger values together but can not be any better than -100.
  • You can create fruit jam and marmalade using a jar, varying quantities of fruit, and sugar.
  • All fruit jam and marmalade will give a jar and lid when eaten.
  • Stale and rotten food will add sadness and boredom to jerky, jam and marmalade, but rotten ingredients will not add food poisoning.

Additional Changes:
  • Loot rate for jars, lids, boxes of jars, vinegar, salt and sugar have all been increased.
  • Increased the variety of containers that jars and salt can spawn in.
  • Jar freshness is 99% accurate to its contents. Works with eris food expiry mod**
  • Add recipe to put jars back into a box
  • Alternate mod to require reading a few magazines to unlock the recipes.

Bugs:
  • Vanilla jar recipes are still available but there is no clean way to remove them. Just ignore them.
  • Instead of storing jarred food hunger values individually, it's all averaged together and given back averaged too. Recipe code doesn't let you operate on individual items that come out of the jar, so this is the only way to keep the input equal to the output.

** Using Eris Food Expiry mod will display jarred food expiration date incorrectly when uncooked. You need to cook the jars to get the 2 year until rotten trait, otherwise you could open a fresh jar to receive rotten contents. Debug menu displays correct values. Once the jar of food is cooked the Eris Expiry mod will work correctly and display accurate data.

Having a way to preserve food for long periods of time seemed to be a balancing issue to the devs but considering how common canned food can be even on rare loot settings being able to stockpile farmed food at the expense of rare resources (jars etc.) seems balanced to us.

Other mods that work well with this one:

Choose only one Mod ID! Mags locks all the recipes behind 5 magazines - one for jerky, one for jam, one for marmalade, one for jars of vegetables and one for jars of meat. They closely mimic spawn rates of vanilla skill magazines.

Workshop ID: 2705537463
Mod ID: FoodPreservationBuff
Mod ID: FoodPreservationBuffMags
63 条留言
Duchess 2024 年 2 月 20 日 下午 11:26 
Apologies for previous post, that fix is incorrect. The ingredients should read like this (fpb_recipes.txt, lines 152 and 153):

Rabbitmeat/Smallanimalmeat/Smallbirdmeat=2,
Salt;5,

Just tested and it works fine. However, as I said below I think you need two of the same type of meat now, no big deal tho :steamthumbsup:
Duchess 2024 年 2 月 20 日 上午 11:20 
@Kothonis thanks for posting your fix!

To anyone who still cares about the jerky recipe bug, I think the issue relates to how the recipe is laid out in fpb_recipes.txt. It lists the required items like this (line 152):

Rabbitmeat/Smallanimalmeat/Smallbirdmeat,
Rabbitmeat/Smallanimalmeat/Smallbirdmeat,
Salt;5,

I think doubling up the required items like this creates the bug. Try this instead:

Rabbitmeat=2/Smallanimalmeat=2/Smallbirdmeat=2,
Salt;5,

This is only hypothetical, please let me know if it works. A potential downside of this is that I don't think the recipe will now allow you to mix-and-match different meat types, instead requiring two of the same.
Krilton 2023 年 5 月 4 日 上午 9:04 
@CMDR_Lani That mod may have it's own system, I don't know as I also use that mod and have sort of wondered that myself. I just haven't tried. :p
Kothonis 2023 年 3 月 18 日 上午 7:06 
hey I found a bug where open can would always return me -45 hunger birds and -90 fish and rabbit.
I looked at your code and found that in line 152 you use items:get(0):getWeight() for calculating the hunger of meat when opend but for veggies you use getActualWeight(). changing the line 152 to "result:setHungChange(0 - (items:get(0):getActualWeight() - 0.2) * 6 / divisor)" fixed it for me.
To be honest I I am very confused by the bug either I am the only one having it or items:get(0):getWeight() got deleted resently
CMDR_Lani 2023 年 2 月 7 日 上午 7:45 
Hey does anyone know if this works properly with Jiggas Green fire ?
Nat 2023 年 2 月 6 日 下午 12:50 
Helloo, sorry for bother, I wanna ask if this mod is compatible with LeGourmet Revolution u.u, if anyone knows I'll be grateful n.n
Krilton 2023 年 1 月 8 日 下午 9:56 
@Tuna how difficult would it be to jar fruits and would it be possible?
Tuna  [作者] 2022 年 11 月 19 日 下午 4:31 
oh, that's worth looking into
psubrat 2022 年 11 月 18 日 上午 9:30 
"Vanilla jar recipes are still available but there is no clean way to remove them. Just ignore them."
Since Obsolete:true doesn't really work (at least last time I tried it) I'm using NeedToBeLearn:true to get rid of recipes (even on your mod). Of course don't forget about Override:true. ;-)
Lomion 2022 年 10 月 24 日 下午 12:34 
Can confirm bug from Tofuman and Tahvohck. When i have only one piece of meat in inventory and try to craft jerky, meat just disappears with following error:
[24-10-22 22:12:06.887] LOG : General , 1666638726887> 0> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: PerformMakeItem
function: perform -- file: ISCraftAction.lua line # 58 | Vanilla
function: perform -- file: TailoringFix.lua line # 59 | MOD: Tailoring Fix.
[24-10-22 22:12:06.888] ERROR: General , 1666638726888> 0> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method)..
[24-10-22 22:12:06.889] ERROR: General , 1666638726889> 0> DebugLogStream.printException> Stack trace:.