Architecture¶
GASPALS is built from three layers:
- The pawn owns movement, input and the meshes, and exposes its state through an interface.
- System components (camera, cover, equipment, first person, overlay, ragdoll, interactions, traversal, debug tools) sit on the pawn. Each one is self-contained: it reads what it needs from the pawn and its own settings, handles its own input actions, and asks the other systems for state through small interfaces, never through their classes. Each can be switched off (Turning systems on and off).
- Anim Blueprints pull the pawn's state every frame and turn it into a pose, with layers linked in by the systems.
flowchart TB
subgraph Framework
GM[GM_Sandbox<br>pawn and character lists] --- PC[PC_Sandbox<br>pawn and character switch, teleport]
end
subgraph PawnBox[Pawn: SandboxCharacter_Mover / _CMC]
Move[Movement<br>CharacterMover or CMC]
Meshes[UEFN mesh, first-person logic mesh,<br>VisualOverride child actor]
Systems[System components<br>Camera, Cover, Equipment, FirstPerson,<br>Overlay, Traversal, Ragdoll, Interaction, VisualOverride]
Iface[BPI_SandboxCharacter_Pawn<br>Get_PropertiesForAnimation / Camera / Traversal]
end
ABP[Character Anim Blueprint] -->|pull every frame| Iface
Director[Camera director] -->|pull every frame| Iface
Systems -->|link anim layers,<br>attach items| ABP
Systems -->|read state| Iface
GM -->|spawns| PawnBox The pawns¶
| Pawn | Base class | Movement |
|---|---|---|
SandboxCharacter_Mover | Pawn | Mover (CharacterMoverComponent) with Network Prediction; ragdoll mode with Physics Control (physical animation, settling) |
SandboxCharacter_CMC | Character | Character Movement Component; ragdoll with Physics Control (physical animation, settling) |
The pawns share the same systems; they differ in how movement, prediction and replication work. See Mover and CMC pawns.
Each pawn has:
- a UEFN mannequin mesh running the character Anim Blueprint (the animation source for every character);
- a hidden first-person logic mesh (
SkeletalMesh_FP) running the first-person Anim Blueprint; - a
VisualOverrideChild Actor component for retargeted characters; - a Gameplay Camera component, the pawn's only camera;
- a Motion Warping component for traversal;
- the system components below.
System components¶
| Component | System | Initialized with |
|---|---|---|
AC_OverlaySystem | Overlay poses and body styles | the third-person mesh |
AC_EquipmentSystem | Items in hand | pawn, third- and first-person meshes, the visual meshes to attach to |
AC_CameraSystem | Perspective, camera attachment, crosshair | pawn, visual meshes, Gameplay Camera component |
AC_RagdollSystem (AC_RagdollSystem_Mover / _CMC) | Ragdoll and get-ups | pawn, mesh, capsule |
AC_InteractionSystem (AC_InteractionSystem_Mover / _CMC) | Takedowns and shoves | pawn, mesh, capsule |
PhysicsControl (both pawns), AC_PostABPTick (Mover pawn) | Physical animation and ragdoll strengths | (found by the ragdoll component) |
AC_DebugTools | Demo shot, spawn / rotate, teleport, fly | (reads its owner when used) |
AC_FirstPersonSystem | First-person meshes and visibility for the pawn, the visible character and the held item | the active body and the first-person logic mesh |
AC_CoverSystem_Mover / _CMC | Cover | pawn |
AC_TraversalLogic (AC_TraversalLogic_Mover / _CMC), AC_TraversalTracer | Vault, hurdle, mantle | (reads the pawn on every attempt) |
AC_VisualOverrideManager | Visible character | (reads the game mode's list) |
AC_SmartObjectAnimation (_Mover / _CMC) | Using benches and other smart objects (interaction range, box size and object types under GASPALS > Interaction > Trace) | (finds the movement component) |
AC_FoleyEvents | Footstep and movement sounds | (called by animation notifies) |
Components that react to input bind their own input actions (AC_CameraSystem handles the perspective keys, AC_EquipmentSystem the equipment menu, and so on), so adding a component adds its controls. They only receive input when the pawn is player controlled.
Initialization¶
Systems are initialized by the pawn, through the interface BPI_ModularSystems and its event InitializeModularSystems. The pawn calls it at the end of BeginPlay, and AC_VisualOverrideManager calls it again whenever the visible character changes, because the meshes change. AC_FirstPersonSystem calls it once more when a player takes control of a pawn spawned during play (the next pawn after N): first-person meshes are built for the local player only, so they appear at that point, and every system then picks them up.
sequenceDiagram
participant P as Pawn
participant FP as AC_FirstPersonSystem
participant O as AC_OverlaySystem
participant E as AC_EquipmentSystem
participant C as AC_CameraSystem
participant R as AC_RagdollSystem (CMC)
participant I as AC_InteractionSystem (CMC)
participant Cv as AC_CoverSystem
P->>FP: UpdateFirstPersonVisuals > SetActiveBody (build FP meshes)
P->>O: Overlay_Initialize > InitializeSystem(mesh)
P->>E: Equipment_Initialize > InitializeSystem(pawn, meshes, visual meshes)
P->>C: InitializeSystem(pawn, visual meshes, camera)
P->>R: Ragdoll_Initialize > InitializeSystem(pawn, mesh, capsule)
P->>I: Interaction_Initialize > InitializeSystem(pawn, mesh, capsule)
P->>FP: FirstPerson_InitializePrimitives
P->>Cv: InitializeSystem(pawn)
P->>Cv: bind OnCoverVaultReady → traversal The Mover pawn calls Ragdoll_Initialize and Interaction_Initialize once, in BeginPlay, instead. Because the event can run several times, every InitializeSystem is written to be safe to call again. Follow the same rule in your own systems. The _Initialize steps are small pawn functions that find the component by class and skip it when the pawn doesn't have one, so those components can be removed (Turning systems on and off).
When a player possesses the pawn, a client RPC runs SetupCamera (activates the Gameplay Camera for the player controller) and SetupInput (adds every mapping context of Input Mapping Contexts, default IMC_Sandbox), then BPFL_GASPALS.CheckConsoleVariables, which shows an on-screen warning listing the DDCvar.* console variables the project does not declare. It checks the variables every pawn needs plus the ones the pawn passes in PawnConsoleVariables: the Mover pawn passes the four that only it reads, the CMC pawn none.
Shared systems never name a pawn class or Mover content. They ask the pawn through BPI_SandboxCharacter_Pawn (for example Set_MovementModeByName, Get_MovementModeName and Set_GravityOverride for the movement mode and gravity) or use a component class per side (_Mover / _CMC), which is what lets a build contain one pawn only (Which build you have).
Per-frame data flow¶
Data is pulled. The pawn implements BPI_SandboxCharacter_Pawn with getters that assemble its state into structs:
| Getter | Struct | Read by |
|---|---|---|
Get_PropertiesForAnimation | S_CharacterPropertiesForAnimation: input state, movement state and mode, stance, rotation mode, gait, direction, transform, velocity, acceleration, aim rotation, ground, in cover... | Character Anim Blueprints, overlay and first-person Anim Blueprints, cover, the bow |
Get_PropertiesForCamera | S_CharacterPropertiesForCamera: perspective, style, mode (free, strafe, aim), shoulder, stance | Camera director |
Get_PropertiesForTraversal | S_CharacterPropertiesForTraversal: capsule, mesh, motion warping, mode, gait, speed | AC_TraversalLogic |
Get_AimRay | The crosshair aim ray (origin, direction, aimed point, trace channel and distance), forwarded from AC_CameraSystem | Cover (cover target, aim from cover) |
Get_PropertiesForRagdoll, Get_MMIResult, Get_MMIAnimContexts | Ragdoll and interaction data | Character Anim Blueprints (both pawns forward them to the ragdoll and interaction components) |
The Anim Blueprints copy the struct on the game thread (Update_PropertiesFromCharacter) and compute the pose on a worker thread.
Writes go the other way through layer linking: the overlay and equipment systems call LinkAnimClassLayers on the meshes to swap the Anim Blueprints that implement the overlay layers (ALI_OverlayPose, ALI_OverlayBody, ALI_OverlayFirstPerson).
Input to movement¶
Input actions set the pawn's input state (PlayerInputState: wants to sprint, walk, strafe, aim, crouch). Each frame, Mover calls the pawn's ProduceInput, which builds the input command: move direction (after the cover system's remap), cover data from EvaluateCover, control rotation, gait, rotation mode, crouch request. Mover then simulates the movement modes with that command on the owner and the server, and the pawn caches the simulated result for animation and camera (CacheInputsFromMover).
Input actions set CharacterInputState and add movement input. AC_PreCMCTick runs the pawn's pre-movement update before the Character Movement Component each frame: cover (UpdateCoverCMC), rotation and the speed settings for the current gait. The CMC then moves the character and replicates it as usual.
Game framework¶
| Class | Role |
|---|---|
GM_Sandbox | Game mode. Default pawn SandboxCharacter_Mover; Pawn Classes Soft (Mover, CMC) cycled by DDCvar.PawnClass; Visual Overrides Soft (Kellan, Manny, Quinn) cycled by DDCvar.VisualOverride. Respawns all players in place when the pawn class changes. |
PC_Sandbox | Player controller: next pawn (N), next character (M), teleport (J; through the pawn's AC_DebugTools when it has one); hides the touch joystick when a gamepad is used. |
There is no global game mode in the project settings: each level sets it in its World Settings.
Where to extend¶
| You want to | Do this |
|---|---|
| Use GASPALS as your game's base | Start from the template or copy the plugin; see Use GASPALS in your own project. |
| Change a pawn's behavior | Make a child Blueprint of a sample pawn and override functions, or edit the sample. |
| Use the systems on another pawn | Add the systems to your own pawn. |
| Turn a system off or drop it | Turning systems on and off. |
| Add an item or overlay | Data assets and child Anim Blueprints: Add an equipment item, Add an overlay state. |
| Show another character | Add a retargeted character. |