Weapon Damage Formula
Revision as of 14:34, 24 December 2008 by imported>SnakeChomp (Add information about critical hit damage)
Variables
- Weapon damage listed on the weapon form = D
- Weapon crit damage listed on the weapon form = CritD
- fDamageWeaponMult = DM
- fDamageSkillBase = SB
- fDamageSkillMult = SM
- Actor skill with the given weapon = S
- This value is 10 with 100 skill, 9 with 90 skill, and etc
- Weapon condition = C
- 100% condition gives a value of 1, 90% a value of 0.9, etc
- fDamageGunWeapCondMult = GunCM
- fDamageGunWeapCondBase = GunCB
- fDamageMeleeWeapCondMult = MeleeCM
- fDamageMeleeWeapCondBase = MeleeCB
- fAVDMeleeDamageStrengthMult = StrM
- Actor strength value = Str
- IsCriticalHit
- This value is 1 if the attack was a critical hit, 0 otherwise
- All perks with a "Calculate weapon damage" entry point = PerkModifiers(x) => y
- Note that consumables which increase damage, such as the Yao Guai Meat, are implemented by adding a perk to the actor which has a "Calculate weapon damage" entry point for the duration of the effect.
- All perks with a "Calculate my critical hit damage" entry point = PerkCritModifiers(x) => y
Gun Formula
Gun Damage = IsCriticalHit * PerkCritModifiers(CritD) + PerkModifiers(DM * (GunCB + (GunCM * C)) * (D * SB + S * SM))
Melee Formula
Melee Damage = IsCriticalHit * PerkCritModifiers(CritD) + PerkModifiers((StrM * (Str + StrB)) + DM * (MeleeCB + (MeleeCM * C)) * (D * SB + S * SM))
Unarmed Formula
To be determined
Notes
If the value returned by PerkModifiers is 0, the game engine considers the attack to have missed. No blood spatter is made, no hit sound effect is played, and the attack cannot critically hit, even if the critical hit chance is 100% or more.