Skills and skill trees
Skill Definition (UPulseSkillDefinition)
Create it with Add > Pulse > Skill > Skill Definition.
| Property | Description |
|---|---|
SkillTag | Unique, stable id. Saved and replicated. Do not change it after release. |
DisplayName, Description, Icon | For UI. |
SkillTags | Free tags for your game (grouping, filters). Not used by the plugin. |
bCanRefund | Whether players can refund ranks with TryRefundSkill. Resets ignore it. |
Ranks | One entry per rank. The number of entries is the highest rank. |
Grants | Applied from rank 1 on, with the rank as level. |
Each rank (FPulseSkillRank) has:
| Property | Description |
|---|---|
Description | Text for UI, e.g. “+10% damage”. |
Conditions | Pulse conditions that must pass to unlock this rank. |
Costs | Pulse costs, all paid when this rank is unlocked, given back when it is refunded. |
Rewards | Pulse rewards, given once when this rank is unlocked. |
Grants | Applied from this rank on, in addition to the grants of the skill. |
Grants and ranks
The grants of a skill at rank N are the skill’s Grants plus the Grants of ranks 1 to N. All of them get N as level. Examples:
- An ability that gets stronger with each rank: one
Grant Abilityin the skill’sGrants. - A skill whose rank 3 adds a second ability: put the second
Grant AbilityintoRanks[2].Grants.
Skill Tree (UPulseSkillTree)
Create it with Add > Pulse > Skill > Skill Tree. Double click it to open the skill tree editor, a graph in which you place the skills and connect them. The graph edits the properties below; you can still change them in the details panel.
| Property | Description |
|---|---|
TreeTag | Id of the tree. Used by ResetTree, FindSkillTree and UI. |
DisplayName, Description | For UI. |
Nodes | The skills of the tree. |
Each node (FPulseSkillTreeNode) has:
| Property | Description |
|---|---|
Skill | The skill asset. |
Prerequisites | Skills of this tree with the rank they need (FPulseSkillPrerequisite: Skill, MinRank). |
EditorPosition | Position of the node in the skill tree editor, also available to UI layouts. The runtime does not use it. |
For a skill of another tree, use the Skill Rank condition on the rank instead of a prerequisite.
Example: two skills, Whirlwind needs Charge at rank 1. The skills are examples of Getting started; Create in project… creates them together with the tree.
Validation
Both assets implement IsDataValid. Errors are shown when saving the asset and by Tools > Validate Data:
- Skill: no
SkillTag, no ranks, empty grants; a warning for conditions, costs or rewards without a type. - Tree: nodes without skill or skill tag, a skill that is in the tree twice, prerequisites that are not in the tree, a
MinRankhigher than the highest rank of the needed skill, a skill that needs itself, and cycles in the prerequisites.
Changing trees at runtime
The component’s SkillTrees can change at runtime (AddSkillTree, RemoveSkillTree), for example to unlock a new tree after a quest. Skills keep their ranks when their tree is removed, only the grants are removed. When the tree is added again, the grants come back.
If you change Nodes of a tree asset at runtime, call RebuildNodeMap.