RimWorld

RimWorld

49 ratings
Poisoned Food Stack Fix (Fix) by Binch
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5
File Size
Posted
Updated
41.946 KB
Jan 21, 2023 @ 9:25pm
Mar 17, 2024 @ 5:35pm
4 Change Notes ( view )

Subscribe to download
Poisoned Food Stack Fix (Fix) by Binch

Description
Fixes a well known (and arguably overblown) issue in the base game where the chance of food poisoning for a meal is distributed across all other meals in its stack, similar to how the base game handles hit points. For things like pemmican where you have large stacks and are eating multiple units at a time, this is actually a very efficient way to be handling things. For things like meals where you're only eating one unit at a time, however, it can be frustrating to realize that the game has no memory of how many poisoned units you've added to the stack and how many you've taken out. If you've ever gotten food poisoning from a meal that you could've sworn was a safe bet, this is likely the culprit.

The reason I say this is overblown is because - in the aggregate - you're still getting food poisoning about as often as you were supposed to. It only seems like a problem because you weren't noticing all the times this mechanic worked in your benefit. I suspect this is why Ludeon hasn't bothered to address it yet, although they probably should.

Fixing this is relatively simple - we update the game code to make the determination of whether or not a thing is poisoned at the time it's removed from the stack, rather than when it's ingested. That's all this mod actually does.

Note that there is a nearly identical mod in the workshop with many subscribers that, in my view, does not adequately address this issue. My main concerns are that (A) the mod does not allow you to safely disable it without jeopardizing the integrity of your save file, (B) the mod effectively reduces the risk of food poisoning from 4x meal bills by 75%, (C) the mod makes it almost impossible to get food poisoning from pemmican, and (D) these issues have presumably existed for years without anyone noticing. If you're having problems with other mods that claim to fix this issue, feel free to give my version a try - just make sure not to mix them.

Check my work on GitHub: https://github.com/binchware/PoisonedFoodStackFix
15 Comments
Tomahawk Jan 11 @ 3:24pm 
thank you for explaining why a player like me does not need this or the other mod, it saves me a mod to worry about!
The Bard of Hearts Aug 18, 2024 @ 9:35pm 
I'm getting the same problem as the scrimblo. My cook has 18 in cooking and yet almost every other day, someone is getting food poisoning.
the scrimblo May 10, 2024 @ 7:57am 
Ever since using this mod my pawns get food poisoning more, due to 'incompetent cook' (my cook is like lvl 11)
binchcannon  [author] Mar 26, 2024 @ 9:09pm 
@mayonnaise - This mod only kicks in when removing items from a stack, and only for stacks that actually contain a poisoned meal, so most of the time this mod isn't actually doing anything. Even when it does kick in, I'd be surprised if the few dice rolls we're making have any noticeable impact on performance.
mayonnaise Mar 25, 2024 @ 10:39pm 
is this performance friendly? constantly checking food items whenever they're moved around seems rather resource intensive
binchcannon  [author] Mar 17, 2024 @ 5:37pm 
Updated for 1.5!
CTH2004 Jul 9, 2023 @ 9:16am 
by "overblown", what do you mean?
binchcannon  [author] Jan 28, 2023 @ 5:22pm 
@Renzor suppose you got a master cook in a clean kitchen and a novice cook in a dirty kitchen. The master cook makes a "clean" meal and puts it on a shelf. The novice cook makes a "dirty" meal and puts it on the shelf. In the base game, both meals now have a 50% risk of poisoning. You might eat them and get food poisoning once, twice, or never. An attentive player would reason that one meal ought to be safe to eat, but they would be wrong.

The problem is that the first meal retains its 50% risk of food poisoning even when removed from the stack, as does the remaining meal. My mod addresses this by instead rolling the dice whenever a meal is removed from a stack. If it turns out to be poisoned, we set its risk to 100% and reduce the stack risk accordingly. In the case above, this would guarantee that exactly one meal is poisoned. Effectively, we are tracking how many meals are poisoned, and we're distributing that risk such that it seems to follow the meal wherever it goes.
Renzor Jan 28, 2023 @ 3:00pm 
I dont understand how your fix works.

Are you saying it's now tracking how many poisoned items are in a stack and counting down until there are no more poisons in there? Or?
binchcannon  [author] Jan 27, 2023 @ 9:16am 
@bugrilyus it probably does more harm than good. Setting food poison chance beyond 100% (which the other version does frequently) is sure to have unintended consequences. My version doesn't have the same pitfalls.

I will say most players don't need this fix. If your playing on extreme difficulties where you're having to make judgement calls on whether to eat before or after a raid, this mod will reward more attentive players. If you thought there might be as many as 2 poisoned meals in a stack and you've already been poisoned twice, for instance, then you can have some assurance that the remaining meals are not poisoned. Base game behavior is pure RNG, which is honestly fine for most players.