This article is updated for Update 14.
Modding Combat Abilities[]
Combat abilities are defined in the file Abilities.txt.
In this file you can define what each ability does, how many times it can be used in combat, and other parameters.
Note: Every ability must have it's display name defined in the localization file Texts.txt using the following format:
abilities.protectionspell.name=Protection Spell
Ability Icon[]
You may define the name of the icon to represent the ability in the toolbar. This value is optional, and defaults to "ability_hex" where hex is the ability's ID.
Format:
abilities.entity.fraggrenade.sprite=ability_grenade
In the example above, the image named "ability_grenade" will be used to represent the "fraggrenade" ability. This is useful when several abilities use the same action.
Ability images are normally 256x256 pixels.
See Modding: Adding Images to Mods for more information on how to add new images.
Target Mode[]
Each ability defines what kind of targets are valid for it:
abilities.entity.vodoodoll.targetmode=Enemy
Valid target modes are:
- "AnyUnit" - any unit may be targeted
- "Enemy" - only enemy units may be targeted
- "Ally" - only allied units may be selected
- "Tile" - any position on the map may be selected whether someone is on it or not
- "Self" - the target is the user of the ability, no target selection required
Ability Properties[]
Abilities may have any of the following properties:
Property | Description | Comment | |
---|---|---|---|
damage | Damage applied to units within the ability's area of effect | Optional, default 0 | |
healamount | Health restored to units within the ability's area of effect. | Defined as a fraction of the maximum health.
Optional, default 0 |
|
aoe | Area of effect. Distance from the ability's target that is affected. | Optional, default 1 | |
square | Whether the area of effect is square or circular.
If true diagonal tiles are considered 1 tile away instead of 1.4 |
Optional, default "false" | |
range | Maximum range between the user of the ability and it's target. | ||
consumeonuse | Whether or not the item that provides this ability is consumed
when using the ability. |
Optional, default "true"
Note: Will always consume the item in the "Accessory" slot. Don't use with skill, weapon and armor abilities. |
|
performtime | How long a delay before the ability is activated.
The "performanimation" is displayed during this time. |
Example:
abilities.entity.fraggrenade.properties.damage=30 abilities.entity.fraggrenade.properties.aoe=2 abilities.entity.fraggrenade.properties.range=4
Frag grenade has a throw range of 4 tiles, and an area of effect of 2 tiles, and it does 30 damage to units within that area.
Ability Effects[]
Abilities may apply status effects on units within the area of effect:
abilities.entity.flashbang.effect.flashbang=30
In this example, the "flashbang" ability applies a "flashbang" status effect for 30 seconds.
See Modding: Status Effects for more information on defining status effects.
Visual and Audio Effects[]
You may define the visual and audio effects that take place when using an ability:
abilities.entity.flashbang.performanimation=Handling abilities.entity.flashbang.triggeranimation=Throwing abilities.entity.flashbang.effectprefabs=GrenadeProjectilePrefab,FlashbangExplosionPrefab abilities.entity.flashbang.effectsounds=grenade_throw,grenade_explode
When performing the "flashbang" ability, a survivor will first do the "Handling" animation for the perform duration, followed by a "Throwing" animation.
After the survivor animations, a "GrenadeProjectilePrefab" effect will appear followed by a "FlashbangExplosionPrefab" effect. The sound effects "grenade_throw" and "grenade_explode" will be played timed with the visual effects.
See the original configuration files for available prefab, animation, and sound values.
See Modding: Adding Audio to Mods for more information on adding custom sounds.
Ability Class[]
The ability class defines how it selects its targets. There are two options:
- SingleTargetAbility - the ability will only affect it's target. Should not be used with "Tile" targeting mode.
- GrenadeAbility - the ability will affect any unit within it's area of effect. Can be used with any targeting mode.