Smoke & Rain Protection

How are those two determined?

It’s going in the wiki.

Rain by roofs. Smoke I think be a combination of roofs and walls, along with clothing.

I’m entirely concerned with clothing- what’s the threshold for protection from drizzles, rain, smoke inhalation.

something that would be cool would perhaps be some clothing protecting for a short while, such as “spill resistant” clothing or those with decent repulsive force, then later getting soaked and no longer negating a portion of the rain. Raincoats get soaked eventually, and even the nylon in umbrellas can be

For clothing I think it is just a tag or warmth. I know for wet it was a warmth dependent thing, for smoke i think it is a tag.

If smoke inhalation is a tag, does that mean mouth EP doesn’t matter?

Where does it draw the line for warmth? I’m under the impression it’s 60 for rain and 30 for drizzle.

Best bet, dig the code.

Here’s the equations for getting wet (for those not too code savvy || means “or”, && means “and”, and ! means “not” [so != means “not equal to”]. The “one_in(X)” function just means a one in X chance of being true):

Light wet (drizzles)

if ((!g->u.is_wearing("coat_rain") || one_in(50)) && (!g->u.weapon.has_flag("RAIN_PROTECT") || one_in(10)) && !g->u.has_trait("FEATHERS") && (g->u.warmth(bp_torso) * 4/5 + g->u.warmth(bp_head) / 5) < 30 && PLAYER_OUTSIDE && one_in(2)) { g->u.drench(g, 30 - (g->u.warmth(bp_torso) * 4/5 + g->u.warmth(bp_head) / 5), mfb(bp_torso)|mfb(bp_arms)|mfb(bp_head)); }
Very wet things (rain/storms)

if ((!g->u.is_wearing("coat_rain") || one_in(25)) && (!g->u.weapon.has_flag("RAIN_PROTECT") || one_in(5)) && !g->u.has_trait("FEATHERS") && (g->u.warmth(bp_torso) * 4/5 + g->u.warmth(bp_head) / 5) < 60 && PLAYER_OUTSIDE) { g->u.drench(g, 60 - (g->u.warmth(bp_torso) * 4/5 + g->u.warmth(bp_head) / 5), mfb(bp_torso)|mfb(bp_arms)|mfb(bp_head)); }
The drench() function then modifies the morale bonus/penalty you receive based on your mutations and clothing on a body part specific basis.

The equations for the morale cap (tot_xxxx all are mutation based, saturation = the first number argument of drench(), “wants_drench” is true if you have all waterproof/water friendly clothing on a body part):

[code] if (wants_drench) {
morale_cap = g->get_temperature() - std::min(65, 65 + (tot_ignored - tot_good) / 2) * saturation / 100;
} else {
morale_cap = -(saturation / 2);
}

// Good increases pos and cancels neg, neut cancels neg, ignored cancels both
if (morale_cap > 0) {
    morale_cap = morale_cap * (effected - tot_ignored + tot_good) / effected;
} else if (morale_cap < 0) {
    morale_cap = morale_cap * (effected - tot_ignored - tot_neut - tot_good) / effected;
}[/code]

The amount your morale changes with each time you get wet is then calculated as:

int morale_effect = morale_cap / 8; if (morale_effect == 0) { if (morale_cap > 0) { morale_effect = 1; } else { morale_effect = -1; } }

[hr]
[hr]
Smoke, on the other hand, is much simpler.

  1. If the smoke density is 1 it does a 50/50, with it stopping right here 50% of the time and proceeding on to 2 the other 50%.
  2. It rolls either 1d3, 2d3, or 4d3, for smoke densities of 1, 2, and 3 respectively.
  3. It rolls Xd3 dice, where ‘X’ is the amount of environmental protection you have on your mouth.
  4. If the first roll is greater then the protection roll if infects you with the smoke disease for 2/7/15 turns depending on smoke density.

So it seems like it’s torsowarmth * .8 + headgearwarmth * .2, and it seems to set the threshold at 30 for drizzle & 60 for rain.

But I’m not sure how the arms factor in, nor other appendages and their warmth/waterproof/friendly.

Given that you’re dividing by 8 in that last bit, it seems as though every body part is counted somehow too.

This might be difficult to put in the wiki.

Smoke seems straight forward enough
Many thanks!

If it’s raining on you then the only thing arms do is determine waterproof/water friendly status and mutations on them will add to your tot_ignored/neut/good values. The reason why it seems like we are a little more generic is because the drench() function is called anytime you get wet, be it from rain, walking in the water, or swimming; it’s just that rain only is affecting you through your head/torso/arms.

As for the dividing by 8, That doesn’t have anything to do with bodyparts, it’s just that way because it produces a growth that is fast enough to grow fairly quickly, while not applying the entire morale bonus/penalty at once. The basic idea was so that if it was raining on you and you had a happy upper body (producing a +1 or so bonus per turn) and walking in water with a bad lower body (producing a -1 or so penalty per turn) they wouldn’t just cancel out and your penalty/bonus would slowly move towards the greater of the two.

Mk, so if I get this straight, if one is wearing a waterproof torso/arm piece and a water-friendly helmet, you wouldn’t be affected by rain/drizzle?

Does Tot_ignored and the like only include parts which are affected, or would swimming booties help combat drizzles?

Did some sciencing.

Being naked while standing in drizzle, rain, thunderstorm, or lightning storm will give you a morale bonus. Being naked while swimming gives you a morale bonus. Using water friendly preserves this bonus.

Basically, if you’re going to get wet, rain or swimming, wear either waterfriendly gear or nothing at all. Rain checks your head and torso. Wear water friendly clothes on those body parts or alternatively get head/torso warmth to 50 to completely neutralize the affects. If you go wading through shallow water, your legs and feet are the only body parts checked for friendliness, except this time, raising warmth won’t help you. If you go into deep water the wetness seems to upset you no matter you’re wearing.

Waterproofing only works if you can get ALL checked bodyparts covered in waterproof. Otherwise, the waterproof item will behave like normal clothing. Seeing as how there’s no waterproof helmet, save for power armor, raincoats are actually pretty stupid right now. On the bright side, fishing waders are an ideal solution for shallow water, second to swimming booties + trunks, of course.

So, to answer your question, no, swimming booties do not combat drizzles. They let you keep your morale bonus if you’re swimming though, which makes them unique(?) among footwear

I really hope this makes sense because my brain hurts now.

The rain hood is a waterproof head item. Use it.

Here’s my reasoning on the waterproof torso:

First, it fails the ‘not wearing raincoat/umbrella/warmth<60’ check

At that point it reverts to a morale penalty equation and calculates with the torso, arms, & head.

If one is wearing a waterproof torso/arm article, (like, say, a survivor suit), those parts no longer count in the equation.

Couple that with a water-friendly helm, (just about any), and that should negate the effects of rain.

The raincoat is checked separately, and the fact it’s counted as waterproof is just fluff. If you’re wearing a raincoat, you only have a 2% chance of getting ‘wet’ at any time.

That’s my interpretation at least.

Correct.

Note that this “bonus” is dependent on temperature. Assuming you don’t have any mutations to modify it, once it gets under 65F then it will become a penalty rather than a bonus.

On that note mutations can stack and have some pretty serious effects on the morale bonus. For most it’s not too much, but you might want to check out the slimy mutation; it will turn pretty much any sort of wet penalty into a long-lasting very big morale bonus.

Sounds a tiny bit OP. Although, all players of this game (myself included) do idiotic things.

Rain hood, at least in the experimental.

Water-friendly should have the same effect as water-proof in this situation, and just about any helmet worth it’s salt is water-friendly.

I think there are more helmets out there that are water-proof then water-friendly. I mean sure they are resistant to rain, but for a lot of them they aren’t that comfortable to wear if the inside lining of the helmet itself gets too wet.

Nono I meant helmets that are in-game. Things like tactical helmets have the water-friendly tag, so they should suffice as far as wet-proofing the head goes.

Also, are these values for how wetness is determined part of .8 or is it in the experimental build only?