> For the complete documentation index, see [llms.txt](https://docs.veryinsanee.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.veryinsanee.space/advanced-roleplay-environment/guides/advanced-configuration-guide/adding-damage-types.md).

# Adding damage types

*Advanced Roleplay Environment supports modular damage types. This means you can easily add damage types or edit them accordingly.*

## Adding damage types

In order to add a damage type we need to add the damage type inside the damage types file and the according damage type hash and configure the properties accordingly.

### Adding the damage type

Since all damage types are saved inside <mark style="color:yellow;">`script/entities/damage_types.lua`</mark>, we will open this file. This should look like this:

<figure><img src="/files/NufETPXK1OWi9pbyw0rw" alt=""><figcaption><p>script/entities/damage_types.lua</p></figcaption></figure>

Now we will scroll to the bottom and just copy a damage type from above and edit it to our needs so it should look like this:

<figure><img src="/files/6LUAkrCnY2tYuVMzip1L" alt=""><figcaption><p>script/entities/damage_types.lua</p></figcaption></figure>

### Configuring the damage type

There are two options available for us to configure the damage type.

| Option            | Description                                                                                                                                                                                                                                                                                                                                                                                                       | Example                                                                                                                                                                                                                                  |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| thresholds        | <p>This property is a table and contains the damage thresholds of a received damage. <br>It works like this: If there is an entry with a damage of 1 this entry will cause <em>n</em> injuries (<em>n is defined by the amount property in the entry</em>). If there are two entries or more all entries will be executed if the damage is equal or higher than needed damage defined in the threshold entry.</p> | <p><code>thresholds = { { damage = 1, amount = 2 }, { damage = 15, amount = 3 } }</code><br>Using it like this the damage type will cause 2 injuries if the damage is >= 1. If the damage is >= 15 it will also add 3 injuries more.</p> |
| selectionSpecific | This property is a boolean and contains the value if the damage type should be selection specific. So when received a leg injury if it should apply on the leg or on a random body part.                                                                                                                                                                                                                          | <p><code>selectionSpecific = false</code><br>Using it like this the damage type will ignore where the player has been hit and choose a random body part. (Good for explosions maybe?)</p>                                                |

### Adding the damage type to a damage hash

In order that the damage type will be triggered we need to link it to a damage hash from the game. So lets do this.

We need to go the section ENUM\_DAMAGE\_HASHES and scroll down to the bottom of it and copy the last value and edit it to our needs, so it should look like this:

<figure><img src="/files/fikBu236dYRKK8ejP8aJ" alt=""><figcaption><p>script/entities/damage_types.lua</p></figcaption></figure>

As you can see we've edited the hash and the category. The category is defined above [here](#adding-the-damage-type). If we have added and configured everything properly and also a [injury for it](/advanced-roleplay-environment/guides/advanced-configuration-guide/adding-injuries.md), we should now receive an injury.
