How-To: Declare an Ability Contract
Goal: turn augment authoring from typing tag strings into picking from a dropdown, by declaring which properties an ability actually exposes.
Why bother
Without a contract, an augment that says "scale Ability.Property.Damage by 1.5" is free text: nothing checks the tag exists, nothing checks the ability reads it, and a typo fails silently at runtime. A UCrimsonAbilityContract declares the properties up front so the augment editor can offer them as a validated list.
1. Create the contract
Content Browser -> right-click -> Crimson -> Ability System -> Ability Contract. Add one entry per property the ability exposes, each with its property tag and value type.
2. Point the ability at it
Assign the contract on the ability. Its property tags then appear as dropdown options wherever an augment mutation targets that ability.
3. Read a contract value at runtime
The ability reads its own configurable values through the contract API, so an augment mutation and the ability's default agree on one lookup path.
Inside the ability use Get Configurable Value, Get Configurable Vector, Get Configurable Bool or Get Configurable Int, passing the property tag.
GetConfigurableValue resolves the base value and then applies whatever mutations are equipped on THIS spec - so two characters running the same ability with different augments get different numbers.See also
- Concept: Ability Contract
- How-To: Create and Equip an Augment