Use GASPALS in your own project¶
There are two ways to start:
| Start from | When |
|---|---|
The template project (copy the project folder and rename the .uproject) | A new game. Everything is configured. |
| Your project + the plugin | An existing project. Follow Installation, option B first: the plugin alone does not carry the collision channels, console variables and other project settings it needs. |
Then make GASPALS yours without editing more of the plugin than needed. The plugin's assets are under GASPALS Content in the Content Browser (turn on Settings > Show Plugin Content if you don't see it).
1. Create your own game mode¶
In the Content Browser, right-click /GASPALS/Blueprints/GM_Sandbox > Create Child Blueprint Class, and save the child in your project's content, for example as GM_MyGame. Open it and set its Class Defaults:
| Setting | Value |
|---|---|
| Default Pawn Class | Your pawn (step 2), or a sample pawn. |
| Pawn Classes Soft | The pawns N cycles through (DDCvar.PawnClass indexes this list). Put your pawn in it if you keep the N key, or leave it empty to turn pawn switching off. A class that does not load (the other side's pawn in a one-side build) is skipped with one log line. |
| Visual Overrides Soft | The characters M cycles through (DDCvar.VisualOverride indexes this list). |
| Player Controller Class | PC_Sandbox or a child of it (it handles N, M and J). |
Deriving from GM_Sandbox matters: the pawn switch and the visual override manager read their lists from it. In a game mode that does not derive from it, N and M do nothing and each pawn shows its own Default Visual Override (Characters, per pawn).
Always the same pawn
GM_Sandbox picks the pawn from DDCvar.PawnClass; at -1 (the default) it uses Default Pawn Class. If your game should always use the Default Pawn Class, keep the variable at -1 and empty Pawn Classes Soft: N then keeps the current pawn class. You can also remove the N mapping (step 3).
2. Create your pawn¶
Make a child Blueprint of SandboxCharacter_CMC or SandboxCharacter_Mover (right-click > Create Child Blueprint Class; see Mover and CMC pawns to choose; a one-side build has only one of them, see Which build you have). A child keeps every system wired, with every component setting of the sample, and lets you override what you need:
- Tune the systems on your child's components (select the inherited component in the Components panel): cover, camera, first person and the others.
- Override pawn functions (
Get_PropertiesForCamera,GetTraversalCheckInputs...) for different behavior. - Add your gameplay: health, abilities, weapons firing.
Then set it as the Default Pawn Class of your game mode.
Your own character mesh goes in as a visual override (see Add a retargeted character); keep the UEFN mannequin on the pawn as the animation source.
To build a pawn from scratch instead, see Add the systems to your own pawn.
3. Use your own input mapping context¶
The pawns add the contexts of their Input Mapping Contexts setting (class defaults, GASPALS > Input; default IMC_Sandbox) when a player possesses them. Rather than editing the plugin's IMC_Sandbox, duplicate it into your project's content, change the copy, and replace IMC_Sandbox with it in your pawn's Input Mapping Contexts. Keep the GASPALS input actions (IA_*) in it: the systems listen to those assets. See Add or rebind inputs. A game that adds its mapping contexts itself leaves Input Mapping Contexts empty and turns off Warn if No Input Mapping Contexts on the pawn.
4. Set up your levels¶
For each level, in World Settings > GameMode Override, pick GM_MyGame. Or set it once in Project Settings > Maps & Modes > Default GameMode.
Each level needs:
- a Player Start;
- a NavMeshBoundsVolume for cover runs and AI;
- traversable obstacles on the Traversable channel (Make objects traversable);
- cover geometry that blocks the Cover channel, as every profile that blocks Visibility does (Set up cover in a level).
Set your maps in Project Settings > Maps & Modes (Game Default Map, Editor Startup Map).
5. Remove demo features¶
| Demo feature | How to remove |
|---|---|
| Pawn switching (N), character switching (M), teleport (J) | Remove IA_NextPawn, IA_NextVisualOverride and IA_TeleportToTarget from your mapping context (step 3). |
| Equipment and overlay menus (slow motion while open) | Remove IA_Equipment, IA_Overlay_Pose, IA_Overlay_Body, IA_Select_Next and IA_Select_Previous from your mapping context, and select items and overlays from your gameplay (SelectNewEquipment on AC_EquipmentSystem, SelectNewOverlayPose / SelectNewOverlayBody on AC_OverlaySystem). |
| Debug tools: demo shooting and spawning (aim + Left Button / E), debug flying (Z), the pawn's teleport (J) | Turn off Enable Debug Tools on each pawn's AC_DebugTools component, or remove the component (the pawns don't reference it, so they still compile). See Debug tools. |
| The demo characters (NPCs, ragdoll targets) | Delete the BP_DemoSpawner actors from the demo levels, or set a spawner's Preferred Side. See Demo cast and Mover sublevels. |
| The moving platform and turntable of the demo levels | Remove the DefaultLevel_Mover and RagdollLevel_Mover sublevels from the level's Levels window. |
| On-screen debug prints | The camera perspective change (1) prints the perspective name and the style change (2) prints "Camera change ..."; remove the two Print String nodes in the Event Graph of AC_CameraSystem. |
To turn off a whole system (camera, cover, equipment, first person, overlay, ragdoll, takedowns and shoves, traversal) or remove its component, see Turning systems on and off.
6. Check that it works¶
- Open one of your levels and press Play. You control your pawn (not a sample pawn), with your input mapping context.
- Walk, sprint, crouch, and press Space at a low traversable obstacle: the character vaults or mantles. If it only jumps, the obstacle is not on the Traversable channel or the project settings are missing.
- Walk into a wall: the character takes cover. Hold T, scroll to the rifle and release: it is in hand.
- No orange message appears on screen. A message listing
DDCvar.*names means the console variables from Installation are missing; InputMappingContexts is empty means your pawn's Input Mapping Contexts is empty (turn off Warn if No Input Mapping Contexts if your game adds its contexts itself). - For a multiplayer game, play as a listen server with a client (Networking).
If something does not work, see Troubleshooting.
7. Keep upgrades manageable¶
- Put your assets in your project's content, not in
Plugins/GASPALS. - Prefer child Blueprints, duplicates and new data assets over editing the plugin's assets.
- When you must edit a plugin asset, note it: you will merge it by hand when updating GASPALS.
8. Package¶
- Add your maps to Project Settings > Packaging > List of maps to include in a packaged build.
- Keep the packaging settings from Installation.
- Install a C++ toolchain (Visual Studio 2022 on Windows): the engine plugins GASPALS needs make the packaging tool build a game target, even for a Blueprint-only project.
- Platforms > Windows > Package Project.
The demo's Game Animation Widget, Controls and Read Me panels are editor utility widgets: they do not exist in a packaged game.