Damage resistance calculation

Post » Tue Nov 30, 2010 5:35 am

Hi, just have a quick question regarding damage resistance calculation, if I want to nullify damage resistance on the player, and I'm monitoring the player's damage via a script, can I do something like this? (dmg = prior frame health - current frame health, and dmg > 0)

player.damageav health (dmg / (getav (100 - DamageResist) / 100) - dmg)

Or is the damage resistance more complicated than this? (I know this won't take poison/fire damage into consideration properly)

Thanks!
User avatar
Alexxxxxx
 
Posts: 3417
Joined: Mon Jul 31, 2006 10:55 am

Post » Tue Nov 30, 2010 1:07 am

That sounds good to me, but...

(dmg / (getav (100 - DamageResist) / 100) - dmg)

could be expressed as

Absorbed Damage = (dmg * 100/ player damage resistance) - dmg
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm

Post » Mon Nov 29, 2010 3:57 pm

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.
User avatar
Captian Caveman
 
Posts: 3410
Joined: Thu Sep 20, 2007 5:36 am

Post » Mon Nov 29, 2010 6:12 pm

I could be wrong, and this may be an oversimplification, but I believe that the value stored in the player's DR value already takes this into account as that value changes as the armor degrades. And, yes, there is no threshold amount (though there should be) so you will take some percentage of damage no mater the weapon, even a crappy BB gun.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Mon Nov 29, 2010 11:02 pm

I've done a fair amount of testing, and the GECK wiki is wrong as far as I can tell. DR negates that percentage of damage. If you have 50 DR and get hit for 60 damage, you'll take 30 points of damage.
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Tue Nov 30, 2010 5:54 am

Oh my god. After having worked on an AP script for ages trying to mimic the weapon damage formula, I can just see the damage taken in between frames? Frustrating, but it might have made my life a lot easier. The only constructive input I have based on the theme is yes, player/mob DR already takes into account the whole formula and acts as a percentage reducer, but apart from that, thanks for the insight.
User avatar
Sheila Reyes
 
Posts: 3386
Joined: Thu Dec 28, 2006 7:40 am

Post » Tue Nov 30, 2010 6:01 am

Thanks all. I did some tests earlier as well, and true to everyone's findings it's pretty much a strict percentage reduction of the damage.
User avatar
john page
 
Posts: 3401
Joined: Thu May 31, 2007 10:52 pm


Return to Fallout 3