Sterile Tile and Food Poisoning

Started by ArguedPiano, October 31, 2016, 06:51:39 PM

Previous topic - Next topic

ArguedPiano

Would Sterile Tile where your stove and butchers table is reduce the chance of a pawn receiving Food Poisoning?

As in your hospitals it helps prevent Infection, you think it would help with your food as well.

Anyone know? The Wiki on Sterile Tile does not mention anything other than infection.
The only difference between screwing around and science is writing it down.

Lys

No it doesnt affect that. Food poisoning is based on your cooks skill level alone (the lower the skill, the higher the chance).

ArguedPiano

I should have read more into this before posting.

The Cleanliness Tab on the RimWorld Wiki Here says "This stat affects medical outcomes, research speed, and the chance that cooked meals will cause food poisoning."

So my next question would be why does Cleanliness affect Research Speed?
The only difference between screwing around and science is writing it down.

Bozobub

A messy, dirty lab isn't  usually indicative of quality research, let's say.
Thanks, belgord!

ArguedPiano

Quote from: Bozobub on October 31, 2016, 07:19:49 PM
A messy, dirty lab isn't  usually indicative of quality research, let's say.

Haha fair enough. I can get behind that.
The only difference between screwing around and science is writing it down.

Zhentar

Quote from: Lys on October 31, 2016, 06:54:34 PM
No it doesnt affect that. Food poisoning is based on your cooks skill level alone (the lower the skill, the higher the chance).

This is incorrect. The cleanliness of the "kitchen", the room in which the food is cooked, does affect the food poisoning chance. The bonus for sterile tiles is pretty small though, and not really worth chasing; mostly just make sure the room you cook in isn't filthy.

brcruchairman

Quote from: ArguedPiano on October 31, 2016, 07:00:38 PM
The Cleanliness Tab on the RimWorld Wiki Here says "This stat affects medical outcomes, research speed, and the chance that cooked meals will cause food poisoning."

This is odd; on that same wiki, on the food poisoning article, it makes no mention whatsoever of cleanliness.

Quote from: Zhentar on November 01, 2016, 01:07:37 AM
The cleanliness of the "kitchen", the room in which the food is cooked, does affect the food poisoning chance.
It sounds like you know something I don't; the wiki is inconsistent on this topic, which will hopefully be remedied soon. In the meantime, may I ask how you know the above? Were they experiments you performed, decompiled code, or somesuch? I'd like to be able to reference it properly the next time this comes up, as I've seen the converse asserted strongly in other threads; your assistance in spreading the truth would be much appreciated. ^ ^ 

skullywag

Room cleanliness is taking into account when the recipe is being worked on:


CompFoodPoisonable compFoodPoisonable = thing.TryGetComp<CompFoodPoisonable>();
if (compFoodPoisonable != null)
{
float num2 = worker.GetStatValue(StatDefOf.FoodPoisonChance, true);
Room room = worker.GetRoom();
if (room != null)
{
num2 *= room.GetStat(RoomStatDefOf.FoodPoisonChanceFactor);
}
if (Rand.Value < num2)
{
compFoodPoisonable.PoisonPercent = 1f;
}
}
yield return GenRecipe.PostProcessProduct(thing, recipeDef, worker);


The room stat is question works like this:


public class RoomStatWorker_FoodPoisonChanceFactor : RoomStatWorker
{
public override float GetScore(Room room)
{
float stat = room.GetStat(RoomStatDefOf.Cleanliness);
float value = 1f / GenMath.UnboundedValueToFactor(stat * 0.21f);
return Mathf.Clamp(value, 0.7f, 1.6f);
}
}


So yeah, clean room with unskilled worker means less food poisoning chance. Simples. :)
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Mehni

If I'm reading that right, cooking without a room (i.e. outside) results in a 1% chance per meal of food poisoning?

Carrying on, a room has a chance of 0.7% or 1.6% chance of causing food poisoning?

Zhentar

It makes the most sense to consider that a 70%-160% modifier on the cook's base food poisoning chance.

Jimyoda

Quote from: brcruchairman on November 01, 2016, 02:47:44 AM
This is odd; on that same wiki, on the food poisoning article, it makes no mention whatsoever of cleanliness.
That link to Food Poison Chance refers to the stat of a pawn. The description reads 'The probability that this character will inadvertently poison a meal they cook'. It's not about the overall chance of a meal getting poisoned, although since it's closely related, I referenced room cleanliness.

   The chance that a meal will be poisoned is determined by this stat as well as the room cleanliness where the meal is prepared.

I also referenced it here: http://rimworldwiki.com/wiki/Ailments#Food_Poisoning

   Occurs after having eaten a contaminated meal. The chance of contamination is determined by the cook's skill and the cleanliness of the room where it was prepared.

These discussions are very helpful to reveal points where the wiki needs some work. Keep in mind that WE (including every person that reads this) are the ones that write/update the wiki, not the dev.

Quote from: Rahjital on July 09, 2015, 03:09:55 PM
"I don't like that farmers chop people up."

Obviously she has already played Rimworld :P

Read the wiki. Edit the wiki. Let the wiki be your guide.
http://rimworldwiki.com/

carbon

#11
*sigh* My code reading skills could clearly use some work...

So to make this explicitly obvious,
assuming you have a cook with a skill of 10 (poisoning base chance = 0.10%),
then cleanliness of the room will modify it, so that:

Maximum dirtiness = 0.16% chance
Maximum cleanliness = 0.07% chance

Right?

----

If that's the case it's almost never worth the effort to clean stuff unless you have a really terrible cook, since the maximum impact of cleanliness is typically less than that of gaining one level in cooking skill. (e.g. a level 9 cook has a 0.20% chance of poisoning)

You would be far better off using the sterile tile silver to buy a cooking neurotrainer to reduce poisoning chances.

Zhentar

That is correct. (You should still keep it somewhat clean for the sake of your cook's mood, though)

RemingtonRyder

Some workbenches actually reduce cleanliness, by the way. So don't build them in the same room as your stove(s).

brcruchairman

Thank you, Skullywag and Jimyoda! Both of those were resources I hadn't checked, and are quite definitive. I'd also like to further thank you for being so willing and awesomely nice about providing sources when asked; I'm aware it's often more a chore than anything else, so I'm very grateful you've enlightened me and dispelled a misconception I had! A special thanks to Jimyoda for updating the wiki, too; you're entirely correct that I misread the article in question, and thanks to you I don't imagine any one else will make the same mistake I did. :p

Y'all are helping to keep this community great. :)