That sounds good to me, but...
(dmg / (getav (100 - DamageResist) / 100) - dmg)
could be expressed as
Absorbed Damage = (dmg * 100/ player damage resistance) - dmg
Yeah, that's better
Actually, looking at the GECK wiki, I'm confused how DR is applied to weapon damage. It says here (http://geck.gamesas.com/index.php/Weapon_Damage_Formula) that:
DamageAbsorbedByArmor = fArmorRatingBase * ArmorRatingValue * fArmorRatingMult * (ArmorRatingConditionBase * ArmorCondition * fArmorRatingConditionMult)
DamageAbsorbedByArmor is then subtracted from weapon damage. So is DR normally applied to weapon damage as a percentage, or is it subtracted from weapon damage as a set amount?
ie. If I'm wearing power armor, and someone is shooting at me with a worn BB gun, do I take a small amount of damage, or none at all?
EDIT- Just did a search in the forums and read the thread regarding DR and also the discussion on the GECK wiki. Still not clear. Does armor apply to melee weapons? It's not in the formula.