CrimsonCommon · Lesson 6 of 7
Grant an Ability Set
Before you start
- Completed: Enable the Plugin
- A pawn or player state with an Ability System Component (GAS enabled)
Chapters
One asset, one grant
UCrimsonAbilitySet is a data asset that bundles Granted Gameplay Abilities, Granted Gameplay Effects, and Granted Attributes. Instead of granting each piece by hand, you grant the whole set in one call and get back handles that revoke it just as cleanly — perfect for loadouts, equipment, and skill-tree rewards.
1. Author the asset
Content Browser → right-click → Miscellaneous → Data Asset → pick CrimsonAbilitySet. Fill the three arrays with your abilities, effects, and attribute sets.
MaxHealth before Health — order the entries so the cap exists before the value that reads it.2. Grant it — and store the handles
Call Give To Ability System on the set, passing the target Ability System Component, and promote the returned Granted Handles to a variable — those handles are how you take the set away again.
// Server onlyFCrimsonAbilitySet_GrantedHandles Handles;AbilitySet->GiveToAbilitySystem(AbilitySystemComponent, &Handles, /*SourceObject=*/this);// Later — revoke everything the set grantedHandles.TakeFromAbilitySystem(AbilitySystemComponent);
HasAuthority(); replication delivers the results to clients.The cross-plugin bridge
Other Crimson plugins don't reach into your ASC directly. They cast the owner to ICrimsonAbilitySystemOwner and call GrantAbilitySet / RemoveGrantedAbilitySet — the interface deliberately has no GetAbilitySystemComponent(), so the owner stays in control of how grants happen. Implement it once and every Crimson plugin can grant through it.