Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Browser & automation

ue-gameplay-framework

Use when writing or fixing Unreal Engine gameplay framework classes — GameMode, GameState, PlayerController, PlayerState, Pawn, Character, HUD, GameInstance — and the flows they own: player join, pawn spawning, match state, travel and non-GAS damage. Also use when the user mentions 'AGameModeBase', 'PostLogin', 'OnPostLogin', 'RestartPlayer', 'SpawnDefaultPawnFor', 'ChoosePlayerStart', 'match state', 'PossessedBy', 'seamless travel', 'ServerTravel', 'DrawHUD', 'TakeDamage', 'ApplyRadialDamage' or 'create session'. For replication, see ue-networking-replication; for CharacterMovementComponent, see ue-character-movement; for cameras, see ue-gameplay-cameras; for input, see ue-input-system.

quodsoler · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add quodsoler/unreal-engine-skills --skill ue-gameplay-framework

About this skill


name: ue-gameplay-framework description: "Use when writing or fixing Unreal Engine gameplay framework classes — GameMode, GameState, PlayerController, PlayerState, Pawn, Character, HUD, GameInstance — and the flows they own: player join, pawn spawning, match state, travel and non-GAS damage. Also use when the user mentions 'AGameModeBase', 'PostLogin', 'OnPostLogin', 'RestartPlayer', 'SpawnDefaultPawnFor', 'ChoosePlayerStart', 'match state', 'PossessedBy', 'seamless travel', 'ServerTravel', 'DrawHUD', 'TakeDamage', 'ApplyRadialDamage' or 'create session'. For replication, see ue-networking-replication; for CharacterMovementComponent, see ue-character-movement; for cameras, see ue-gameplay-cameras; for input, see ue-input-system." metadata: version: "2.0.0" engine: "5.8"

UE Gameplay Framework

Target engine: UE 5.8. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

The gameplay framework is the set of classes the engine spawns for you — AGameModeBase, AGameStateBase, APlayerController, APlayerState, APawn, ACharacter, AHUD, UGameInstance — plus the join, spawn, match-state, travel and damage flows that wire them together. All of it ships in the Engine module (Classes/GameFramework, Classes/Engine, Classes/Kismet), so Build.cs needs "Core", "CoreUObject", "Engine". Add "EnhancedInput" when binding input, and "OnlineSubsystem" + "OnlineSubsystemUtils" (or "OnlineServicesInterface") only when touching sessions.

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
Which class holds which data; server vs client presenceClass Responsibility Map
Join flow, player starts, pawn spawning, match stateGameMode
Replicated scores, timers, connected-player listGameState
Per-player input, RPC bridge, possession, input modePlayerController
Per-player replicated stats, team, namePlayerState
Possessable bodies, PossessedBy, character setupPawn and Character
Canvas overlay, hit boxes, showdebugHUD
Health and damage without Gameplay AbilitiesDamage without GAS
Data that survives level load, subsystems, accessorsGameInstance
Hosting, finding and joining online sessionsSessions
ServerTravel, ClientTravel, seamless travelTravel

Presence/authority matrix, the full class declarations these snippets come from, lifecycle order and inherited-property tables: references/framework-class-map.md.

Class Responsibility Map

ClassLives onOwnsNever put here
AGameModeBase / AGameModeServer and standalone only; nullptr on clientsRules, join approval, spawn selection, match stateAnything a client must read
AGameStateBase / AGameStateEverywhere, replicatedGlobal replicated state, PlayerArray, server clockServer-only decisions
APlayerControllerServer holds all; each client holds only its ownInput, RPC bridge, possession, input mode, view targetData other clients need
APlayerStateEverywhere (bAlwaysRelevant = true)Per-player replicated stats, team, name, pingInput handling, UI state
APawn / ACharacterServer plus all clientsThe body: collision, mesh, movementRules, scoring
AHUDLocal players only; never on a dedicated serverCanvas overlay, hit boxes, debug displayReplicated data
UGameInstanceOne per process, survives every level loadSession handles, cross-level state, subsystemsPer-match state

APlayerState sets bReplicates = true and bAlwaysRelevant = true in its constructor, which is why scoreboards work at any distance.

GameMode (Server Only)

AGameModeBase is the minimal base. AGameMode adds the match state machine — use it when you need MatchState::EnteringMap → WaitingToStart → InProgress → WaitingPostMatch → LeavingMap (plus Aborted on failure).

Join sequence (server only)

OrderSignature to overrideNotes
1virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)Before any player joins; also virtual void InitGameState()
2virtual void PreLogin(const FString& Options, const FString& Address, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage)Set ErrorMessage non-empty to reject. For a non-blocking credential check override PreLoginAsync(..., const FOnPreLoginCompleteDelegate& OnComplete) (GameModeBase.h:303) instead; it must always call OnComplete (empty string = accept) or the connection hangs, and it must still run the PreLogin checks
3virtual APlayerController* Login(UPlayer* NewPlayer, ENetRole InRemoteRole, const FString& Portal, const FString& Options, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage)Spawns the APlayerController and its APlayerState
4virtual void PostLogin(APlayerController* NewPlayer)First point where server→client RPCs are safe
5virtual void OnPostLogin(AController* NewPlayer)Protected; runs at the end of PostLogin, last hook before the pawn spawns
6virtual void HandleStartingNewPlayer_Implementation(APlayerController* NewPlayer)BlueprintNativeEvent; calls RestartPlayer unless the player must spectate
7virtual void RestartPlayer(AController* NewPlayer)FindPlayerStart → SpawnDefaultPawnFor →
Read the complete source ↗