GameplayAbilitySuite is a plugin I have developed for my game that helps with Player/Character progression. It provides the following -
GASubsystem - This GASubsytem is central to the plugin. This provides all the API you need to add a skill tree to your game, manage save/load, manage player progression(XP and Point-wise), easy integration with Enhanced Input system that automatically manages input triggers for only the unlocked/bought abilities, among others.
UMG Widgets - The UMG widget provided lets you add a skill tree UI to your game and another one to show notifications whenever there are available ability points and/or XP points to unlock new abilities
Ability Tree Builder - Building ability trees is time consuming especially due to the iterations needed to fine tune it. The ability tree builder integrates with the Unreal Datatables to make it as easy possible
And a bunch of other things
The above figures shows the major components of the plugin.
You will ever have to directly deal with the items in blue. So, here is a brief overview of them
GASubsystem - As mentioned above, it provides the BP api for you to interact with the whole system
InputManagerComponent - This provides a convinient way to integrate the system with the Enhanced input system. For example, triggering input for only bought abilities etc, reducing the work you have to put into this kind of logic.
Skill Tree Builder - This is a convenient abstraction layer to build complex skill trees that reduces the amount of time wasted due to fine tuning the skill tree
Ability Tree Widgets - The UMG representation of your skill tree.
Now that you have the basic familiarity with the plugins main components, let's get started and add a skill tree to your game.
Assuming that you have already have the plugin installed fromt the Epic launcher, create a new Unreal project if you don't already have one and enable the WM_GameplayAbilitySuite plugin from your Plugins window. You may need to restart Unreal.
Let's now create a skill tree for the player.
But before that we need to understand a few concepts related to the AbilityTree.
The ability/Skill tree has three items in it -
Ability Category - The Ability Category items, at the very least act as folders to your actual abilities(that player executes). But they can also be configured to be unlockable and Leveled. For example, You can treat an Ability Category to be similar to the Trickster or any other styles in the DMC4. Except that the Ability Category can also have other Ability Category as children along with Abilities.
Ability Items - The Ability Items are what actually the player buys by spending Points. They can be configured to be Refundable. An Ability Item can have dependent abilites that can only purchased after the current one is bought. In addition, they have Upgrades which are treated as, multipliers, of sort. We will see more on this later. The Ability Items are similar to abilities like Dash, Double jump, Stinger etc in the DMC4.
Ability Upgrades - The Ability Upgrades act as upgrade for a give Ability Item. They can form a chain, where a higher level of upgrade can be bought after the current level is bought. The Ability Upgrades are similar to the upgrades of ability in DMC4. For example, higher fire rate on the Guns, more Damage caused by melee attacks etc.
Now that the basics are out of the way, let's build a Skill Tree!
As mentioned in the Introduction, one of the main goals of the plugin was to support a central management of the Skill Tree and support of ease of iteration. With that in mind, the ability tree can be fully managed by Datatables in Unreal.
So, let's build a Skill Tree similar to DMC4 Dante's with Leveled Trickster, Sword Master, Gun Slinger and Royal Guard styles and an Unlockable Slayer Style.
The four Ability Categories will be groupled under a Styles category. In this case the Styles category is considered a Root Category. There is an important limitation on the Root Category that it CAN'T be lockable. Other than that, it's pretty much the same any other Ability Category.
The reason that a Root Category can't be Unlockable is that if it's locked, then there is no way to buy any Abilities that can be bought and no way to contribute to anything results in unlocking that ability. This is a very reasonable limitation and should not affect in any way to implement arbitrarilty complex Skill Trees.