Damage in Team Fortress 2 is any event that reduces the health of a player or entity. Damage can be caused by weapons, fire, explosions, falling, bleeding, certain taunts, or by environmental sources such as trains, water, saw blades, the Horseless Headless Horsemann, MONOCULUS, Merasmus, and the Underworld.
Weapon damage is calculated in the following manner:
Critical hits are calculated as:
Mini-crits are calculated as:
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.
Distance and randomness modifier
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. The trough of the wave is at 1024 units, 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 ±153.6 units (shown in the graph around 512 units, as an example). This means that you may be treated as being up to 153.6 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–115% multiplier on the final damage.
The base distance given to the formula is modified for Rocket Launchers, Stickybomb Launchers (when detonated within 5 seconds), and Syringe Guns. When the distance between the 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.
Conversely, the distance modifier for the Scout's primary weapons (excluding the Shortstop) have an increased damage ramp at close range, maximising at 175% normal damage at point blank, but keep the same default damage ramp at ranges of 512 or greater.
Sticky bombs launched more than 5 seconds ago, Melee weapons, Flamethrowers, Flare Guns, Grenade Launchers, Sniper Rifles, and bows are all treated as being at 512 units for this formula. Flamethrowers, however, are affected by their own separately calculated distance modifier.
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 is irrelevant when considering damage dealt by that projectile; only the final position of the attacker and the target matter.
- The ±153.6-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 "
tf_damage_disablespread"), the effective distance used is 153.6 units less than the farthest possible random distance (that is, after being capped at 1024 units). This means that being farther than 870.4 units away is treated as being 870.4 units away; the normal cap is 1024, and 153.6 less than that is 870.4 units.
- The distance modifier is always 1.0 if either the attacker or the target is a building.
- However, a level 3 Sentry Gun's rockets are affected by the distance modifier based on the distance from the target to the Sentry Gun's owner.
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.
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 hits and mini-crits 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.
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 ±153.6 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 a crit or mini-crit, damage would continue to decrease out to 1024 units.
The extra damage added on by critical hits and mini-crits - including that from removing the distance modifier - 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.
Each weapon has an associated type of damage that it deals. Some weapons can deal more than one damage type at once, such as the Cow Mangler 5000's charged shot.
- Bullet damage is typically associated with hitscan weapons, though the damage caused by most projectile impacts is treated as such as well (such as syringes and arrows).
- Explosive damage is usually caused by explosive projectiles. Players killed via explosive damage will often gib.
- Fire damage is caused by both flaming weaponry and the afterburn they induce.
- Untyped damage is caused by the Righteous Bison and Pomson 6000.
- Bleed damage is applied to players that are bleeding.
- Melee damage is dealt by melee weapons. Melee damage can destroy stickybombs and causes players to scream loudly on kill.
- Critical damage is caused by critical hits and mini-crits, playing distinctive sound effects and producing louder kill screams.
- Fall damage is applied to players that hit the ground after too high and/or too fast a drop.
- Crush damage results when a player has been sandwiched between two objects (such as between a closing door and the ground). Being killed by crush damage causes the screen to flash red.
Damage vulnerability, resistance, and blocking
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% then adding X%, and "Y% damage resistance" multiplies that kind of damage by 100% then subtracting 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 Pain Train (10% bullet weakness) and an active Battalion's Backup (50% sentry resistance) has a combined resistance of 45% against Sentry bullets - as opposed to the 40% that would result from the effects being simply added together.
Some weapons imbue an effect which increases or decreases the damage received from certain types of weapons. These effects may either be applied as "on wearer" (having the item equipped in the loadout) or "while active" (actively wielding the item).
|List of weapons with damage vulnerability and resistance|
|Secondary||While under the effects, damage taken increased by 10%.|
| Grants full immunity to fall damage on wearer when active.|
+20% damage vulnerability from all sources on wearer when active.
|Pretty Boy's Pocket Pistol|
|Melee||+25% explosive damage vulnerability on wearer.|
|Secondary||When used, it provides a defensive buff to nearby teammates that blocks 35% of incoming damage, 50% of Sentry Gun damage, and nullifies Critical hits.|
|Melee||+10% bullet damage vulnerability on wearer.|
|Primary||When activating the Mmmph buff, blocks 75% of incoming damage for the taunt's duration.|
|Melee||+20% damage vulnerability from all sources when active|
|Secondary|| 50% fire damage resistance on wearer.|
40% explosive damage resistance on wearer.
Grants full immunity to afterburn on wearer.
| 20% fire damage resistance on wearer.|
15% explosive damage resistance on wearer.
| 25% fire damage resistance on wearer.|
25% explosive damage resistance on wearer.
|Melee||10% bullet damage vulnerability on wearer.|
|Primary||20% damage resistance when spun up.|
|20% damage resistance when spun up.|
|Secondary||While under the effects, damage taken increased by 25%.|
|Buffalo Steak Sandvich|
|Melee|| 40% damage resistance from ranged sources while active.|
100% damage vulnerability from melee sources while active.
|Fists of Steel|
|Melee||20% fire damage vulnerability on wearer.|
|Secondary|| While healing, provides healer and heal target with constant 10% resistance to the selected damage type.|
Übercharge provides 75% resistance and full crit resistance to a selected damage type.
|Secondary|| 15% bullet damage resistance on wearer.|
20% explosive damage vulnerability on wearer.
|Darwin's Danger Shield|
|Melee||20% damage vulnerability from all sources on wearer when active.|
|Melee||On Hit by Fire: Fireproof for 1 second and Afterburn immunity for 10 seconds.|
|PDA 2||20% damage resistance when cloaking.|
|Invis Watch||Enthusiast's Timepiece|
|20% damage resistance when cloaking.|
|Cloak and Dagger|
| When get damaged, blocks 50% of incoming damage.|
After Dead Ringer activated, 65% damage resistance on wearer which fades to 20% in 3 seconds.
- Fixed the Flamethrower hit detection
- [Undocumented] Melee weapons no longer deal bullet damage.
- [Undocumented] Melee weapons no longer count as bullet weapons when accounting for damage vulnerabilities.