Augment System
Augments (UCrimsonAbilityAugment) are data assets that modify abilities - think runes or gems. Each one mutates an ability's stats, attributes, classes, objects, tags, or behavior through slots the ability's contract declares, with zero code changes to the ability.
Compatibility & slotting
| Field | Purpose |
|---|---|
TargetMode | SpecificContract -> binds to one TargetContract; ContractFamily -> matches TargetFamilyQuery against contract IdentityTags |
SlotCategory | The contract slot this augment occupies (the contract must declare it) |
SlotCost | Slot capacity consumed (>= 1) |
RequiresAugmentTags | Equippable only if a co-equipped augment carries one of these tags |
ConflictsAugmentTags | Rejected if a co-equipped augment carries one of these tags |
Mutation types
| Mutation array | What it modifies | Example |
|---|---|---|
StatMutations | Contract properties by tag (Additive / Multiplicative / Override, MinimumLevel) | +1 projectile, -0.5s cooldown |
AttributeMutations | Attributes baked into GE specs | +15% crit chance, +10 attack power |
ClassMutations | Swaps a contract class slot by tag | Replace default projectile with ice |
ObjectMutations | Swaps a contract object slot by tag | Replace fire SFX with ice |
TagMutations | Add / Remove / Replace tags on the ability spec | Add Ability.Fire to a physical ability |
Augment actions
UCrimsonAugmentAction objects are instanced in the augment's Actions array. Each fires when its ExecutionEventTag matches a broadcast event. Built-in actions:
| Action | Purpose |
|---|---|
ApplyGameplayEffect | Applies a GE to caster or targets with optional scaling |
ModifySetByCaller | Modifies a SetByCaller magnitude in the in-flight GE spec |
ModifySpecAttribute | Applies an attribute mutation to an in-flight spec |
ModifyContext | Modifies FCrimsonAugmentActionContext for downstream actions |
SpawnActor | Spawns an actor at the hit location |
FindTargets | Overlap sweep; injects results into TargetData |
GrantAndActivateAbility | Grants and immediately activates a secondary ability |
ReduceCooldown | Reduces a cooldown by tag on the owning ASC |
ConsumeEffectStacks | Consumes GE stacks by tag; results via context |
Chance | Gates child actions behind a probability |
Conditional | Gates child actions behind a context tag condition |
Custom actions: subclass UCrimsonAugmentAction, override Execute_Implementation, add to the augment's Actions array.
Stateful listeners
For behaviors needing persistent state across events (e.g. count 5 hits then proc), add UCrimsonStatefulAugmentBase subclasses to StatefulListeners. Built-in:
| Class | Behavior |
|---|---|
HitCounter | Accumulates hit events, fires after N hits |
EventTrigger | Reacts to a specific event tag and fires its actions |
ApplyGameplayEffect | Applies a GE persistently while active |
ReplaceAbility | Temporarily replaces the owning ability |
ModifyTags | Adds/removes tags on the ability spec while active |
StackConsumer | Consumes GE stacks per event and scales output |
Equipping at runtime
See How-To: Create & Equip an Augment for the slot-based equip API (
TryEquipAugmentToSlot, EquipAugmentToFirstFreeSlot, temp slots) and the ECrimsonEquipFailure reasons.