ue-gameplay-abilities
Use this skill when working with GAS, Gameplay Ability System, GameplayAbility, GameplayEffect, AttributeSet, GameplayTags, ability system, buffs, debuffs, cooldowns, or attribute modification. See references/ for detailed setup patterns, effect configuration, and ability task usage.
By quodsoler · 848 installs
npx skills add quodsoler/unreal-engine-skills --skill ue-gameplay-abilities
Source repository · Upstream listing
UE Gameplay Ability System
Target engine: UE 5.8 . APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
GAS ships as the GameplayAbilities plugin ( Engine/Plugins/Runtime/GameplayAbilities ), which is production ready, not Experimental. Enable it in the .uproject , then add "GameplayAbilities" , "GameplayTags" and "GameplayTasks" to PublicDependencyModuleNames in your module's Build.cs . This skill covers UAbilitySystemComponent , UGameplayAbility , UGameplayEffect , UAttributeSet , UAbilityTask and Gameplay Cues.
Context
Read .agents/ue project context.md if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
Request is about… Go to
Where the ASC lives, init order, respawn, replication mode [ASC Ownership and Initialization]( asc ownership and initialization)
Writing an ability, activation, cost, cooldown, policies [Gameplay Abilities]( gameplay abilities)
Waiting on montages, events, targeting, timers, tag queries [Ability Tasks]( ability tasks)
Damage, buffs, stacking, executions, immunity, GE components [Gameplay Effects]( gameplay effects)
Health/mana floats, clamping, attribute replication [Attribute Sets]( attribute sets)
Tags that block, grant or cancel abilities; loose tags [Tags in GAS]( tags in gas)
Particles, sounds, hit impacts, cue notify classes [Gameplay Cues]( gameplay cues)
Cue scan paths, global curve tables, project config [Project Settings]( project settings)
GAS Architecture
Pillar Class Header Purpose
Component UAbilitySystemComponent AbilitySystemComponent.h Owns abilities, effects, attributes, tags
Abilities UGameplayAbility Abilities/GameplayAbility.h What happens when activated
Effects UGameplayEffect GameplayEffect.h Data driven attribute mutation
Attributes UAttributeSet AttributeSet.h Replicated FGameplayAttributeData stats
Tasks UAbilityTask Abilities/Tasks/AbilityTask.h Latent steps inside an ability
Gameplay tags thread through all of them as requirements, grants and blockers.
ASC Ownership and Initialization
Owner When Notes
APlayerState Networked player characters ASC survives pawn death; use Mixed replication
APawn / ACharacter AI, single player Simplest; use Minimal for AI, Full if a pawn owned ASC needs full data on all clients
Every actor that owns or exposes an ASC implements IAbilitySystemInterface :
InitAbilityActorInfo(OwnerActor, AvatarActor) must run on both server and client. For a pawn owned ASC that is BeginPlay with (this, this) . For a PlayerState owned ASC it is PossessedBy on the server and OnRep PlayerState on the client, with (PlayerState, Character) . Full dual path code, respawn handling and the AI variant are in [gas setup patterns.md](references/gas setup patterns.md).
EGameplayEffectReplicationMode Effect on simulated proxies
Minimal No GE replication; minimal tag/cue data only. AI and non player actors
Mixed Full GEs to the owning connection, minimal to everyone else. Player characters
Full Every GE replicates to every client
Mixed sends full GE data to the connection that owns the ASC's owner actor ( GameplayEffect.cpp:5240 ), so it works for a PlayerState owned ASC and for a pawn owned ASC once a PlayerController possesses the pawn. Choosing Full over Mixed is a bandwidth decision, not a correctness one. Minimal does not work for player owned ASCs ( AbilitySystemComponent.h:83 ). See ue networking replication for what each mode costs on the wire.
Gameplay Abilities
Constructor sets the policies and the ability's own tags:
SetAssetTags is constructor only; read them back with GetAssetTags() .
Enum Values Use
EGameplayAbilityInstancingPolicy InstancedPerActor , InstancedPerExecution InstancedPerActor is the default choice; per execution when several copies may run at once
EGameplayAbilityNetExecutionPolicy LocalPredicted , LocalOnly , ServerInitiated , ServerOnly LocalPredicted for responsive player abilities
EGameplayAbilityNetSecurityPolicy ClientOrServer , ServerOnlyExecution , ServerOnlyTermination , ServerOnly Rejects client requests the server should own
Split the commit when the two halves must happen at different times: CommitAbilityCost(Handle, ActorInfo, ActivationInfo) and CommitAbilityCooldown(Handle, ActorInfo, ActivationInfo, ForceCooldown) — note the cooldown overload takes the extra const bool ForceCooldown .
Inside an instanced ability, GetAbilitySystemComponentFromActorInfo Ensured() returns the ASC and logs an ensure instead of crashing when actor info is not set up.
Granting and activating, from the server:
Ability Tasks
Ability tasks make an ability span frames. The pattern is always: static factory → bind delegates → ReadyForActivation() (inherited from UGameplayTask ). Task delegates are dynamic, so each handler needs UFUNCTION() :
Task Waits for
UAbilityTask PlayMontageAndWait An UAnimMontage to finish, blend out, interrupt or cancel
UAbilityTask PlayAnimAndWait A raw UAnimSequence played into a slot, for linked anim layers
UAbilityTask WaitGameplayEvent A gameplay event tag sent to the ASC (anim notify, hit registration)
UAbilityTask WaitDelay A fixed number of seconds
UAbilityTask WaitTargetData An AGameplayAbilityTargetActor to confirm targets
UAbilityTask WaitAttributeChange / ...ChangeThreshold An attribute to change or cross a comparison
UAbilityTask WaitGameplayTagQuery An FGameplayTagQuery over the target's tags to become true or false
UAbilityTask WaitGameplayTagCountChanged The count of one tag on the ASC to change
UAbilityTask WaitGameplayEffectApplied Self / Target A GE matching tag requirements (or an FGameplayTagQuery via the Query factories)
Full factory signatures, delegate names, the custom task template and the task pitfalls are in [ability task reference.md](references/ability task reference.md).
Gameplay Effects
EGameplayEffectDurationType Behaviour
Instant Executes once against the base value; fires PostGameplayEffectExecute
HasDuration Aggregates onto the current value for DurationMagnitude seconds
Infinite Aggregates until removed explicitly
Modifier ops live in EGameplayModOp (a namespaced enum, so values are TEnumAsByte<EGameplayModOp::Type ). The aggregation equation is
((BaseValue + AddBase) MultiplyAdditive / DivideAdditive MultiplyCompound) + AddFinal .
Value Meaning
AddBase Added to the base before anything else
MultiplyAdditive Multipliers summed, then multiplied against the running result
DivideAdditive Divisors summed, then divided against the running result
MultiplyCompound Multiplied into the running result, compounding with other compounds
AddFinal Added after all multiplication
Override Replaces the computed value
Behaviour that used to be monolithic properties on UGameplayEffect now lives in UGameplayEffectComponent subclasses under GameplayEffectComponents/ . Stacking, magnitude calculations, UGameplayEffectExecutionCalculation , periodic effects, immunity, queries, lifecycle delegates and the full component list are in [gameplay effect reference.md](references/gameplay effect reference.md).
Attribute Sets
ATTRIBUTE ACCESSORS BASIC generates GetHealthAttribute() , GetHealth() , SetHealth() and InitHealth() . Projects that want extra accessors define their own macro chaining GAMEPLAYATTRIBUTE PROPERTY GETTER , GAMEPLAYATTRIBUTE VALUE GETTER , GAMEPLAYATTRIBUTE VALUE SETTER and GAMEPLAYATTRIBUTE VALUE INITTER .
Each OnRep body is one GAMEPLAYATTRIBUTE REPNOTIFY(UMyHealthSet, Health, OldHealth) call, and every attribute needs a DOREPLIFETIME CONDITION NOTIFY(UMyHealthSet, Health, COND None, REPNOTIFY Always) line. The full .cpp with clamping is in [gas setup patterns.md](references/gas setup patterns.md attributeset implementation).
Hook Fires Use for
PreAttributeChange Every current value recompute Clamping the current value only
PreAttributeBaseChange Before a base value write ( const ) Clamping the base value
PostGameplayEffectExecute After an instant GE, or one period of a periodic GE, writes the base value Death, hit reactions, game events
PostAttributeChange After a current value changed Reacting to derived state
Registering and reading:
One ASC can host several UAttributeSet subclasses, but only one instance per class.
Tags in GAS
Tag definition (native tag macros, .ini tag sources), container matching and FGameplayTagQuery semantics belong to ue gameplay tags messaging . What is GAS specific:
The callback is declared as void HandleStunnedTagChanged(const FGameplayTag Tag, int32 NewCount); and needs no UFUNCTION() — tag events are plain multicast delegates.
Loose tags are set directly instead of through a GE. The third argument chooses how the tag replicates:
EGameplayTagReplicationState values: None , SimulatedTagOnly , TagOnly , CountToOwner , TagAndCountToAll . Anything other than None must be added on the server.
Gameplay Cues
Cues are cosmetic only. Tag prefix GameplayCue. ; a GE triggers them through its GameplayCues array, or code fires them directly:
Class Base Override Use
UGameplayCueNotify Static UObject OnExecute Implementation Burst cue with no spawned actor
UGameplayCueNotify Burst UGameplayCueNotify Static data driven burst effects One shot particles/sounds, no code
UGameplayCueNotify HitImpact UGameplayCueNotify Static data driven impact effects Surface typed impacts
AGameplayCueNotify Actor AActor OnActive / WhileActive / OnRemove Implementation Persistent cue needing an actor
AGameplayCueNotify BurstLatent AGameplayCueNotify Actor data driven burst effects Burst that must spawn an actor
AGameplayCueNotify Looping AGameplayCueNotify Actor data driven looping effects Looping auras and channels
UGameplayCueManager discovers cue assets under the scan paths configured in project settings.
Project Settings
GAS configuration is a UDeveloperSettings class: UGameplayAbilitiesDeveloperSettings (Project Settings → Gameplay Abilities). Read it with GetDefault<UGameplayAbilitiesDeveloperSettings () . Notable fields: GameplayCueNotifyPaths , ReplicateActivationOwnedTags , bAllowGameplayModEvaluationChannels , plus the global curve/attribute tables. Runtime helpers stay on UAbilitySystemGlobals ( GetGameplayCueNotifyPaths() , AddGameplayCueNotifyPath() , GetAttributeSetInitter() ).
Deprecated — do not use
Do not emit Use in 5.8 Source
AGameplayCueNotify Static UGameplayCueNotify Static (a UObject ) Class never existed; GameplayCueNotify Static.h:19
EGameplayModOp::Multiplicative EGameplayModOp::MultiplyAdditive (legacy alias is spelled Multiplicitive ) GameplayEffectTypes.h:112 148
EGameplayModOp::Additive / Division AddBase / DivideAdditive Hidden back compat aliases, GameplayEffectTypes.h:141 143
EGameplayAbilityInstancingPolicy::NonInstanced InstancedPerActor UE DEPRECATED FORGAME(5.5) in Abilities/GameplayAbi