[quote=“Rorudo, post:49, topic:2951”]i2amroy
Ok, here is first 10 hours of my new run:
10:00. Started with disease resistance perk.
~11:00. Got -7 wet in the acid rain.
12-20:00. Took vitamins 3 times every ~3 hours.
20:00. Got a Common Cold.
Weather was ~18C all the day.
What else should I do to prevent a Common Cold in such circumstances? What does disease resistance perk do?[/quote]
Were you facing alcohol or drug withdrawal? As has been mentioned before withdrawal is currently bugged where it produces massive negative health drops, pretty much causing guaranteed sickness.
As for the actual code chance of you getting sick:
if (!has_disease("flu") && !has_disease("common_cold") &&
one_in(900 + 10 * health + (has_trait("DISRESISTANT") ? 300 : 0))) {
if (one_in(6))
infect("flu", bp_mouth, 3, rng(40000, 80000), g);
else
infect("common_cold", bp_mouth, 3, rng(20000, 60000), g);
}
So basically it rolls a 900 + 10 * health (+300 if you are disease resistant) sided die, and if you roll a one then it infects you with sickness (or at least tries to, mouth encumbrance is factored in). One out of 6 times it will be the flu, the other 5 will be colds.
The way the vitamins work is they give you +10 health, but they will never push you health stat higher then 10, regardless of how many you take (flu shots work the same way but are +100 with a cap of 100). This +10 bonus will reduce to zero in an average amount of time of approximately 13.4 hours or so (just off the top of my head, it’s been a while since I figured this out) so taking vitamins more often then that will reduce their maximum protection potential on average (due to the 10 cap) but provide some extra protection. If you’ve taken a flu shot or something else to raise your health stat above 10 (assuming you haven’t undergone drug withdrawal due to the bug) then taking vitamins is basically worthless. (For the +100 from flu shots the bonus will have reduced to zero in an average of ~3 days).