Difference between revisions of "Weapon Damage Formula"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>SnakeChomp
(Note on sneak attack variables)
imported>Henning
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Variables ===
__NOTOC__
;Weapon damage listed on the [[Weapons|weapon form]] = D
{{Incomplete}}


;Weapon crit damage listed on the [[Weapons|weapon form]] = CritD
Gun Damage = (PerkModifiers(BaseWeaponDamage * DamageMultiplier * GunConditionPenalty * SkillBonus) + CriticalDamageBonus) - DamageAbsorbedByArmor


;[[fDamageWeaponMult]] = DM
Melee Damage = PerkModifiers(BaseWeaponDamage * DamageMultiplier * MeleeConditionPenalty * SkillBonus + MeleeDamageActorValue + MeleeArmConditionPenalty) + CriticalDamageBonus


;[[fDamageSkillBase]] = SB
Unarmed Damage = ''Formula unknown at this time''


;[[fDamageSkillMult]] = SM
'''PerkModifiers''' is a function that modifies the input value using any perks active on the actor that have a "Calculate Weapon Damage" [[Entry Point]] and returns the result. '''Note:''' consumables which increase damage, such as 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.


;Actor skill with the given weapon = S
'''BaseWeaponDamage''' is specified on the [[Weapons|weapon form]].
:This value is 10 with 100 skill, 9 with 90 skill, and etc


;Weapon condition = C
'''DamageMultiplier''' = fDamageWeaponMult
:100% condition gives a value of 1, 90% a value of 0.9, etc


;[[fDamageGunWeapCondMult]] = GunCM
'''DamageAbsorbedByArmor''' = fArmorRatingBase * ''ArmorRatingValue'' * fArmorRatingMult * (ArmorRatingConditionBase * ''ArmorCondition'' * fArmorRatingConditionMult)


;[[fDamageGunWeapCondBase]] = GunCB
'''GunConditionPenalty''' = fDamageGunWeapCondBase + fDamageGunWeapCondMult * ''WeaponCondition''


;[[fDamageMeleeWeapCondMult]] = MeleeCM
'''MeleeConditionPenalty''' = fDamageMeleeWeapCondBase + fDamageMeleeWeapCondMult * ''WeaponCondition''


;[[fDamageMeleeWeapCondBase]] = MeleeCB
'''SkillBonus''' = fDamageSkillBase + fDamageSkillMult * ''ActorSkillValue'' / 100


;[[fAVDMeleeDamageStrengthMult]] = StrM
'''MeleeDamageActorValue''' is an [[ActorValue]]. The base value = fAVDMeleeDamageStrengthMult * (fAVDMeleeDamageStrengthOffset + ''ActorStrengthValue'')
:The value of the MeleeDamage actor value can be increased or decreased by certain abilities, effects, perks, enchanted armors, and consumables. For example, the "Takoma Park Little Leaguer Cap" has an enchantment which increases melee damage by 5 while a baseball bat is equipped. Wearing this cap while equiping a baseball bat would mean that the base value calculated from strength is further increased by 5.


;[[fAVDMeleeDamageStrengthOffset]] = StrB
'''MeleeArmConditionPenalty''' = BaseWeaponDamage * (fDamageArmConditionBase - 1 + fDamageArmConditionMult * ''ArmCondition'') / 2
:With default values, this term reduces melee damage dealt by (up to) 10% of base weapon damage when arms are crippled and does nothing when arms are healthy.


;Actor strength value = Str
'''CriticalDamageBonus''' = PerkCritModifiers(CritDamage) * ''IsCriticalHit''
:*'''PerkCritModifiers''' is a function that modifies the input value using any perks active on the actor that have a "Calculate My Critical Hit Damage" [[Entry Point]] and returns the result.
:*'''CritDamage''' is the "Crit Dmg" value on the [[Weapons|weapon form]]


;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
''WeaponCondition'' is 1 at 100% condition, 0.5 at 50% condition, and etc.
: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
''ActorSkillValue'' is the actor's skill value with the weapon.


=== Gun Formula ===
''ActorStrengthValue'' is the actor's strength value.
Gun Damage = IsCriticalHit * PerkCritModifiers(CritD) + PerkModifiers(DM * (GunCB + (GunCM * C)) * (D * SB + S * SM))


=== Melee Formula ===
''ArmCondition'' is the condition of the actor's arm.
Melee Damage = IsCriticalHit * PerkCritModifiers(CritD) + PerkModifiers((StrM * (Str + StrB)) + DM * (MeleeCB + (MeleeCM * C)) * (D * SB + S * SM))
:*When using a one handed weapon, ''ArmCondition'' is 1 with a healthy right arm and 0 with a crippled right arm.
:*When using a two handed weapon, ''ArmCondition'' is 1 with both arms healthy, 0.5 with 1 arm crippled, 0 with two arms crippled.


=== Unarmed Formula ===
''IsCriticalHit'' is 1 if the attack was a critical hit, 0 otherwise. See also the [[Critical Hit Chance Formula]].
To be determined
 
=== Game settings used in these formulas ===
 
{{SettingGroupHeader}}
{{SettingGroupSetting
|Name = fDamageWeaponMult
|Default = 1
|Description = Scales base weapon damage in the damage formulas.
}}
{{SettingGroupSetting
|Name = fDamageGunWeapCondMult
|Default = 0.34
|Description = Used to calculate ''GunConditionPenalty''
}}
{{SettingGroupSetting
|Name = fDamageGunWeapCondBase
|Default = 0.66
|Description = Used to calculate ''GunConditionPenalty''
}}
{{SettingGroupSetting
|Name = fDamageMeleeWeapCondMult
|Default = 0.5
|Description = Used to calculate ''MeleeConditionPenalty''
}}
{{SettingGroupSetting
|Name = fDamageMeleeWeapCondBase
|Default = 0.5
|Description = Used to calculate ''MeleeConditionPenalty''
}}
{{SettingGroupSetting
|Name = fDamageSkillBase
|Default = 0.5
|Description = Used to calculate ''SkillBonus''
}}
{{SettingGroupSetting
|Name = fDamageSkillMult
|Default = 0.5
|Description = Used to calculate ''SkillBonus''
}}
{{SettingGroupSetting
|Name = fAVDMeleeDamageStrengthMult
|Default = 0.5
|Description = Used to calculate ''MeleeDamageActorValue''
}}
{{SettingGroupSetting
|Name = fAVDMeleeDamageStrengthOffset
|Default = 0
|Description = Used to calculate ''MeleeDamageActorValue''
}}
{{SettingGroupSetting
|Name = fDamageArmConditionBase
|Default = 0.2
|Description = Used to calculate ''MeleeArmConditionPenalty''
}}
{{SettingGroupSetting
|Name = fDamageArmConditionMult
|Default = 0.8
|Description = Used to calculate ''MeleeArmConditionPenalty''
}}
{{SettingGroupFooter}}
 
=== Critical hit damage ===
 
The critical hit bonus damage is special: it ignores the actor's damage resistance. Even if the attack would have done 0 or nearly 0 damage due to damage resistance, the critical hit damage will hit for full affect.


=== Notes ===
=== 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.
If weapon damage is calculated to be 0 before being modified by perks, the game engine considers the attack to have missed, even if the bullet physically impacts an actor. No blood spatter is made, no hit sound effect is played, and the attack cannot be a critical hit, even if the critical hit chance is 100% or more. However, if weapon damage is modified to be zero by a perk, the attack still has a chance to critically hit and any critical hits will do bonus damage.


=== Sneak damage ===
=== Sneak attack damage ===
It is currently unknown how sneak damage modifiers are applied to the damage formula. The variables involved appear to be:
It is currently unknown how sneak damage modifiers are applied to the damage formula. Further research is needed. The variables involved appear to be:


*[[fCombatDamageBonusSneakingMult]]
*[[fCombatDamageBonusSneakingMult]]
*fCombatDamageBonusMeleeSneakingMult
*fCombatDamageBonusMeleeSneakingMult
*fDamageSneakAttackMult
*fDamageSneakAttackMult

Latest revision as of 18:52, 12 July 2009


This article is incomplete. You can help by filling in any blank descriptions.
Further information might be found in a section of the discussion page. Please remove this message when no longer necessary.
Gun Damage = (PerkModifiers(BaseWeaponDamage * DamageMultiplier * GunConditionPenalty * SkillBonus) + CriticalDamageBonus) - DamageAbsorbedByArmor
Melee Damage = PerkModifiers(BaseWeaponDamage * DamageMultiplier * MeleeConditionPenalty * SkillBonus + MeleeDamageActorValue + MeleeArmConditionPenalty) + CriticalDamageBonus
Unarmed Damage = Formula unknown at this time

PerkModifiers is a function that modifies the input value using any perks active on the actor that have a "Calculate Weapon Damage" Entry Point and returns the result. Note: consumables which increase damage, such as 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.

BaseWeaponDamage is specified on the weapon form.

DamageMultiplier = fDamageWeaponMult

DamageAbsorbedByArmor = fArmorRatingBase * ArmorRatingValue * fArmorRatingMult * (ArmorRatingConditionBase * ArmorCondition * fArmorRatingConditionMult)

GunConditionPenalty = fDamageGunWeapCondBase + fDamageGunWeapCondMult * WeaponCondition

MeleeConditionPenalty = fDamageMeleeWeapCondBase + fDamageMeleeWeapCondMult * WeaponCondition

SkillBonus = fDamageSkillBase + fDamageSkillMult * ActorSkillValue / 100

MeleeDamageActorValue is an ActorValue. The base value = fAVDMeleeDamageStrengthMult * (fAVDMeleeDamageStrengthOffset + ActorStrengthValue)

The value of the MeleeDamage actor value can be increased or decreased by certain abilities, effects, perks, enchanted armors, and consumables. For example, the "Takoma Park Little Leaguer Cap" has an enchantment which increases melee damage by 5 while a baseball bat is equipped. Wearing this cap while equiping a baseball bat would mean that the base value calculated from strength is further increased by 5.

MeleeArmConditionPenalty = BaseWeaponDamage * (fDamageArmConditionBase - 1 + fDamageArmConditionMult * ArmCondition) / 2

With default values, this term reduces melee damage dealt by (up to) 10% of base weapon damage when arms are crippled and does nothing when arms are healthy.

CriticalDamageBonus = PerkCritModifiers(CritDamage) * IsCriticalHit

  • PerkCritModifiers is a function that modifies the input value using any perks active on the actor that have a "Calculate My Critical Hit Damage" Entry Point and returns the result.
  • CritDamage is the "Crit Dmg" value on the weapon form


WeaponCondition is 1 at 100% condition, 0.5 at 50% condition, and etc.

ActorSkillValue is the actor's skill value with the weapon.

ActorStrengthValue is the actor's strength value.

ArmCondition is the condition of the actor's arm.

  • When using a one handed weapon, ArmCondition is 1 with a healthy right arm and 0 with a crippled right arm.
  • When using a two handed weapon, ArmCondition is 1 with both arms healthy, 0.5 with 1 arm crippled, 0 with two arms crippled.

IsCriticalHit is 1 if the attack was a critical hit, 0 otherwise. See also the Critical Hit Chance Formula.

Game settings used in these formulas[edit | edit source]

Setting Default Description
fDamageWeaponMult 1 Scales base weapon damage in the damage formulas.
fDamageGunWeapCondMult 0.34 Used to calculate GunConditionPenalty
fDamageGunWeapCondBase 0.66 Used to calculate GunConditionPenalty
fDamageMeleeWeapCondMult 0.5 Used to calculate MeleeConditionPenalty
fDamageMeleeWeapCondBase 0.5 Used to calculate MeleeConditionPenalty
fDamageSkillBase 0.5 Used to calculate SkillBonus
fDamageSkillMult 0.5 Used to calculate SkillBonus
fAVDMeleeDamageStrengthMult 0.5 Used to calculate MeleeDamageActorValue
fAVDMeleeDamageStrengthOffset 0 Used to calculate MeleeDamageActorValue
fDamageArmConditionBase 0.2 Used to calculate MeleeArmConditionPenalty
fDamageArmConditionMult 0.8 Used to calculate MeleeArmConditionPenalty


Critical hit damage[edit | edit source]

The critical hit bonus damage is special: it ignores the actor's damage resistance. Even if the attack would have done 0 or nearly 0 damage due to damage resistance, the critical hit damage will hit for full affect.

Notes[edit | edit source]

If weapon damage is calculated to be 0 before being modified by perks, the game engine considers the attack to have missed, even if the bullet physically impacts an actor. No blood spatter is made, no hit sound effect is played, and the attack cannot be a critical hit, even if the critical hit chance is 100% or more. However, if weapon damage is modified to be zero by a perk, the attack still has a chance to critically hit and any critical hits will do bonus damage.

Sneak attack damage[edit | edit source]

It is currently unknown how sneak damage modifiers are applied to the damage formula. Further research is needed. The variables involved appear to be: