DOTAAbilities schema. Legends of Dota Redux uses two files to extend and override the base game’s ability data:
| File | Purpose |
|---|---|
npc_abilities_custom.txt | Defines brand-new abilities that do not exist in the base game. |
npc_abilities_override.txt | Overrides specific fields on existing Dota 2 abilities (e.g. adjusted cooldowns or changed flags). |
scripts/npc/ inside the addon directory.
npc_abilities_custom.txt
This file does not contain ability blocks directly. Instead, it is entirely composed of#base directives that include individual ability files:
#base-included file contains one or more ability definitions under the root DOTAAbilities block. This structure keeps individual abilities self-contained and easy to locate.
npc_abilities_override.txt
Similarly,npc_abilities_override.txt uses #base directives to include per-hero override files:
KV Ability Block Format
Every ability block lives inside aDOTAAbilities root key:
Common Fields
| Field | Description |
|---|---|
BaseClass | The C++ base class. Use ability_lua for Lua-implemented abilities or a specific Dota base class (e.g. ability_datadriven). |
ScriptFile | Path to the Lua script relative to scripts/vscripts/. Required when BaseClass is ability_lua. |
AbilityTextureName | The icon to display, using the internal ability name of any Dota 2 or custom ability. |
AbilityBehavior | Pipe-separated behaviour flags (see table below). |
AbilityCastRange | Cast range in units, one value per level separated by spaces. |
AbilityManaCost | Mana cost, one value per level. |
AbilityCooldown | Cooldown in seconds, one value per level. |
AbilityCastPoint | Cast animation time in seconds. |
AbilityValues | Sub-block of named special values accessible from Lua via ability:GetSpecialValueFor(). |
AbilityBehavior Flags
| Flag | Meaning |
|---|---|
DOTA_ABILITY_BEHAVIOR_NO_TARGET | No target required; fires immediately on cast. |
DOTA_ABILITY_BEHAVIOR_UNIT_TARGET | Targets a single unit. |
DOTA_ABILITY_BEHAVIOR_POINT | Targets a ground location. |
DOTA_ABILITY_BEHAVIOR_AOE | Area of effect; shows a radius ring on cast. |
DOTA_ABILITY_BEHAVIOR_PASSIVE | Passive ability — no cast button. |
DOTA_ABILITY_BEHAVIOR_TOGGLE | Toggleable on/off. |
DOTA_ABILITY_BEHAVIOR_CHANNELLED | Channelled; interrupted by movement or stuns. |
DOTA_ABILITY_BEHAVIOR_AUTOCAST | Can be set to auto-cast. |
Real Example: ranged_punch
The following is the full definition forranged_punch, a custom Lua ability:
How the Lua file links
TheScriptFile path points to a Lua file at scripts/vscripts/abilities/ranged_punch.lua. That file defines a class that extends BaseAbility (or a Redux base class) and implements the ability logic:
AbilityValues sub-block is what GetSpecialValueFor("punch_damage") reads. Scepter/Shard upgrades, talent bonuses, and AoE increase flags are all handled through this values block.
Adding a New Custom Ability
- Create a new
.txtfile underscripts/npc/abilities/custom/my_ability.txtwith theDOTAAbilitiesblock. - Add a
#baseline tonpc_abilities_custom.txt: - Create the corresponding Lua script at
scripts/vscripts/abilities/my_ability.lua. - Add the ability name to
abilities.kvin the appropriate bracket. - Restart the server to pick up the new files.

