Damage types

From Valve Developer Community
Revision as of 06:44, 22 April 2023 by MrFunreal (talk | contribs) (condensed info of both the table and list above into one single table. way easier to look at.)
Jump to navigation Jump to search

The Damage Type property of a trigger_hurt entity lets you choose between many types of damage, but it may be hard to figure out what these types of damage do exactly, so below is a list (for Half-Life 2).

If nothing else is stated, each damage hit will (besides damaging you) make you jerk a little, make your screen flash red if you don't have a HEV suit, or provide red HUD directions to display where the damage is coming from if you have a HEV suit.

The damage caused depends on the current difficulty setting (Half-Life 2):

  • The "Easy" (skill 1) setting causes 50% of the Damage value every half-second.
  • The "Normal" (skill 2) setting causes 100% of the Damage value every half-second.
  • The "Hard" (skill 3) setting causes 150% of the Damage value every half-second.
  • (Always causes 50% of the Damage value every half-second. Team Fortress 2)

The value for damage types are essentially bitflags. This means that multiple damage types can be specified at once where applicable. For instance, DMG_SHOCK have a value of 256 and DMG_DROWN have a value of 16384. Entering the sum of those (256 + 16384), 16640, would both cause the player's screen to flash blue, and a spark will appear near the player.

Damage types

This table shows every damage type available in the game. Some of these are not in the default FGDs and have to be added manually.

Value Name Comments / Effects
0 DMG_GENERIC
  • Does not make any kind of visual or audible indication of incoming damage, unlike other damage types.
1 DMG_CRUSH
  • The whole screen flashes red even if you're wearing a HEV suit.
  • Always does 50% of the Damage value every half-second, regardless of difficulty setting.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Also makes the Witch flinch without startling her.
2 DMG_BULLET
  • Plays bullet impact sounds.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Also makes the Witch flinch without startling her.
4 DMG_SLASH
  • Displays spurts of blood if player HEV suit power is 0.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Also makes the Witch flinch without startling her.
8 DMG_BURN
  • Plays heat damage sounds. (Something sizzling and the player going "Ouch!".)
  • The whole screen flashes red even if you're wearing a HEV suit.
  • No HUD damage directions are given.
  • (For additional indication, you can add an ambient_generic playing hl1/fvox/heat_damage.wav to make the HEV suit go: "Extreme heat damage detected.")
  • Team Fortress 2 Team Fortress 2 Does NOT ignite players.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Ignites all bots, also shows fire overlay in first person.
16 DMG_VEHICLE
  • prop_vehicle_jeep impacts deal this type of damage.
  • Listed as "Freeze" in Valve FGDs, since this damage type was previously used for freeze damage in GoldSource.
  • When used in the Half-Life codebase, the HEV suit will display a snowflake icon on the left side of the screen.
  • Team Fortress 2 Team Fortress 2 A player killed by this type of damage will be displayed as being run over by a train.
32 DMG_FALL
  • Always does 50% of the Damage value every half-second, regardless of difficulty setting.
  • The HEV suit will not protect you from this type of damage.
  • Team Fortress 2 Team Fortress 2 A player killed by this type of damage will play a fall damage sound and display the fall-specific kill feed line "fell to a clumsy, painful death".
64 DMG_BLAST
  • May temporarily deafen the player.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Stumbles all CI, SI, Tanks and Witches. Does not startle the Witch.
  • Team Fortress 2 Team Fortress 2 A player killed by this type of damage will leave gibs instead of a ragdoll.
128 DMG_CLUB
  • Team Fortress 2 Team Fortress 2 A player killed by this type of damage will emit their dramatic death sounds. Melee weapons deal this type of damage.
256 DMG_SHOCK
  • Sparks for every hit.
  • The whole screen flashes light blue even if you're wearing a HEV suit.
  • (For additional indication, you can add an ambient_generic playing hl1/fvox/shock_damage.wav to make the HEV suit go: "Electrical damage detected.")
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series No flashes, Missing Particle/white texture.
512 DMG_SONIC
  • Damage from supersonic objects.
1024 DMG_ENERGYBEAM
  • Laser or other high energy beam.
2048 DMG_PREVENT_PHYSICS_FORCE !FGD
  • Prevent a physics force (e.g. Gravity Gun Jump on Props).
4096 DMG_NEVERGIB !FGD
  • No damage type will be able to gib victims upon death.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Does not function as such.
8192 DMG_ALWAYSGIB !FGD
  • Any damage type can be made to gib victims upon death.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Does not function as such.
16384 DMG_DROWN
  • The whole screen flashes blue even if you're wearing a HEV suit.
  • Double HUD damage directions are given.
  • Plays drowning sounds.
  • Always does 50% of the Damage value every half-second, regardless of difficulty setting.
  • The HEV suit will not protect you from this type of damage.
32768 DMG_PARALYZE
  • HEV suit warning: "Warning: Bloodtoxin levels detected." (hl1/fvox/blood_toxins.wav)
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Instantly incapacitates survivor bots.
65536 DMG_NERVEGAS
  • HEV suit warning: "Warning: Biohazard detected." (hl1/fvox/biohazard_detected.wav)
  • Team Fortress 2 Team Fortress 2 A player killed by this type of damage will be displayed as a kill by a sawblade.
131072 DMG_POISON
  • npc_headcrab_black Poison headcrabs deal this type of damage.
  • The whole screen flashes yellow even if you're wearing a HEV suit. (This flash seems to stick sometimes, and may appear the next time the player is hurt.)
  • The HEV suit will not protect you from this type of damage.
  • Always does 50% of the Damage value every half-second, regardless of difficulty setting.
  • HEV suit warns: "Warning: Bloodtoxin levels detected." (hl1/fvox/blood_toxins.wav)
  • HUD displays: "Neurotoxin Detected Administering Antidote"
  • The damage received is slowly healed after a delay (even if the player is not wearing a suit, oddly enough).
  • Team Fortress 2 Team Fortress 2 Similar to GENERIC.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Will not show damage indicator arrows on screen.
262144 DMG_RADIATION
  • Close proximity to a trigger_hurt with this type of damage will set off the HEV suit's Geiger counter.
  • The HEV suit will not protect you from this type of damage.
  • The whole screen flashes white even if you're wearing a HEV suit.
Team Fortress 2 Team Fortress 2 The screen does not flash. Causes gibbing like Blast damage.
  • Double HUD damage directions are given.
  • HEV suit warning: "Warning: Hazardous radiation levels detected." (hl1/fvox/radiation_detected.wav)
524288 DMG_DROWNRECOVER
  • Used for regeneration of health lost due to drowning damage.
Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Generic pain instead of drown recover.
1048576 DMG_ACID
2097152 DMG_SLOWBURN
  • Team Fortress 2 Team Fortress 2 Uses the damage falloff formula (50% at 1024 units away from attacker's origin, 150% at point blank)}}
4194304 DMG_REMOVENORAGDOLL !FGD
  • If damage of this type kills the player or an NPC, a ragdoll will not be created.
  • This bit is set when attempting to use an env_entity_dissolver on a live player.
  • Listed as "Slow Freeze" in Valve FGDs, since this damage type was previously used for slow freeze damage in GoldSource.
8388608 DMG_PHYSGUN !FGD
  • Damage from the Gravity Gun (e.g. pushing head crabs).
16777216 DMG_PLASMA !FGD
  • Turns the player's screen dark and plays sounds until the player's next footstep.
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Spawns Shotgun like gib particles until CI die and gib.
33554432 DMG_AIRBOAT !FGD
67108864 DMG_DISSOLVE !FGD
134217728 DMG_BLAST_SURFACE !FGD
  • A blast on the surface of water that cannot harm things underwater
268435456 DMG_DIRECT !FGD
  • Damage from being on fire.(DMG_BURN relates to external sources hurting you)
536870912 DMG_BUCKSHOT !FGD
  • Damage from shotguns. (not quite a bullet. Little, rounder, different.)
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Staggers CI. Makes Witch flinch.
1073741824 DMG_HEADSHOT !FGD
  • Damage from a headshot.
2147483648 DMG_LASTGENERICFLAG !FGD
  • Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series Applies all previously encountered special damage flags at once. (Burn, Incap, Sparks, Stagger) }}
Todo: Are there types of noscope damage, smoke damage and blind damage?

Prefabs

See also