⚙️
veryinsanee.space
  • Welcome!
  • Store
  • Advanced Roleplay Environment
    • Installation
    • Guides
      • Basic Gameplay Guide
        • Medications
        • Wounds & Bandages
        • Blood Loss, IVs, Stabilzation
        • Surgical Kit & Emergency Revive Kit
        • Cardiac Arrest & CPR
        • Mass-Casualty Incidents & Triage
        • Heart Rate & Blood Pressure
      • Basic Configuration Guide
        • Client Configuration
        • Server Configuration
      • Advanced Configuration Guide
        • Adding injuries
        • Adding damage types
        • Adding medications
        • Adding bandages
        • Adding infusions
        • Adding menu actions
    • API Reference
    • Plugin Support
  • veryinsanee's Whitelist
    • Installation
Powered by GitBook
On this page
  • Adding damage types
  • Adding the damage type
  • Configuring the damage type
  • Adding the damage type to a damage hash

Was this helpful?

  1. Advanced Roleplay Environment
  2. Guides
  3. Advanced Configuration Guide

Adding damage types

PreviousAdding injuriesNextAdding medications

Last updated 2 years ago

Was this helpful?

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 script/entities/damage_types.lua, we will open this file. This should look like this:

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:

Configuring the damage type

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

Option
Description
Example

thresholds

This property is a table and contains the damage thresholds of a received damage. It works like this: If there is an entry with a damage of 1 this entry will cause n injuries (n is defined by the amount property in the entry). 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.

thresholds = { { damage = 1, amount = 2 }, { damage = 15, amount = 3 } } 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.

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.

selectionSpecific = false 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?)

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:

As you can see we've edited the hash and the category. The category is defined above . If we have added and configured everything properly and also a , we should now receive an injury.

injury for it
here
script/entities/damage_types.lua
script/entities/damage_types.lua
script/entities/damage_types.lua