# Damage types

> The standard DAMAGE_TYPE_* constants and the community-maintained custom damage types for Combat.

Every hit carries a damage type next to its amount: [`llDamage`](/functions/llDamage/) takes one, [`PRIM_DAMAGE`](/constants/PRIM_DAMAGE/) and [`REZ_DAMAGE_TYPE`](/constants/REZ_DAMAGE_TYPE/) set one for collisions, and [`llDetectedDamage`](/functions/llDetectedDamage/) reports it in [`on_damage`](/events/on_damage/). Part of the [Combat](/features/combat/) feature.

Damage types are provided as a convenience and a suggestion. Scripters are free to add custom ones for their own combat systems or repurpose the damage type fields.

## Standard damage types

| Flag | Value | Description |
| --- | ---: | --- |
| [`DAMAGE_TYPE_IMPACT`](/constants/DAMAGE_TYPE_IMPACT/) | -1 | System damage generated by impact with terrain or a prim. |
| [`DAMAGE_TYPE_GENERIC`](/constants/DAMAGE_TYPE_GENERIC/) | 0 | Generic or legacy damage. |
| [`DAMAGE_TYPE_ACID`](/constants/DAMAGE_TYPE_ACID/) | 1 | Damage caused by a caustic substance, such as acid. |
| [`DAMAGE_TYPE_BLUDGEONING`](/constants/DAMAGE_TYPE_BLUDGEONING/) | 2 | Damage caused by a blunt object, such as a club. |
| [`DAMAGE_TYPE_COLD`](/constants/DAMAGE_TYPE_COLD/) | 3 | Damage inflicted by exposure to extreme cold. |
| [`DAMAGE_TYPE_ELECTRIC`](/constants/DAMAGE_TYPE_ELECTRIC/) | 4 | Damage caused by electricity. |
| [`DAMAGE_TYPE_FIRE`](/constants/DAMAGE_TYPE_FIRE/) | 5 | Damage inflicted by exposure to heat or flames. |
| [`DAMAGE_TYPE_FORCE`](/constants/DAMAGE_TYPE_FORCE/) | 6 | Damage inflicted by a great force or impact. |
| [`DAMAGE_TYPE_NECROTIC`](/constants/DAMAGE_TYPE_NECROTIC/) | 7 | Damage caused by a direct assault on life-force. |
| [`DAMAGE_TYPE_PIERCING`](/constants/DAMAGE_TYPE_PIERCING/) | 8 | Damage caused by a piercing object such as a bullet, spear, or arrow. |
| [`DAMAGE_TYPE_POISON`](/constants/DAMAGE_TYPE_POISON/) | 9 | Damage caused by poison. |
| [`DAMAGE_TYPE_PSYCHIC`](/constants/DAMAGE_TYPE_PSYCHIC/) | 10 | Damage caused by a direct assault on the mind. |
| [`DAMAGE_TYPE_RADIANT`](/constants/DAMAGE_TYPE_RADIANT/) | 11 | Damage caused by radiation or extreme light. |
| [`DAMAGE_TYPE_SLASHING`](/constants/DAMAGE_TYPE_SLASHING/) | 12 | Damage caused by a slashing object such as a sword or axe. |
| [`DAMAGE_TYPE_SONIC`](/constants/DAMAGE_TYPE_SONIC/) | 13 | Damage caused by loud noises, like a Crash Worship concert. |
| [`DAMAGE_TYPE_EMOTIONAL`](/constants/DAMAGE_TYPE_EMOTIONAL/) | 14 |  |

Constant groups: [DamageType](/constants/groups/DamageType/) (16)

## Community damage types

These are plain integers, not built-in constants: LSL does not define them, so declare the ones you use in your script. To make it easy for the community to recognise and re-use custom damage types here is a table [that scripters can add onto](https://wiki.secondlife.com/wiki/Template:LSL_Constants/Custom_Damage_Types):

| Declaration | Description | Subtype | Creator | System |
| --- | --- | --- | --- | --- |
| `integer DAMAGE_TYPE_MEDICAL = 100;` | Negative damage to heal a wound, damaged limb, first aid, etc. Intended for generic healing of biological nature. Positive damage would be medical malpractice |  | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_REPAIR = 101;` | Negative damage from repairing an object or something mechanical, welding torch or wrench on a vehicle/robot/mech, etc. Positive damage can be due to mistakes, low skill or sabotage. Intended for generic healing of non-biological nature (e.g. a mechanical tank or an electrical system) |  | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_EXPLOSIVE = 102;` | Damage caused by an explosive blast, like a grenade | [`DAMAGE_TYPE_FORCE`](/constants/DAMAGE_TYPE_FORCE/) | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_CRUSHING = 103;` | Damage caused by crushing. Such as being crushed by water pressure. More of a constant type of force damage — can be nullified/reduced via diving suit | [`DAMAGE_TYPE_FORCE`](/constants/DAMAGE_TYPE_FORCE/) | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_ANTI_ARMOR = 104;` | Damage caused by anti-tank/anti-armor. Such as from a specialised armor piercing shell, rocket or other munition | [`DAMAGE_TYPE_PIERCING`](/constants/DAMAGE_TYPE_PIERCING/) | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_SUFFOCATION = 105;` | Damage caused by suffocation. Usually lacking a breathable atmosphere, such as from drowning or being in the vacuum of space |  | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_REDEPLOY = 106;` | Special damage to indicate combatant chose to redeploy. You can code in side effect(s) such as using up a ticket off the team to do so |  | Nexii Malthus | Vertical Sim / SLMC |
| `integer DAMAGE_TYPE_SURVIVAL = 200;` | Damage caused by lack of survival needs, such as starvation and dehydration. Negative damage used to heal through recovery by food and water |  | Adam Silver-Mane (Adamphillip) | Silver-mane's survival HUD |
| `integer DAMAGE_TYPE_HEMORRHAGE = 201;` | Damage caused by active bleeding. Damage type check, sets health to 0 on unsustainable systemic failure |  | Adam Silver-Mane (Adamphillip) | Silver-mane's survival HUD |

*Damage type tables adapted from the Second Life Wiki templates [Template:LSL Constants/Damage Types](https://wiki.secondlife.com/wiki/Template:LSL_Constants/Damage_Types), [Template:LSL Constants/Custom Damage Types](https://wiki.secondlife.com/wiki/Template:LSL_Constants/Custom_Damage_Types), by Second Life Wiki contributors, under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).*

---

From lsl.dev: https://lsl.dev/features/combat/damage-types/
