Use GASPALS in your own project¶
There are two ways to start:
| Start from | When |
|---|---|
| The template project (rename it) | A new game. Everything is configured. |
| Your project + the plugin | An existing project. Follow Installation, option B first. |
Then make GASPALS yours without editing more of the plugin than needed.
1. Create your own game mode¶
Create a Blueprint child of /GASPALS/Blueprints/GM_Sandbox, for example GM_MyGame, in your project's content.
| Setting (class defaults) | Value |
|---|---|
| Default Pawn Class | Your pawn (step 2), or a sample pawn. |
| Pawn Classes Soft | The pawns N cycles through; empty it to disable switching. |
| Visual Overrides Soft | The characters M cycles through (and DDCvar.VisualOverride indexes). |
| Player Controller Class | PC_Sandbox or a child of it. |
Deriving from GM_Sandbox matters: the visual override manager reads its character list from it.
Note
GM_Sandbox picks the pawn from DDCvar.PawnClass (-1 = Default Pawn Class). If your game should always use the Default Pawn Class, keep the variable at -1 and remove the N mapping.
2. Create your pawn¶
Make a child Blueprint of SandboxCharacter_CMC or SandboxCharacter_Mover (see Mover and CMC pawns to choose). A child keeps every system wired and lets you override what you need:
- Tune the components (cover, camera, first person) on your child's component templates.
- Override pawn functions (
Get_PropertiesForCamera,GetTraversalCheckInputs...) for different behavior. - Add your gameplay: health, abilities, weapons firing.
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. 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 Visibility (Set up cover in a level).
Set your maps in Project Settings > Maps & Modes (Game Default Map, Editor Startup Map).
4. Remove demo features¶
| Demo feature | How to remove |
|---|---|
| Pawn switching (N), character switching (M), teleport (J) | Remove IA_NextPawn, IA_NextVisualOverride, IA_TeleportToTarget from your mapping context. |
| Equipment and overlay menus (time dilation) | Remove the menu actions from the mapping context, and call SelectNewEquipment / overlay selection from your gameplay. |
| Mover debug flying (Z) | Delete the Input Key node in the Mover pawn's Event Graph. |
| Demo shooting and spawning | On the ragdoll pawn, the aim branches of IA_Takedown and IA_Interact. |
| On-screen debug prints | The camera perspective change prints its name; remove the Print String in AC_CameraSystem. |
5. Keep upgrades manageable¶
- Put your assets in your project's content, not in
Plugins/GASPALS. - Prefer child Blueprints 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.
6. Package¶
- Add your maps to Project Settings > Packaging > List of maps to include.
- 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.
- 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.