Getting started
Like every Pulse plugin, Pulse Skill is used in four steps: Set Up, Create, Test and Check. The Pulse window (Tools > Pulse > Pulse) walks through them, and its Guide shows each step in the editor. The list at the start of each section comes from the plugin itself; the text after it goes into the details.
To see skills working before you set anything up, start with Test: the plugin brings an example map.
The details build a minimal setup: one skill tree with two skills, a component on the player state, skill points and a button that unlocks a skill. Every part has an example that you can create in your project from the Pulse Docs tab of the editor (Create in project…). The examples belong together: create the player state at the end and it creates the tree, the skills and the abilities it uses as well.
Set Up
The Pulse window (Tools > Pulse > Pulse, tab Workflow, step Set Up) checks each of these and fixes it with a click:
- Add the Pulse Skill Component to the Player State. Keeps the ranks, skill points and progressions of a player and gives the abilities of unlocked skills. On the player state it survives respawns.
- Optional: Give the player state or the pawn an ability system component. Skills grant abilities and effects through GAS; the skill component uses the ability system of its owner or of the pawn.
- Optional: Let the Asset Manager scan PulseSkillTree assets. An entry in Project Settings > Game > Asset Manager > Primary Asset Types to Scan gives the assets their primary asset id (lookups by id, async loading) and lets the cook find them.
- Optional: Let the Asset Manager scan PulseSkillDefinition assets. An entry in Project Settings > Game > Asset Manager > Primary Asset Types to Scan gives the assets their primary asset id (lookups by id, async loading) and lets the cook find them.
- Optional: Let the Asset Manager scan PulseSkillProgression assets. An entry in Project Settings > Game > Asset Manager > Primary Asset Types to Scan gives the assets their primary asset id (lookups by id, async loading) and lets the cook find them.
- Optional: Connect with PulseGameplay: PulseSkillInventoryBridge. Skills that lend items or upgrade the inventory.
- Optional: Connect with PulseGameplay: PulseSkillHUDBridge. Toasts on the Pulse HUD for level ups, skill points and skills, and the skill menu on a key.
- Optional: Connect with PulseBuild: PulseBuildSkillBridge. Skill ranks that unlock build pieces and catalogs of Pulse Build (grant Unlock Build Pieces).
Enable the plugin
Enable Pulse Skill in Unreal Editor (Edit > Plugins) and restart the editor. It enables PulseFoundation (the free Pulse base plugin, 1.0 or newer), Gameplay Abilities, Model View Viewmodel, CommonUI and Enhanced Input as well.
If you use the plugin from C++, add the modules to your Build.cs:
PublicDependencyModuleNames.AddRange(new string[]
{
"GameplayAbilities",
"GameplayTags",
"PulseSkill",
"PulseSkillMVVM", // only for the view models
"PulseSkillUI" // only for the widgets
});
Gameplay tags
Every skill is identified by a gameplay tag. It is saved and replicated, so pick a stable naming scheme, for example:
Skill.Warrior.Charge
Skill.Warrior.Whirlwind
SkillTree.Warrior
The plugin does not require a tag root; any naming scheme works.
The examples use these tags. Create the table, then add it to Project Settings > Gameplay Tags > Gameplay Tag Table List so the tags exist:
Add the component
The skill component (UPulseSkillComponent) keeps the ranks and points of a player. Add Automatically on the start page turns on Skill Component in Project Settings > Pulse > Skill, which adds it to every player state when it spawns. Or add a Pulse Skill Component to your player state Blueprint yourself, then add the tree (see Create) to Skill Trees. The player state is the best place: it survives respawns, and the component gives the abilities again to the new pawn.
If the ability system component is on the pawn, nothing else is needed. The component finds it on the owner, and for a player state on its pawn. For other setups see Finding the ability system.
The example player state has an ability system component and a skill component with the example tree, the example progression and one starting skill point. Its event graph prints rank changes, level ups and failed requests, and has three custom events to try it out: in a game that uses it as Player State Class, enter ke * UnlockCharge, ke * UnlockWhirlwind or ke * GiveExperience (150 experience) in the console.
Save
The component saves itself as bytes: PulseSave keeps it without a bridge (byte collector of PulseSave). Your own save code can call SaveToBytes / LoadFromBytes. See Save and load.
Create
New assets come from Add > Pulse > Skill in the content browser or New in the Pulse window:
- Skill Tree (
UPulseSkillTree, the main asset): A tree of skills with ranks and prerequisites, edited as a graph. - Skill (
UPulseSkillDefinition): One skill: ranks with conditions, costs, rewards and grants. - Skill Progression (
UPulseSkillProgression): Experience and levels with rewards. - Starter content: The example skill tree (warrior and archer, ten skills with ranks and prerequisites). Add Starter Content copies it to
/Game/Pulse/PulseSkill.
Create the skills
In the Content Browser: Add > Pulse > Skill > Skill.
For Charge:
| Field | Value |
|---|---|
| Skill Tag | Skill.Warrior.Charge |
| Display Name / Description / Icon | for your UI |
| Ranks | 1 entry. Costs: Skill Points (Amount 1) |
| Grants | Grant Ability with GA_Charge |
For Whirlwind add 3 ranks, each costing one skill point, and a Grant Ability with GA_Whirlwind. The rank of the skill is used as ability level, so the ability can scale with it.
The two example skills. Whirlwind also shows conditions on single ranks: rank 2 needs two points spent in the tree (Points Spent In Tree), rank 3 level 5 of the example progression (Level). See Conditions, costs, rewards and grants.
The abilities they grant only print their level:
Create the skill tree
Add > Pulse > Skill > Skill Tree, open it and set Tree Tag to SkillTree.Warrior in the details panel. Then build the tree in the graph (see Skill tree editor):
- Drag Charge and Whirlwind from the Content Browser into the graph.
- Drag from the bottom of Charge to the top of Whirlwind: Whirlwind now needs Charge rank 1.
Save the asset. Validate in the toolbar reports missing tags, missing prerequisites and bad ranks.
Test
- Play Example in the Pulse window opens
/PulseSkill/Examples/LV_PulseSkill_Exampleand starts Play in Editor. - Then the cheat
PulseSkillGrantgives the player what the plugin needs, andPulseSkillMenuruns. - Unlock skills in the skill menu (PulseSkillMenu shows and hides it, PulseSkillGrant gives points); the Live page of the Pulse Debugger shows ranks and points.
The example map
The plugin brings an example map, /PulseSkill/Examples/LV_PulseSkill_Example (enable Show Plugin Content in the content browser). Its game mode uses a player state with an ability system and the skill component, which has the example tree Warrior and Archer (/PulseSkill/Examples/Tree: ten skills with ranks and prerequisites) and 5 skill points to start with. Play Example for Skill in the Pulse window opens it, starts Play in Editor, gives 10 skill points (PulseSkillGrant) and shows the skill menu (PulseSkillMenu, see Console). To build on the example tree, Add > Pulse > Skill > Add Starter Content copies it to /Game/Pulse/PulseSkill/Tree.
Give skill points
On the server, for example when the player levels up:
if (UPulseSkillComponent* skills = UPulseSkillLibrary::GetSkillComponent(PlayerState))
{
skills->AddSkillPoints(FGameplayTag(), 1); // empty tag = default pool
}
Or set Starting Skill Points on the component, or let a progression give points on level up (the example player state does both).
Unlock from UI
skills->TryUnlockSkill(TAG_Skill_Warrior_Charge);
In Blueprint call Try Unlock Skill, or Request Skill Change to wait for the result. On a client the request goes to the server. Listen to On Request Failed to show why it did not work (Get Display Text of the result), and to On Skill Rank Changed to update your UI. The view models do all of that for you, and the skill menu widget shows the whole tree without any setup.
Check
- Check in the Pulse window, Check All there (console
Pulse.Check) or the commandlet-run=PulseCheck -Plugins=PulseSkillchecks the setup and validates every Skill Tree, Skill and Skill Progression in the project.
Validate in the toolbar of the skill tree editor checks one tree while you edit it: missing tags, missing prerequisites and bad ranks. Check does the same for every skill asset of the project, together with the setup.