# Abilities

## Properties

All types abilities share a common set of properties, listed in the table below.

| Name                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Require Out Of Combat             | If true, the character must not be in combat to cast the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Require Stealth                   | If true, the character must be in stealth mode to cast the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Weapon Affinity Names             | A list of [Weapon Skills](https://docs.anyrpg.org/scriptable-objects/weapon-skill).  The character must have a weapon equipped that matches the type of at least one of the skill to cast the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Holdable Object List              | <p>A list of <a href="prefab-profile">PrefabProfiles</a> that contain links to GameObjects that will be held while the ability is being cast.<br><strong>Holdable Object Name</strong><br>The name of a <a href="prefab-profile">PrefabProfile</a> that contains a link to a GameObject.<br><strong>Use Universal Attachment</strong><br>If true, attachment points from the <a href="prefab-profile">PrefabProfile</a> will be ignored, and the universal attachment in the <em>Attachment Name</em> field will be used.<br><strong>Attachment Name</strong><br>The <em>Node Name</em> field from one of the <em>Attachment Point Nodes</em> in an <a href="attachment-profile">Attachment Profile</a>.</p> |
| Ability Prefab Source             | <p>An enumeration that defines what sources will be used for holdable objects.<br><strong>Both</strong><br>Holdable objects defined directly in the ability, and defined in the weapon will be spawned.<br><strong>Ability</strong><br>Only holdable objects defined in the ability will be spawned<br><strong>Weapon</strong><br>Only holdable objects defined in the weapon will be spawned.</p>                                                                                                                                                                                                                                                                                                           |
| Animator Create Prefabs           | If true, holdable objects will be created in response to animation events, and not created automatically by the ability manager when the cast starts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Prefab Destroy Delay              | The amount of time, in seconds, that holdable objects should persists past the end of the ability cast before being destroyed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Animation Clip                    | A link to an animation clip that the character will perform while casting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Animation Profile Name            | The name of an [Animation Profile](https://docs.anyrpg.org/scriptable-objects/animation-profile) that contains a list of *Cast Clips* or *Attack Clips* (only for [Animated Abilties](https://docs.anyrpg.org/scriptable-objects/abilities/animated-ability)) that will be performed while the ability is casting.                                                                                                                                                                                                                                                                                                                                                                                           |
| Use Unit Cast Animations          | If true, the ability will use the *Cast Clips* or *Attack Clips* currently active for the character, instead of the clips defined in the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Animation Hit Audio Profile Name  | If the animation has *Hit* events while it is playing, this [Audio Profile](https://docs.anyrpg.org/scriptable-objects/audio-profile) will be played in response to those events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Casting Audio Clip                | An audio clip to play while the ability is casting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Casting Audio Profile Name        | An [Audio Profile](https://docs.anyrpg.org/scriptable-objects/audio-profile) to play while the ability is casting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Loop Audio                        | If true, the audio will be looped until the cast is complete.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Required Level                    | The level the character must be to learn the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Character Class Requirements      | A list of [Character Classes](https://docs.anyrpg.org/scriptable-objects/character-class).  The character must be one of the classes to learn the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Class Specialization Requirements | A list of [Class Specializations](https://docs.anyrpg.org/scriptable-objects/class-specialization).  The character must be one of the specializations to learn the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Useable Without Learning          | If true, the ability can be cast without learning it.  This is useful for teleport abilities that will be cast on interaction with a [Teleport Interactable Option](https://docs.anyrpg.org/scriptable-objects/interactable-option-configurations/teleport-config).                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Auto Add To Bars                  | If true, when learned, the ability will be automatically added to the action bars in the UI if there is room.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Can Simultaneous Cast             | If true, this ability can be cast while another ability cast is in progress.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Can Cast While Moving             | If true, the ability can be cast while the character is in motion.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Ignore Global Cooldown            | This spell can be cast while the global cooldown is active.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Power Resource Name               | The name of a [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that will be spent to cast the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Base Resource Cost                | The base amount of the [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that will be spent to cast the ability.  This amount is not scaled by level.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Resource Cost Per Level           | The amount of the [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that will be spent to cast the ability.  This amount is multiplied by the character level.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Spend Delay                       | The time delay (in seconds) before the [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) is spent when the ability is cast.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Generate Power Resource Name      | The name of a [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that should be gained when the ability hits the target.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Base Resource Gain                | The base amount of the [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that will be gained.  This amount is not scaled by level.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Resource Gain Per Level           | The amount of the [Power Resource](https://docs.anyrpg.org/scriptable-objects/power-resource) that will be gained.  This amount is multiplied by the character level.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Use Speed Multipliers             | If true, after the cast time is calculated, it will be affected by the *Speed* secondary stat.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Use Animation Cast Time           | If true, the cast time is based on the length of the animation played while casting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Ability Casting Time              | If *Use Animation Cast Time* is false, this value will be used for the cast time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Ability Cool Down                 | The cooldown time, in seconds, before the ability can be cast again.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Cool Down On Cast                 | If true, the cooldown will be initiated at the start of the cast, instead of the end of the cast, which is the default.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Use Ability Effect Targetting     | If true, the *Target Options* of the ability will be overridden by the *Target Options* of the first [Ability Effect](https://docs.anyrpg.org/scriptable-objects/ability-effects).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Target Options                    | A list of [Target Options](#undefined).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Inline Ability Effects            | A list of [Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects), defined directly, to cast when the ability casting is complete.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Ability Effect Names              | A list of [Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects) to cast when the ability casting is complete.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Tick Rate                         | This is the number of seconds between ticks, when [Channeled Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects/channeled-effect) will be cast while the ability is casting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Inline Channeling Effects         | A list of [Channeled Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects/channeled-effect), defined directly, to cast while channeling the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Channeled Ability Effectnames     | A list of names of [Channeled Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects/channeled-effect) to cast while channeling the ability.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

### Target Options

Target options control which targets will be considered valid targets for the purpose of determining if the ability can be cast on the target.

| Name                   | Description                                                                                                                                   |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Require Target         | If true, the character must have a target selected.                                                                                           |
| Require Line Of Sight  | The caster requires a clear line of sight to the target.                                                                                      |
| Require Live Target    | The target must be alive.                                                                                                                     |
| Require Dead Target    | The target must be dead.                                                                                                                      |
| Can Cast On Self       | The ability can be cast on the caster.                                                                                                        |
| Can Cast On Others     | The ability can be cast on targets other than the caster.                                                                                     |
| Can Cast On Enemy      | The ability can be cast on targets the caster has a hostile [Faction](https://docs.anyrpg.org/scriptable-objects/faction) relationship with.  |
| Can Cast On Neutral    | The ability can be cast on targets the caster has a neutral [Faction](https://docs.anyrpg.org/scriptable-objects/faction) relationship with.  |
| Can Cast On Friendly   | The ability can be cast on targets the caster has a friendly [Faction](https://docs.anyrpg.org/scriptable-objects/faction) relationship with. |
| Auto Self Cast         | If true, and the caster does not have a target, the ability will automatically choose the caster as the target.                               |
| Unit Type Restrictions | A list of valid [Unit Types](https://docs.anyrpg.org/scriptable-objects/unit-type) the ability can be cast on.                                |
| Use Melee Range        | If true, the ability can only be cast on a target when that target is in the casters hit box.                                                 |
| Max Range              | If *Use Melee Range* is false, the ability will have a maximum range of this value.                                                           |
| Require Facing Target  | If true, the target must be in front of the caster.                                                                                           |
| Max Angle              | The maximum angle to the left or right the target can be located at.                                                                          |
| Require Behind Target  | If true, the caster must be behind the target.                                                                                                |
| Require Ground Target  | If true, this ability will be cast on the ground, and not on a target.                                                                        |
| Ground Target Color    | The color that will be used to tint the ground target casting circle.                                                                         |
| Ground Target Radius   | The radius that will be used for displaying the ground target casting circle.                                                                 |

## Next steps

* Add an ability to the *Capabilities* of a [Character Class](https://docs.anyrpg.org/scriptable-objects/character-class).
* Add an ability to the *Capabilities* of a [Class Specialization](https://docs.anyrpg.org/scriptable-objects/class-specialization).
* Add an ability to the *Capabilities* of a [Unit Type](https://docs.anyrpg.org/scriptable-objects/unit-type).
* Add an ability to the *Capabilities* of a [Faction](https://docs.anyrpg.org/scriptable-objects/faction).
* Add an ability to the *Capabilities* of a [Unit Profile](https://docs.anyrpg.org/scriptable-objects/unit-profile).


---

# 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.anyrpg.org/scriptable-objects/abilities.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.
