Adding injuries
Last updated
Last updated
Advanced Roleplay Environment supports modular injuries. This means you can easily add injuries or edit them accordingly.
In order to add an injury we just need to add the injury inside the injuries file and configure the properties accordingly.
Since all injuries are saved inside script/entities/injuries.lua
, we will open this file. This should look like this:
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:
There are many options for the injury so that we can edit it perfectly for our needs.
Lets begin with explaining.
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:
Option | Description | Example |
---|---|---|
causes
This property is a table that contains every damage type the injury should be added on.
causes = { "falling" }
Using it like this, the injury will be added when the player receives fall damage (or the damage type "falling" is triggered).
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.
bleeding = 0.2
The injury has a bleeding intensity of 0.2.
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..
pain
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. There is neither a minimum or maximum.
pain = 0.3
The injury has a pain intensity of 0.3.
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.
minDamage = 25
The player has to receive 25 damage at minimum otherwise this injury won't be considered in the adding process.
maxDamage
This property is a number and contains the maximum damage that can be achieved before the number is no longer considered in handling.
maxDamage = 30
The player is not allowed to take more than 30 damage otherwise the injury isn't considered in the adding process anymore.
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)
causeLimping = true
Setting it to true the injury will cause limping now when it is a leg injury.
causeFracture
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)
causeWeaponAimShake = true
Setting it to true the injury will cause aim shake when aiming with a weapon if this injury is a arm injury.
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)
needSewing = true
Setting it to true the injury could cause a needed sew.
exclusiveBodyParts
This property is a table and contains every body part which the injury can be applied on.
exclusiveBodyParts = { "head" } Using it like this the injury will only be considered if the injury should be on the head.
timeout
This property is a number and contains the value in seconds after the wound will be removed automatically.
timeout = 100
Using it like this the injury will be removed after 100 seconds automatically.