Difference between revisions of "Damage"

From Team Fortress Wiki
Jump to: navigation, search
m (Damage vulnerability, resistance and blocking)
m (Auto: (Content filters applied to links) (Review RC#3649465))
 
(124 intermediate revisions by 70 users not shown)
Line 1: Line 1:
 
[[Image:Heavypain.png|250px|right|Wehhhhhh!]]
 
[[Image:Heavypain.png|250px|right|Wehhhhhh!]]
 +
 
{{Quotation|'''The Soldier'''|Pain is weakness leaving the body!|sound=Soldier_jeers07.wav}}
 
{{Quotation|'''The Soldier'''|Pain is weakness leaving the body!|sound=Soldier_jeers07.wav}}
  
'''Damage''' in ''Team Fortress 2'' is any event that reduces the health of a player or entity. Damage can be caused by [[weapon]]s, [[fire]], [[explosion]]s, [[Fall damage|falling]], [[bleeding]], [[trains]], [[water]], [[saw blades]], and the [[Horseless Headless Horsemann]].
+
'''Damage''' is any event that reduces the [[health]] of a player or entity. Damage can come from a variety of sources, such as [[Hitscan|bullets]], [[Projectiles|explosions]], [[fire]], [[Fall damage|falling from a great height]], [[bleeding]], [[Taunts#Kill taunts|certain taunts]], or various [[Environmental death|environmental hazards]] (such as being struck by a [[train]], drowning in [[water]], or being sliced by a [[saw blade]]).
  
 
== Weapon damage ==
 
== Weapon damage ==
Damage from [[weapons]] is calculated in the following manner:
+
Damage dealt by [[weapons]] is calculated with the following formula:
 +
 
 +
{{blockquote|(Base Damage) × (Splash Modifier) × (Resistance/Vulnerability Modifiers) × (Distance Modifier)}}
 +
 
 +
Damage dealt by [[Critical hits]] uses the following formula instead:
 +
 
 +
{{blockquote|(Base Damage) × (Splash Modifier) × ((Base Type Resistance/Vulnerability Modifiers) + ({{Tooltip|Positive Distance-Modifier|Offsets damage that would be lost due to falloff}} + 2) × (Critical Resistance/Vulnerability Modifiers))}}
 +
 
 +
Damage dealt by [[Mini-Crit]]s uses the following formula instead:
 +
 
 +
{{blockquote|(Base Damage) × (Splash Modifier) × ((Base Type Resistance/Vulnerability Modifiers) + ({{Tooltip|Positive Distance-Modifier|Offsets damage that would be lost due to falloff, or is equal to 1.35 times the damage that would be gained due to rampup}} + 0.35) × (Critical Resistance/Vulnerability Modifiers))}}
  
{{blockquote|(Base Damage) × (Distance and Randomness Modifier) × (Splash Modifier) × (Self-damage Reduction)}}
+
=== Base damage ===
 +
A weapon's '''base damage''' is a fixed value used as a starting point for damage calculations.
  
[[Critical hit]]s are calculated as:
+
Certain weapons can have situational changes to their base damage:
 +
* The [[Equalizer]]'s base damage increases linearly as the wielder's current health decreases.
 +
* The [[Pyro]]'s various Flame Throwers (excluding the [[Dragon's Fury]]) deal 50% of base damage initially, reaching full damage after the same enemy has been attacked for 0.9 seconds.
 +
* The [[Axtinguisher]]'s base damage increases when striking a target suffering from [[afterburn]]. The magnitude of the damage increase depends on the afterburn's remaining duration.
 +
* If a [[Demoman]] is wielding the [[Eyelander]], the damage of the shield bash performed by the [[Chargin' Targe]], [[Splendid Screen]], and [[Tide Turner]] increases by 10% for each head collected (up to a maximum of a 50% increase).
 +
* The [[Quickiebomb Launcher]]'s stickybombs have increased base damage depending on how much a shot is charged.
 +
* The [[Heavy]]'s various Miniguns deal 50% of base damage initially, reaching full damage after they have been spun up for 1 second or more.
 +
* The [[Widowmaker]]'s base damage is increased by 10% against targets that are currently being targeted by the wielder's [[Sentry Gun]].
 +
* The [[Crusader's Crossbow]]'s base damage increases the further a shot travels (this is ''not'' just an inversion of the distance modifier, as this damage increase also applies to Critical hits, which typically do the same damage regardless of distance).
 +
* The [[Sniper]]'s various Sniper Rifles (as well as the [[Huntsman]]) have increased base damage depending on how much a shot is charged.
 +
* The [[Shahanshah]]'s base damage changes depending on if the wielder is above or below 50% of their maximum health.
 +
* The [[Enforcer]]'s base damage increases by 20% while the wielder is disguised.
 +
* The [[Atomizer]], [[Cow Mangler 5000]], [[Righteous Bison]], [[Homewrecker]], [[Neon Annihilator]], [[Loch-n-Load]], and [[Pomson 6000]] all have different base damage values depending on if they're attacking a player or a [[buildings|building]].
  
{{blockquote|(Base Damage) × (Splash Modifier) × (Critical Modifier)}}
+
=== Splash modifier ===
 +
The '''splash modifier''' is a number used for explosive weapons that do not connect directly with the target. Typically, an explosion deals its full damage at its center and half as much damage at the edge of the explosion's radius.
  
[[Mini-Crit]]s are calculated as:
+
For the sake of consistency, weapons that explode when they hit a player directly ignore any falloff from splash damage when calculating damage to the struck player.
  
{{blockquote|(Base Damage) × (Positive Distance Modifier) × (Randomness Modifier) × (Splash Modifier) × (Mini-Crit Modifier)}}
+
=== Resistance/vulnerability modifiers ===
 +
A player may have '''resistance''' or '''vulnerability''' to damage due to certain items. Most sources of damage resistance only apply to a certain "type" of damage. The following is a list of all damage types used in the game:
  
 +
*'''Bullet''' damage is typically associated with [[hitscan]] weapons, though the damage caused by most projectiles (such as syringes and arrows) also counts.
 +
*'''Explosive''' damage is typically associated with explosive [[projectiles]].
 +
*'''[[Fire]]''' damage is typically associated with both fire-based weapons and the afterburn they usually cause.
 +
*'''Melee''' damage is typically associated with melee weapons, as well as certain projectiles.
 +
*'''Critical''' damage is caused by Critical hits and Mini-Crits. Critical hits play distinctive sound effects and players killed by critical damage produce louder kill screams.
 +
*'''[[Bleeding|Bleed]]''' damage is caused by the bleeding status effect.
 +
*'''Fall''' damage is caused by hitting the ground at high speeds, as well as by the [[Mantreads]] and [[Thermal Thruster]] when landing on opponents.
 +
*'''Crush''' damage is caused by a player being sandwiched between two objects (such as between a closing door and the ground). Being killed by crush damage causes the screen to flash red.
 +
*'''Drowning''' damage is caused by a player being underwater for too long, resulting in damage over time and choking sound effects until the player either surfaces or dies.
  
=== Base damage ===
+
Some weapons can deal more than one damage type at once; for instance, the [[Cow Mangler 5000]]'s charged shot deals both explosive damage (from the explosion itself) and fire damage (from the afterburn it inflicts).
The base damage of a weapon is a constant number that is fixed to a particular weapon.  Damage does ''not'' depend on where on the target the attack hits, with the exception of weapons that [[Critical hit]] on certain regions of the target.
+
 
 +
Multiple sources of damage resistance stack multiplicatively; for example, a [[Soldier]] with the [[Pain Train]] (10% bullet damage vulnerability) and an active Battalion's Backup (50% resistance to damage inflicted by Sentry Guns) has an overall damage resistance of 45% against bullets fired by a Sentry Gun, as opposed to the 40% that would result from the percentages simply being added together.<!--Calculation: ( 1 + 0.1 ) * ( 1 - 0.5 ) = 1.1 * 0.5 = 0.55, and since this is damage taken, the resistance is 1 - 0.55 = 0.45-->
  
=== Distance and randomness modifier ===
+
Most explosive weapons deal less damage to the user than to enemies, depending on the situation. See the individual weapon pages for more information.
[[Image:Damagefalloff.png|400px|right|thumb|How damage is affected by distance.]]
 
The distance modifier is a number between 1.5 and 0.5 that sinusoidally decreases as the distance between the attacker and the target increases. At 1024 units is the trough of the wave, and all distances beyond 1024 are treated as 1024 for the purposes of damage calculation. In this formula, there is a random variation in the distance of ±102.4 units (shown in the graph around 512 units, as an example). This means that you may be treated as being up to 102.4 closer or farther than you actually are, for purposes of the formula. ''This is the 15% variation many players have heard of; it is not simply a 85&ndash;115% multiplier on the final damage.''
 
  
The base distance given to the formula is modified for [[Rocket Launcher]]s, [[Stickybomb Launcher]]s (when detonated within 5 seconds), and [[Syringe Gun]]s. When the distance between attacker and target is less than 512 units, it is instead treated as being ~74% ''closer'' to 512 units; that is, you are considered to be farther away than you actually are. The result of this is that the maximum damage you can have before random variation is 120% (shown by the maroon offshoot in the graph). In short, these three weapons gain less extra damage from the distance modifier at close range, but still suffer from the same long-range damage penalty as the other weapons.
+
{{List of damage vulnerability and resistance weapons|state=collapsed}}
  
[[Melee]] weapons, [[Flamethrower]]s, [[Flare Gun]]s, [[Grenade Launcher]]s, [[Sniper Rifle]]s, and [[Huntsman|Bows]] are all treated as being at 512 units for this formula. Flamethrowers, however, are affected by their own separately calculated distance modifier.
+
=== {{anchor|Distance and randomness modifier}} Distance modifier ===
 +
[[File:Damagefalloff.png|400px|right|thumb|How damage is affected by distance.]]
  
Weapons that fire [[projectiles]], like the [[Rocket Launcher]] and [[Direct Hit]], apply the distance modifier to damage based on the distance between the attacker and the target at the moment the projectile hits a target. This means that the point from which the projectile was fired from is irrelevant when considering damage dealt by that projectile, only the final position of the attacker and the target matter.
+
The '''distance modifier''' is a number between 1.5 and 0.5 that decreases as a [[w:Cubic function|cubic function]] as the distance between the attacker and the target increases. At a range of 512 [[hammer unit]]s, the distance modifier is 1, so weapons do 100% of their base damage. At a range of 0 Hammer units, weapons deal 150% of their base damage, while at a distance of 1024 Hammer units or further, weapons deal only 50% of their base damage.
  
;Notes
+
Weapons that fire [[projectiles]], such as the [[Rocket Launcher]], calculate the distance modifier based on the distance between the attacker and the target at the moment the projectile hits a target. This means that the point from which the projectile was ''fired'' is irrelevant when considering damage dealt by that projectile; only the final position of the attacker and the target matter. Similarly, the rockets fired by a level 3 Sentry Gun calculate the distance modifier based on the distance between the Sentry Gun's ''owner'' (not the Sentry Gun itself) and the target.
# The ±102.4-unit variation takes place ''after'' scaling for rocket launchers and other distance-modifying weapons.
 
# The final distance used in the formula (after random variation) cannot go above 1024 or below 0.
 
# On servers where random variation is disabled (with use of the server cvar "{{code|tf_damage_disablespread}}"), the effective distance used is 102.4 units less than the ''farthest possible random distance'' (that is, after being capped at 1024 units). This means that being farther than 921.6 units away is treated as being 921.6 units away; the normal cap is 1024, and 102.4 less than that is 921.6 units.
 
  
=== Splash modifier ===
+
The distance modifier is altered for Rocket Launchers, Stickybomb Launchers (when detonated within 5 seconds), Syringe Guns, the Righteous Bison, the Dragon's Fury, and the Pomson 6000. When the distance used in the formula is less than 512 Hammer units, the damage ramp is flattened (shown by the maroon offshoot in the graph). As a result, at a distance of 0 Hammer units, Rocket Launchers deal only 125% of their base damage, and Stickybomb Launchers, Syringe Guns, the Righteous Bison, the Dragon's Fury, and the Pomson 6000 deal only 120% of their base damage. Conversely, the distance modifier for the [[Scout]]'s primary weapons (excluding the [[Shortstop]]) is steepened at distances less than 512 Hammer units; at a distance of 0 Hammer units, these weapons deal 175% of their base damage. These weapons still use the normal ramp at distances greater than 512 Hammer units, and subsequently still have the same long-range damage reduction as other weapons.  
The splash modifier is a number used for explosive weapons that do not connect directly with the target. Valve has not released the official stats for the splash damage falloff yet.
 
  
=== Self-damage reduction ===
+
Melee weapons, Flare Guns, Grenade Launchers (excluding the [[Loose Cannon]]), stickybombs launched more than 5 seconds ago, [[Sniper Rifle]]s, the Huntsman, and the [[Flying Guillotine]] always have a distance modifier of 1, regardless of the actual distance to the target. Subsequently, these weapons will always deal the same amount of damage, regardless of distance to the target. The Crusader's Crossbow also has the same fixed distance modifier, but its actual base damage (''not'' the distance modifier) also scales inversely with distance to target, resulting in it doing more damage as distance increases.
Explosive weapons may deal less damage to the user than to enemies, depending on the situation. See the individual weapon pages for more information.
 
  
=== Critical modifier ===
+
[[Flame Thrower]]s ignore the regular distance modifier calculations entirely, and instead use their own separately calculated modifier based on projectile lifetime.
{{main|Critical hit}}
 
  
Critical hits and [[Mini-Crit]]s have two effects each. A Critical hit sets the ''distance and randomness'' modifier to 1 (effectively removing it). It then multiplies the final damage by 3.
+
All weapons use a distance modifier of 1 for attacks against buildings; as a result, buildings always take the same damage from attacks, regardless of the distance between the building and the attacker.
  
A [[Mini-Crit]] checks to see if the base distance is greater than 512: if it is, then it is treated as 512 for the purposes of the formula (shown as a blue dashed line in the image above) and then the ±102.4 modifier is applied. Whether it capped the distance or not, it then multiplies the final damage by 1.35. The end result is that the weapon does not lose damage when the player is more than 512 units away; if the attack were not critted or Mini-critted, damage would continue to decrease out to 1024 units.
+
On servers with the server cvar "{{code|tf_damage_disablespread}}" set to 0, the distance modifier for each attack is randomly adjusted by ±102.4 Hammer units (shown in the graph around 512 units, as an example). This results in a 15% variance in damage, including with weapons that are normally unaffected by distance (such as melee weapons).
  
'''Note:''' A [[Backstab]] deals 6 times the victim's current health rather than using a critical modifier.
+
On servers with the server cvar "{{code|tf_damage_disablespread}}" set to 1 (the default value used on official servers), the effective distance used for damage calculation is the distance that is 102.4 Hammer units less than the ''farthest possible random distance''. This means that being farther than 921.6 units away is treated as being 921.6 units away; the normal maximum distance is 1024, and 102.4 less than that is 921.6 units.
  
While active, the [[Battalion's Backup]] protects nearby team members from Critical hits, treating them as normal damage instead.
+
=== Critical hits ===
 +
{{main|Critical hits}}
  
=== Damage vulnerability, resistance and blocking ===
+
Critical hits and [[Mini-Crit]]s have two effects each.
  
A player may take a modified amount of damage due to certain items. These effects stack multiplicatively. "X% damage vulnerability" multiplies that kind of damage by 100% + X%, and "Y% damage resistance" multiplies that kind of damage by 100% - Y%. ''(For example, the Chargin' Targe grants 40% explosive damage resistance, which means all incoming explosive damage is multiplied by 60%).'' Because effects are stacked multiplicatively, combinations of effects result in a slightly different value than may be expected; for example a Soldier with the Tank Buster set (20% Sentry resistance), the Pain Train (10% bullet weakness), and an active Battalion's Backup (35% all damage resistance) has a combined resistance of 42.8% against Sentry bullets (as opposed to the 45% that would result in the effects being simply added together).
+
A Critical hit deals 3 times the ''base'' damage, while a Mini-Crit deals 1.35 times the damage following falloff compensation.
  
Some weapons or [[item sets]] imbue an effect which increases or decreases the damage received from certain types of weapons. These effect may either be applied as "on wearer" or "while active".
+
Both Critical hits and Mini-Crits check to see if the final distance is greater than 512 units: if it is, then any damage lost is offset by an equal increase in damage. The end result is that the weapon does not lose damage due to the distance modifier when the player is more than 512 units away; if the attack were not a Crit or Mini-Crit, the damage would continue to decrease out to 1024 units.
  
 +
The extra damage added on by Critical hits and Mini-Crits - including that from ramp-up or offsetting falloff - is of the "critical" type instead of the weapon's standard type (e.g. bullet or explosive). This affects the calculation of damage resistances.
  
{| class="wikitable grid"
+
'''Note:''' A [[backstab]] deals 2 times the victim's current health, but, under normal conditions, it also always Crits, increasing the damage to 6 times the victim's current health.
! class="header" width="20%" | Weapon / Item Set
 
! class="header" | Effect
 
|-
 
! {{item icon|Battalion's Backup|50x50px}}<br />[[Battalion's Backup]]
 
| {{Info}} When used, it provides a defensive buff to nearby team members that blocks 35% of incoming damage and blocks [[Critical Hits|critical damage]].
 
|-
 
! {{item icon|Bushwacka|50x50px}}<br />[[Bushwacka]]
 
| {{Con}} 20% [[fire]] damage vulnerability on wearer.
 
|-
 
! {{item icon|Candy Cane|50x50px}}<br />[[Candy Cane]]
 
| {{Con}} 25% [[Explosion#Explosions|Explosive]] damage vulnerability on wearer.
 
|-
 
! {{item icon|Chargin' Targe|50x50px}}<br />[[Chargin' Targe]]
 
| {{Pro}} 50% fire damage resistance on wearer.
 
{{Pro}} 40% [[Explosion#Explosions|explosive]] damage resistance on wearer.
 
|-
 
! {{item icon|Fists of Steel|50x50px}}<br />[[Fists of Steel]]
 
| {{Pro}} 40% damage resistance from ranged sources while active.
 
{{Con}} 100% damage vulnerability from melee sources while active.
 
  
{{Con}} -20% slower weapon switch.
+
While active, the [[Battalion's Backup]] protects team members from Critical hits and Mini-Crits, treating them as normal damage instead. The [[Vaccinator]]'s protective shield blocks 100% of critical damage from attacks of the selected type.
|-
 
! {{item icon|Pain Train|50x50px}}<br />[[Pain Train]]
 
| {{Con}} 10% [[bullet]] damage vulnerability on wearer.
 
|-
 
! {{item icon|Rocket Jumper|50x50px}}<br />[[Rocket Jumper]]
 
| {{Con}} 100% fire, explosive and bullet damage vulnerability on wearer.
 
|-
 
! {{item icon|Southern Hospitality|50x50px}}<br />[[Southern Hospitality]]
 
| {{Con}} 20% fire damage vulnerability on wearer.
 
|-
 
! {{item icon|Sticky Jumper|50x50px}}<br />[[Sticky Jumper]]
 
| {{Con}} 100% fire, explosive and bullet damage vulnerability on wearer.
 
|-
 
! {{item icon|Loch-n-Load|50x50px}}{{item icon|Ullapool Caber|50x50px}}<br />[[Item sets#Demoman|The Expert's Ordnance]]<br /><small>Item set</small>
 
| {{Pro}} 10% fire damage resistance on wearer.
 
|-
 
! {{item icon|Brass Beast|50x50px}}{{item icon|Buffalo Steak Sandvich|50x50px}}{{item icon|Warrior's Spirit|50x50px}}<br />[[Item sets#Heavy|The Hibernating Bear]]<br /><small>Item set</small>
 
| {{Pro}} 5% Critical hit damage resistance on wearer.
 
|-
 
! {{item icon|Degreaser}}{{item icon|Powerjack|50x50px}}{{item icon|Attendant|50x50px}}<br />[[Item sets#Pyro|The Gas Jockey's Gear]]<br /><small>Item set</small>
 
| {{Con}} 10% bullet vulnerability on wearer.
 
|-
 
! {{item icon|Black Box|50x50px}}{{item icon|Battalion's Backup|50x50px}}{{item icon|Grenadier's Softcap|50x50px}}<br />[[Item sets#Soldier|The Tank Buster]]<br /><small>Item set</small>
 
| {{Pro}} 20% [[Sentry Gun]] damage resistance on wearer.
 
|-
 
|}
 
  
 
== Update history ==
 
== Update history ==
 +
'''{{Patch name|12|17|2010}}''' ([[Australian Christmas]])
 +
* {{Undocumented}} Melee weapons no longer deal bullet damage.
  
'''[[December 17, 2010 Patch]]'''
+
'''{{Patch name|2|14|2011}}'''
* {{Undocumented}} Melee weapons no longer deal bullet damage
+
* {{Undocumented}} Melee weapons no longer count as bullet weapons when accounting for damage vulnerabilities.
  
'''[[February 14, 2011 Patch]]'''
+
'''{{Patch name|7|2|2015}} #1''' ([[Gun Mettle Update]])
* {{Undocumented}} Melee weapons no longer count as bullet weapons when accounting for damage vulnerabilities.
+
* Random damage spread is off by default (convar {{cvar|tf_damage_disablespread}}). Existing users will still use their currently set value.
 +
 
 +
'''{{Patch name|10|10|2024}}'''
 +
* Fixed the [[damage]] bonus attribute in Mann vs. Machine not scaling correctly for the [[Huntsman]]. (community fix from Marxvee).
  
 
== See also ==
 
== See also ==
Line 123: Line 114:
 
* [[Explosion]]
 
* [[Explosion]]
 
* [[Bleeding]]
 
* [[Bleeding]]
 +
* [[Environmental death]]
 +
 +
{{Mechanics Nav}}
  
 
[[Category:Gameplay]]
 
[[Category:Gameplay]]
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Latest revision as of 05:00, 13 October 2024

Wehhhhhh!
Pain is weakness leaving the body!
The Soldier

Damage is any event that reduces the health of a player or entity. Damage can come from a variety of sources, such as bullets, explosions, fire, falling from a great height, bleeding, certain taunts, or various environmental hazards (such as being struck by a train, drowning in water, or being sliced by a saw blade).

Weapon damage

Damage dealt by weapons is calculated with the following formula:

(Base Damage) × (Splash Modifier) × (Resistance/Vulnerability Modifiers) × (Distance Modifier)

Damage dealt by Critical hits uses the following formula instead:

(Base Damage) × (Splash Modifier) × ((Base Type Resistance/Vulnerability Modifiers) + (Positive Distance-Modifier + 2) × (Critical Resistance/Vulnerability Modifiers))

Damage dealt by Mini-Crits uses the following formula instead:

(Base Damage) × (Splash Modifier) × ((Base Type Resistance/Vulnerability Modifiers) + (Positive Distance-Modifier + 0.35) × (Critical Resistance/Vulnerability Modifiers))

Base damage

A weapon's base damage is a fixed value used as a starting point for damage calculations.

Certain weapons can have situational changes to their base damage:

  • The Equalizer's base damage increases linearly as the wielder's current health decreases.
  • The Pyro's various Flame Throwers (excluding the Dragon's Fury) deal 50% of base damage initially, reaching full damage after the same enemy has been attacked for 0.9 seconds.
  • The Axtinguisher's base damage increases when striking a target suffering from afterburn. The magnitude of the damage increase depends on the afterburn's remaining duration.
  • If a Demoman is wielding the Eyelander, the damage of the shield bash performed by the Chargin' Targe, Splendid Screen, and Tide Turner increases by 10% for each head collected (up to a maximum of a 50% increase).
  • The Quickiebomb Launcher's stickybombs have increased base damage depending on how much a shot is charged.
  • The Heavy's various Miniguns deal 50% of base damage initially, reaching full damage after they have been spun up for 1 second or more.
  • The Widowmaker's base damage is increased by 10% against targets that are currently being targeted by the wielder's Sentry Gun.
  • The Crusader's Crossbow's base damage increases the further a shot travels (this is not just an inversion of the distance modifier, as this damage increase also applies to Critical hits, which typically do the same damage regardless of distance).
  • The Sniper's various Sniper Rifles (as well as the Huntsman) have increased base damage depending on how much a shot is charged.
  • The Shahanshah's base damage changes depending on if the wielder is above or below 50% of their maximum health.
  • The Enforcer's base damage increases by 20% while the wielder is disguised.
  • The Atomizer, Cow Mangler 5000, Righteous Bison, Homewrecker, Neon Annihilator, Loch-n-Load, and Pomson 6000 all have different base damage values depending on if they're attacking a player or a building.

Splash modifier

The splash modifier is a number used for explosive weapons that do not connect directly with the target. Typically, an explosion deals its full damage at its center and half as much damage at the edge of the explosion's radius.

For the sake of consistency, weapons that explode when they hit a player directly ignore any falloff from splash damage when calculating damage to the struck player.

Resistance/vulnerability modifiers

A player may have resistance or vulnerability to damage due to certain items. Most sources of damage resistance only apply to a certain "type" of damage. The following is a list of all damage types used in the game:

  • Bullet damage is typically associated with hitscan weapons, though the damage caused by most projectiles (such as syringes and arrows) also counts.
  • Explosive damage is typically associated with explosive projectiles.
  • Fire damage is typically associated with both fire-based weapons and the afterburn they usually cause.
  • Melee damage is typically associated with melee weapons, as well as certain projectiles.
  • Critical damage is caused by Critical hits and Mini-Crits. Critical hits play distinctive sound effects and players killed by critical damage produce louder kill screams.
  • Bleed damage is caused by the bleeding status effect.
  • Fall damage is caused by hitting the ground at high speeds, as well as by the Mantreads and Thermal Thruster when landing on opponents.
  • Crush damage is caused by a player being sandwiched between two objects (such as between a closing door and the ground). Being killed by crush damage causes the screen to flash red.
  • Drowning damage is caused by a player being underwater for too long, resulting in damage over time and choking sound effects until the player either surfaces or dies.

Some weapons can deal more than one damage type at once; for instance, the Cow Mangler 5000's charged shot deals both explosive damage (from the explosion itself) and fire damage (from the afterburn it inflicts).

Multiple sources of damage resistance stack multiplicatively; for example, a Soldier with the Pain Train (10% bullet damage vulnerability) and an active Battalion's Backup (50% resistance to damage inflicted by Sentry Guns) has an overall damage resistance of 45% against bullets fired by a Sentry Gun, as opposed to the 40% that would result from the percentages simply being added together.

Most explosive weapons deal less damage to the user than to enemies, depending on the situation. See the individual weapon pages for more information.

Distance modifier

How damage is affected by distance.

The distance modifier is a number between 1.5 and 0.5 that decreases as a cubic function as the distance between the attacker and the target increases. At a range of 512 hammer units, the distance modifier is 1, so weapons do 100% of their base damage. At a range of 0 Hammer units, weapons deal 150% of their base damage, while at a distance of 1024 Hammer units or further, weapons deal only 50% of their base damage.

Weapons that fire projectiles, such as the Rocket Launcher, calculate the distance modifier based on the distance between the attacker and the target at the moment the projectile hits a target. This means that the point from which the projectile was fired is irrelevant when considering damage dealt by that projectile; only the final position of the attacker and the target matter. Similarly, the rockets fired by a level 3 Sentry Gun calculate the distance modifier based on the distance between the Sentry Gun's owner (not the Sentry Gun itself) and the target.

The distance modifier is altered for Rocket Launchers, Stickybomb Launchers (when detonated within 5 seconds), Syringe Guns, the Righteous Bison, the Dragon's Fury, and the Pomson 6000. When the distance used in the formula is less than 512 Hammer units, the damage ramp is flattened (shown by the maroon offshoot in the graph). As a result, at a distance of 0 Hammer units, Rocket Launchers deal only 125% of their base damage, and Stickybomb Launchers, Syringe Guns, the Righteous Bison, the Dragon's Fury, and the Pomson 6000 deal only 120% of their base damage. Conversely, the distance modifier for the Scout's primary weapons (excluding the Shortstop) is steepened at distances less than 512 Hammer units; at a distance of 0 Hammer units, these weapons deal 175% of their base damage. These weapons still use the normal ramp at distances greater than 512 Hammer units, and subsequently still have the same long-range damage reduction as other weapons.

Melee weapons, Flare Guns, Grenade Launchers (excluding the Loose Cannon), stickybombs launched more than 5 seconds ago, Sniper Rifles, the Huntsman, and the Flying Guillotine always have a distance modifier of 1, regardless of the actual distance to the target. Subsequently, these weapons will always deal the same amount of damage, regardless of distance to the target. The Crusader's Crossbow also has the same fixed distance modifier, but its actual base damage (not the distance modifier) also scales inversely with distance to target, resulting in it doing more damage as distance increases.

Flame Throwers ignore the regular distance modifier calculations entirely, and instead use their own separately calculated modifier based on projectile lifetime.

All weapons use a distance modifier of 1 for attacks against buildings; as a result, buildings always take the same damage from attacks, regardless of the distance between the building and the attacker.

On servers with the server cvar "tf_damage_disablespread" set to 0, the distance modifier for each attack is randomly adjusted by ±102.4 Hammer units (shown in the graph around 512 units, as an example). This results in a 15% variance in damage, including with weapons that are normally unaffected by distance (such as melee weapons).

On servers with the server cvar "tf_damage_disablespread" set to 1 (the default value used on official servers), the effective distance used for damage calculation is the distance that is 102.4 Hammer units less than the farthest possible random distance. This means that being farther than 921.6 units away is treated as being 921.6 units away; the normal maximum distance is 1024, and 102.4 less than that is 921.6 units.

Critical hits

Main article: Critical hits

Critical hits and Mini-Crits have two effects each.

A Critical hit deals 3 times the base damage, while a Mini-Crit deals 1.35 times the damage following falloff compensation.

Both Critical hits and Mini-Crits check to see if the final distance is greater than 512 units: if it is, then any damage lost is offset by an equal increase in damage. The end result is that the weapon does not lose damage due to the distance modifier when the player is more than 512 units away; if the attack were not a Crit or Mini-Crit, the damage would continue to decrease out to 1024 units.

The extra damage added on by Critical hits and Mini-Crits - including that from ramp-up or offsetting falloff - is of the "critical" type instead of the weapon's standard type (e.g. bullet or explosive). This affects the calculation of damage resistances.

Note: A backstab deals 2 times the victim's current health, but, under normal conditions, it also always Crits, increasing the damage to 6 times the victim's current health.

While active, the Battalion's Backup protects team members from Critical hits and Mini-Crits, treating them as normal damage instead. The Vaccinator's protective shield blocks 100% of critical damage from attacks of the selected type.

Update history

December 17, 2010 Patch (Australian Christmas)

  • [Undocumented] Melee weapons no longer deal bullet damage.

February 14, 2011 Patch

  • [Undocumented] Melee weapons no longer count as bullet weapons when accounting for damage vulnerabilities.

July 2, 2015 Patch #1 (Gun Mettle Update)

  • Random damage spread is off by default (convar tf_damage_disablespread). Existing users will still use their currently set value.

October 10, 2024 Patch

  • Fixed the damage bonus attribute in Mann vs. Machine not scaling correctly for the Huntsman. (community fix from Marxvee).

See also