# Adding injuries

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

## Adding injuries

In order to add an injury we just need to add the injury inside the injuries file and configure the properties accordingly.

### Adding the injury

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

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

We will scroll to the bottom of this file and we will just copy n' paste a injury from above and edit the copied injury. So it should like this now:

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

### Configuring the injury

There are many options for the injury so that we can edit it perfectly for our needs.

Lets begin with explaining.

| Option              | Description                                                                                                                                                                                                                                                                                                                                                     | Example                                                                                                                                                                                                                                  |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| causes              | This property is a table that contains every [damage type](/advanced-roleplay-environment/guides/advanced-configuration-guide/adding-damage-types.md) the injury should be added on.                                                                                                                                                                            | <p><code>causes = { "falling" }</code><br>Using it like this, the injury will be added when the player receives fall damage (or the damage type "falling" is triggered).</p>                                                             |
| bleeding            | This property is a number which contains the intensity of the bleeding caused by the injury. Using a higher number the injury will bleed more and using a smaller number the injury will bleed less. There is neither a minimum or maximum.                                                                                                                     | <p><code>bleeding = 0.2</code><br>The injury has a bleeding intensity of 0.2.<br><em>An exact amount of the blood loss can't be given since it is calculated on where the injury is, what heart rate the player has and so on..</em></p> |
| pain                | <p>This property is a number which contains the intensity of the pain caused by the injury. Using a higher number the injury will cause  more pain and the player heart rate will rise and using a lower number the injury will cause a less pain and the heart rate won't grow as high as using a higher number.<br>There is neither a minimum or maximum.</p> | <p><code>pain = 0.3</code><br>The injury has a pain intensity of 0.3.</p>                                                                                                                                                                |
| minDamage           | This property is a number and contains the damage that have to be received as minimum in order that the system will consider this injury at the handling process.                                                                                                                                                                                               | <p><code>minDamage = 25</code><br>The player has to receive 25 damage at minimum otherwise this injury won't be considered in the adding process.</p>                                                                                    |
| maxDamage           | This property is a number and contains the maximum damage that can be achieved before the number is no longer considered in handling.                                                                                                                                                                                                                           | <p><code>maxDamage = 30</code><br>The player is not allowed to take more than 30 damage otherwise the injury isn't considered in the adding process anymore.<br></p>                                                                     |
| causeLimping        | This property is a boolean and contains the value if this injury will cause limping. (Only applies if the injury is a leg injury)                                                                                                                                                                                                                               | <p><code>causeLimping = true</code><br>Setting it to true the injury will cause limping now when it is a leg injury.</p>                                                                                                                 |
| causeFracture       | [Not implemented yet.](#user-content-fn-1)[^1]                                                                                                                                                                                                                                                                                                                  | Not implemented yet.                                                                                                                                                                                                                     |
| causeWeaponAimShake | This property is a boolean and contains the value if this injury will cause aim shake while aiming with a weapon. (Only applies if the injury is a arm injury)                                                                                                                                                                                                  | <p><code>causeWeaponAimShake = true</code><br>Setting it to true the injury will cause aim shake when aiming with a weapon if this injury is a arm injury.</p>                                                                           |
| needSewing          | This property is a boolean and contains the value if the wound need to be seewed. (Only if the conditions are met. Since the conditions are random it is a 40% chance)                                                                                                                                                                                          | <p><code>needSewing = true</code><br>Setting it to true the injury could cause a needed sew.</p>                                                                                                                                         |
| exclusiveBodyParts  | This property is a table and contains every body part which the injury can be applied on.                                                                                                                                                                                                                                                                       | <p>exclusiveBodyParts = { "head" }<br>Using it like this the injury will only be considered if the injury should be on the head. </p>                                                                                                    |
| timeout             | This property is a number and contains the value in seconds after the wound will be removed automatically.                                                                                                                                                                                                                                                      | <p><code>timeout = 100</code><br>Using it like this the injury will be removed after 100 seconds automatically.</p>                                                                                                                      |

### Adding the translation

Since the translation is missing it will look weird inside the ui. So we need to add it in our locale files. So we open our locale file (example: languages/en.json) and copy 'n' paste just an other entry and edit the values accordingly. So it should look like this if added like [above](#adding-the-injury):

<figure><img src="/files/XIOjS03sCvEUZfyc2rI9" alt=""><figcaption></figcaption></figure>

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veryinsanee.space/advanced-roleplay-environment/guides/advanced-configuration-guide/adding-injuries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
