UCrimsonGameplayAbility

The base class for all Crimson abilities. Adds activation policies, activation groups, contract-driven properties, dynamic tag mutations, augment-event broadcasting, and per-ability cooldown recovery scaling on top of UGameplayAbility.

Activation policy

PolicyWhen to use
OnInputTriggeredActivates once when the input tag is pressed
WhileInputActiveStays active while the input tag is held (re-activates if cancelled)
OnSpawnActivates automatically when the ASC initializes (passive abilities)

Commit time

Controls when cost and cooldown apply relative to execution:

Commit TimeDescription
OnActivationCost and cooldown applied immediately on activation (default)
OnCastCompletedApplied only after the cast finishes - cancellation is free
OnCastCompletedAndOnInterruptedApplied on completion, and also if interrupted mid-cast

Set ActivationGroup to participate in the ASC's exclusive-ability logic (see Concept: Ability System Component). Group membership can change at runtime via ChangeActivationGroup.

Additional costs

Beyond the standard GE cost, abilities can have typed costs via the AdditionalCosts array (instanced UCrimsonAbilityCost). Checked in CheckCost, applied in ApplyCost. Built-in: UCrimsonAbilityCost_PlayerTagStack deducts from a tag stack on the ASC.

Contract-driven properties

Assign a UCrimsonAbilityContract to the ability's AbilityContract property. The ability reads typed values at runtime:

FunctionReturns
GetConfigurableValue(Tag, Default)float
GetConfigurableInt(Tag, Default)int32
GetConfigurableBool(Tag, Default)bool
GetConfigurableVector(Tag, Default)FVector
GetConfigurableClass<T>(Tag)TSubclassOf<T>
GetConfigurableObject<T>(Tag)T*
GetConfigurableStruct<T>(Tag)const T*

Values resolve from the ability's PropertyCache, populated in RecalculateProperties(). Augment StatMutations write into that cache at equip time, so the same GetConfigurableValue call transparently returns the augmented value - the ability has no knowledge of augments.

Augment event broadcasting

Call BroadcastAugmentEvent(EventTags, Payload) at key moments (on hit, on crit, on cast). The ASC routes the event to active stateful listeners and executes matching actions:

cpp
// After a hit is confirmed
FCrimsonAugmentEventPayload Payload;
Payload.TargetData = TargetDataHandle;
Payload.EventMagnitude = DamageDealt;
BroadcastAugmentEvent(FGameplayTagContainer(TAG_Augment_Event_OnHit), Payload);
SetBaseValuesForSpec
Override SetBaseValuesForSpec_Implementation to inject base SetByCaller magnitudes (e.g. base damage) before augment mutations are applied by MakeAugmentedGameplayEffectSpec.