I think the wiki is wrong about armor calculations

Started by CarbonBasedAlgorithm, December 20, 2023, 09:22:10 AM

Previous topic - Next topic

CarbonBasedAlgorithm

On the wiki's apparel page which goes into detail on armor mechanics, it states:

1) "The effective armor rating is then compared against a random number from 0 to 100"
2) "If the random number is under half the armor rating, the damage deflects harmlessly."
3) "at 200% effective armor rating, colonists will be completely immune to damage; this currently works only on heat damage which lacks armor penetration, and can be seen on mechanoids."

All 3 of these cannot be true. With 200 armor, a random roll of 100 would not be deflected because 100 is not "under half" of 200. It is exactly half of 200. There are at least 3 solutions:

1) 200% effective armor doesn't actually result in complete immunity to damage. Mechs DO seem to be completely immune to fire, so unless there's some other mechanic making them immune, this can't be it.
2) The second statement should actually be "If the random number is equal to or under half the armor rating, the damage deflects harmlessly." This however would imply that an armor of 0 could deflect things on a random number roll of 0, which doesn't feel right and I've never observed it in game.
3) The random number is actually 0-99 (or maybe 1-99). This is my guess.

Or something else I'm not realizing. I followed the wiki's instructions on decompiling the source code but I can't find where these calculations are done. Does anyone have the answer? Or just where I can find an answer in the source code? (I'd somewhat prefer the latter, because there are other things related to armor and damage calculations I want to look into).