CrimsonCommon · Lesson 6 of 7

Grant an Ability Set

Beginner5 minGAS

Before you start

  • Completed: Enable the Plugin
  • A pawn or player state with an Ability System Component (GAS enabled)
Video coming soon

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.

A CrimsonAbilitySet data asset with granted abilities, effects, and attributes.
Attribute order matters
Initialize 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.

Give To Ability System on the server; store the returned handles for later revocation.
cpp
// Server only
FCrimsonAbilitySet_GrantedHandles Handles;
AbilitySet->GiveToAbilitySystem(AbilitySystemComponent, &Handles, /*SourceObject=*/this);
// Later — revoke everything the set granted
Handles.TakeFromAbilitySystem(AbilitySystemComponent);
Server only
Granting and revoking are server-side operations, like all GAS grants. Call them under 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.