/unreal-dev:unreal-gasfrom unreal-dev
Guides Unreal Engine developers through Gameplay Ability System setup: AbilitySystemComponent, attribute sets, abilities, effects, gameplay tags, replication mode, and owner/avatar initialization.
Ships in unreal-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The ability system puts actions, numbers and their changes in one component with its own replication; most set-up bugs are an owner and avatar that were never initialised.
Four pieces, one rule each: the component (UAbilitySystemComponent) lives on one actor and is initialised with an owner and an avatar on every machine; attributes live in an attribute set registered with that component; abilities are granted on the server and always end; effects are the only way numbers and tags change for good.
| The situation | Read |
|---|---|
| Adding the ability system to a project | Set-up in order below, reference/asc-setup.md §1 |
| Player state or pawn for the component; owner and avatar; replication mode | reference/asc-setup.md §2 to §4 |
| "Abilities fail on the client", "works for the host only", "null avatar after respawn" | Initialisation failures below, reference/asc-setup.md §5 |
| Declaring, replicating and clamping attributes; initial values | reference/attributes.md, templates/CourierAttributeSet.h |
| Granting, activating, committing, ending; policies; prediction; effects and specs | reference/abilities-and-effects.md, templates/VaultAbility.h |
| Tags: config or native, matching, tags on the component | reference/tags.md, templates/CourierGameplayTags.h |
| Checking a project's set-up without the engine | scripts/gas_check.py |
| Property replication rules in general | unreal-replication |
| The player state and character classes the component sits on | unreal-gameplay-framework |
| Montages played by abilities | unreal-animation |
GameplayAbilities in the .uproject; list
"GameplayAbilities", "GameplayTags", "GameplayTasks" in the module's Build.cs (public when
public headers include ability-system headers).ACourierPlayerState (stamina and
granted abilities survive a respawn), avatar the character. Sentries and anything that resets
with its body: the component on the pawn, owner and avatar the same actor.SetReplicationMode(EGameplayEffectReplicationMode::Mixed)
for players, Minimal for AI.IAbilitySystemInterface::GetAbilitySystemComponent() on the owner, and
on the avatar too when they differ.InitAbilityActorInfo(Owner, Avatar): in the character's
PossessedBy (server) and OnRep_PlayerState (client) for a player-state component; again
after every respawn.PossessedBy: GiveAbility(FGameplayAbilitySpec(UVaultAbility::StaticClass(), 1, -1, this)).TryActivateAbilitiesByTag with Courier.Ability.Vault, or by class.scripts/gas_check.py, then a two-player run (unreal-replication →
reference/ownership-and-relevancy.md §6).Step 5 for the player-state component (the full additions to both classes:
reference/asc-setup.md §3):
void ACourierCharacter::PossessedBy(AController* NewController)
{
Super::PossessedBy(NewController); // server or standalone only
if (ACourierPlayerState* Courier = GetPlayerState<ACourierPlayerState>())
{
Courier->GetAbilitySystemComponent()->InitAbilityActorInfo(Courier, this);
}
}
void ACourierCharacter::OnRep_PlayerState()
{
Super::OnRep_PlayerState(); // clients
if (ACourierPlayerState* Courier = GetPlayerState<ACourierPlayerState>())
{
Courier->GetAbilitySystemComponent()->InitAbilityActorInfo(Courier, this);
}
}
void UVaultAbility::ActivateAbility(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
const FGameplayAbilityActivationInfo ActivationInfo, const FGameplayEventData* TriggerEventData)
{
if (!CommitAbility(Handle, ActorInfo, ActivationInfo, nullptr)) // pays GE_StaminaDrain
{
EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
return;
}
if (ACharacter* Courier = Cast<ACharacter>(GetAvatarActorFromActorInfo()))
{
Courier->Jump();
}
EndAbility(Handle, ActorInfo, ActivationInfo, true, false); // on every path
}
In the Blueprint child GA_Vault: Instancing Policy Instanced Per Actor, Net Execution Policy
Local Predicted (the client runs it at once; the server can override; instant changes such as
damage do not roll back), cost effect GE_StaminaDrain. Long work (the AM_Vault montage) runs in
an ability task such as UAbilityTask_PlayMontageAndWait, and the ability ends from its delegate.
FGameplayAttributeData members that are UPROPERTYs, with the four
GAMEPLAYATTRIBUTE_PROPERTY_GETTER / _VALUE_GETTER / _VALUE_SETTER / _VALUE_INITTER
macros; replicated with ReplicatedUsing = OnRep_<Attr>, a UFUNCTION() repnotify that calls
GAMEPLAYATTRIBUTE_REPNOTIFY, and
DOREPLIFETIME_CONDITION_NOTIFY(UCourierAttributeSet, Stamina, COND_None, REPNOTIFY_Always).
Clamp in PreAttributeChange (every change, no side effects) and again in
PostGameplayEffectExecute (after an execution changed the base value).
| Symptom | Cause |
|---|---|
| Activation fails on the owning client, works on the server | no client-side InitAbilityActorInfo (OnRep_PlayerState) |
| Works for the listen-server host only | the same, or abilities given on a client; only the server gives |
| Avatar null or stale after a respawn | InitAbilityActorInfo not called again with the new pawn |
GetSet<UCourierAttributeSet>() null, attributes read 0 | the set created on another actor than the component's owner |
| The vault works once | EndAbility missing on a path |
| Clients see the start value of Stamina only | the attribute not registered for replication |
| Compile or link errors on ability-system types | a module missing from Build.cs, or the plugin disabled |
Causes and fixes in full: reference/asc-setup.md §5, reference/attributes.md §7,
reference/abilities-and-effects.md §6, reference/tags.md §5.
python3 scripts/gas_check.py /path/to/CourierRun
python3 scripts/gas_check.py /path/to/CourierRun --strict # warnings fail too
FAIL lines: an ability-system header without its Build.cs module, the plugin disabled, an
attribute that is not a UPROPERTY, a replicated attribute with no registration or a repnotify
that is not a UFUNCTION or skips GAMEPLAYATTRIBUTE_REPNOTIFY, and a class that lists
IAbilitySystemInterface without GetAbilitySystemComponent. WARN lines: GameplayAbilities
without GameplayTags or GameplayTasks, no enabled plugin entry, a registration without
REPNOTIFY_Always, no InitAbilityActorInfo anywhere, a player-state component missing its
OnRep_PlayerState or PossessedBy initialisation, GiveAbility without an authority check,
and Minimal on a player's component. It reads no Blueprint, Default Starting Data or data table;
0 attribute sets, 0 components means nothing was judged.
unreal-replicationunreal-gameplay-frameworkunreal-enhanced-inputunreal-animationunreal-modules-buildreference/abilities-and-effects.md (opens in a new tab)reference/asc-setup.md (opens in a new tab)reference/attributes.md (opens in a new tab)reference/tags.md (opens in a new tab)scripts/gas_check.py (opens in a new tab)templates/CourierAttributeSet.cpp (opens in a new tab)templates/CourierAttributeSet.h (opens in a new tab)templates/CourierGameplayTags.cpp (opens in a new tab)templates/CourierGameplayTags.h (opens in a new tab)templates/VaultAbility.cpp (opens in a new tab)templates/VaultAbility.h (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tipoli5890/game-studio --plugin unreal-dev17 skills in this plugin
/unreal-animationUnreal animation: Animation Blueprint or C++ UAnimInstance, NativeUpdateAnimation, montages, slots, sections, notifies and notify states, root motion./unreal-asset-importImport meshes, textures and animation into Unreal by script: AssetImportTask, Interchange pipelines, glTF and FBX options, static or skeletal mesh, budget check./unreal-automation-testsUnreal automation tests: IMPLEMENT_SIMPLE_AUTOMATION_TEST, Automation Spec, latent commands, Automation RunTest on the command line, the JSON report as verdict.