First Steps with Ninja G.A.S.
This page guides you through the first steps for Ninja G.A.S. Make sure to check the G.A.S. Setup instructions before continuing.
The following steps aim to provide a character that has access to an Ability System Component. We will cover both common ownership models: one where the Ability System Component is owned by the Character, and another where it is owned by the Player State.
G.A.S. Setup Data
The G.A.S. Setup Data Asset defines the initial Attribute Sets, Gameplay Effects, and Gameplay Abilities granted to an actor during Ability System initialization.
Create a G.A.S. Setup Data Asset
Create a new G.A.S. Setup Data Asset.
You can do so by right-clicking an empty area in the Content Browser, then navigating to Ninja Bear Studio → Ninja G.A.S. → G.A.S. Setup.
Add any Attribute Sets required by your project. For example, you can use the one provided by Ninja Combat.
Add any startup Gameplay Effects required by your project.
Add any startup Gameplay Abilities required by your project.
Character Base Class
Ninja G.A.S. provides base character classes for common Gameplay Ability System setups. The main decision is where the Ability System Component should live.
Base Class | ASC Owner | Common Use |
|---|---|---|
| Character | AI characters, NPCs, single-player characters, or simpler player setups. |
| Player State | Multiplayer player characters where the ASC should persist beyond pawn changes. |
Character-Owned ASC
Use this setup when the Ability System Component should live directly in the character.
Create a Character-Owned ASC Setup
Create a new Character using
NinjaGASCharacteras the base class.Use this class for AI agents, NPCs, or player characters where the ASC does not need to persist across pawn changes.
Configure the character's Ability System Component using the G.A.S. Setup Data Asset.
Player State-Owned ASC
Use this setup when the Ability System Component should live in the Player State.
Create a Player State-Owned ASC Setup
Create a new Player State using the Ninja G.A.S. Player State base class,
NinjaGASPlayerState.Create a new Character using
NinjaGASPlayerCharacteras the base class.Set your Game Mode to use the new Player State class.
Use this setup for projects where the ASC should persist across pawn changes.
Configure the Player State's Ability System Component using the G.A.S. Setup Data Asset.
Next Steps
At this point, you have a character that can access an Ability System Component and initialize it through a G.A.S. Setup Data Asset.
From here, you can:
Learn more about Lazy Loading for the Ability System Component.
Learn more about Batch Activation in the Ability System Component.
Learn how to adopt Ability Bundles from possessed pawns, allowing one Player State to work with different pawns.