Project Integration

Create custom Skills and Attributes

The heart of this package are the Scriptables. There is a Skills and an Attributes Scriptable Right click somewhere in your project folder to create the scriptables.

Attributes

Those are just a simple way to hold the information of an attribute, like Max Health, Strength, Speed, etc. They only consist of an icon and a description.

Skills

Skills scriptables are the core of this package. They contain every information that is needed to make the skill tree system work.

Description

Description of the skill

Icon

Icon image of the skill

Required level

Minimum level needed to unlock the skill

Required Skillpoints

Skillpoints needed to unlock the skill

Required skills

Skills that need to be unlocked before you can unlock the current skill

Affected attributes

The skill gives a bonus for each affected attribute. For each attribute define how much bonus is given.

E.g. Attribute Health with value 50 means after unlocking the skill your max hp increases by 50.

Where are the unlocked skills stored?

In the demo scene you can find a GameObject called DummyPlayer which has the PlayerStats script attached.

This script internally maintains a list of all unlocked skills, and adapts the value of every attribute of the shown list in the image above according to the unlocked skills. If you unlock a skill that gives you a boost of 10 Strength, the script will update the Strength attribute from 5 to 15.

For this asset this script also tracks the xp, level and available skillpoints. The GetLevel and GetAvailableSkillPoints methods are used in the Skills scriptable to determine when a skill is achievable. Feel free to replace those methods with methods of your own level system.

Last updated