Integration with previous version (1.2.4 -> 1.2.5)
Last updated
Last updated
If something happens to go wrong or you need some help, please don't hesitate to contact me :) Email: thecrypticeclipsestudios@gmail.com Discord: https://discord.gg/JdVpxz8hDJ ---------------------------------------------
First, create a new Skill Tree System project. Once the project is created, open both the new project’s directory and your existing project’s directory, as we will copy components from the new version into your current project.
Open the directory SkillTreeSystem/Data/Structs
in both your existing and newly created Skill Tree System projects. Copy the file S_SkillStages.uasset
from the new project’s directory into the SkillTreeSystem/Data/Structs
directory of your existing project.
Open the S_SkillStages
struct inside your project (the one you just copied over), and click the Save button.
Next, open the S_SkillTreeSlotDetails
struct. Add a new variable of type S_SkillStages
and name it Stages
.
Open WB_SkillTreeSlot
, select the TextBlock, rename it to StageText
, and ensure the "Is Variable" option is checked.
Open WB_SkillTreeSlot
in both your existing project and the new Skill Tree System project. Copy and paste the three new functions into your existing project.
To do this, click on one of the functions in the new project, press Ctrl + C (or right-click and select Copy). Then, in your existing project, click on the Functions section and press Ctrl + V to paste.
After compiling, you may encounter some errors. These are easy to fix by connecting the correct pins.
Hold Ctrl and click on the red pins. While still holding Ctrl, drag them into the correct Stages
output from the struct variable.
Continue fixing all the red errors by connecting the appropriate pins. However, one will be slightly different, the node with Set Members in S_SkillTreeSlot
.
For this one, click on the node and open the Details panel. There, you'll see pin options. Enable the Stages pin, then connect the red wire to this pin using the same method as before.
Go into the constructs graph inside WB_SkillTreeSlot, and add the following highlighted node (Update Stage Text") to the pre-construct:
Inside the WB_SkillTreeSlot
's SetAcquiredAndUpdateNextSkills
function, drag the Acquired
pin from the Set Members in S_SkillTreeSlotDetails
node (at the start) to the input node of the function. This will automatically create a new input. Set the default value of this new input to true
.
Now, open AC_SkillTreeSystem
in both your existing project and the new Skill Tree System project. Just like you copied the previous functions, copy the following four functions from the new project to your existing project:
After compiling, you'll encounter similar errors as before. Simply follow the same process to resolve them: reconnect the red wires to the correct Stages
pin.
Open the Reset Skill
function in both your existing project and the new Skill Tree System project.
If you have modified this function, do not follow the steps below unless you're sure how to integrate your changes into the new logic. If you're unsure, feel free to contact me via email, or reach out on my Discord support server or through direct messages.
If you haven't modified this function and it still looks like this:
then you can fully replace the existing logic with the updated logic from the new Skill Tree System project.
Add a new input pin of type bool and name it ResetConnectedSkills
.
Delete all the existing logic in your Reset Skill
function, then copy and paste the new logic from the Skill Tree System project into your existing one."
After compiling, you'll encounter the same red errors again. Just follow the same process as before, reconnect the Stages
pin to the correct Stages
output.
With this new input pin, inside the WB_ResetSkillConfirmationPrompt
, you can toggle the input to true or false. Setting it to true will reset all the subsequent skills as well.
Open WB_SkillTreeSlot
and go to the Pressed and Released graph in both your existing project and the new Skill Tree System project. Locate the Play Animation
node in the middle of the graph, which should be here:
We are going to replace all the logic after this Play Animation
node with the new logic from the Skill Tree System. This will ensure the skill stages function correctly.
If you've previously modified this code and you're unsure where to integrate your custom logic, please reach out to me through my Discord support server or via email, and I'll assist you :)
If you're sure you haven't adjusted this code, you can proceed with the following steps:
Select all the nodes after the Play Animation
node and delete them.
In the new Skill Tree System's Pressed and Released graph, copy all the nodes after the Play Animation
node.
Paste these nodes in the area where you deleted the logic in your existing project.
Navigate to the On Acquired and On Unlocked graph.
At the end of the On Acquired event, just before saving the skill tree, add the following logic:
See Applying Skillsfor more details on how to add logic when a skill is being acquired or to the different skill stages.
Copy the highlighted nodes from the PC_SkillTreeSystem
's Open Reset Skill Prompt event, and replace the checks in your existing project's Open Reset Skill Prompt with the new ones.
If you encounter the same error as before, simply connect the red pin to the correct Stages
output again.
We can now test the new feature. Go to one of your skill trees, click on a skill, and in the Details panel, expand the Stages
section. Enable Has Stages, set a total number of stages, and test it in-game.
The option Require All Stages to Unlock Next Skills ensures that you must max out the skill before unlocking the next skills. If its unchecked, even if just 1 stage is unlocked it will unlock the next skills.
Duplicate WB_SkillTreeBase
and rename it to WB_SkillTreeMain
. This will be the blueprint you'll use to create your skill trees moving forward.
WB_SkillTreeBase will be used as a parent for other skill trees. WB_SkillTreeMain will now be the widget we duplicate when creating new skill trees.
Next, open WB_SkillTreeBase
and delete everything in the Designer tab, as well as all the functions and logic in the Graph tab, except for the variable Slots
. Be sure to keep that variable.
(Don't worry, all of this still exists in WB_SkillTreeMain
.)"
After clicking deleting these you will recieve a confirmation prompt, click yes:
Open WB_SkillTreeMain
and set its parent to WB_SkillTreeBase
.
To do this, go to the Graph tab, click on Class Settings, and in the Details panel, the first option should be Parent Class. From the dropdown, select WB_SkillTreeBase
.
You may encounter some errors. Simply click on the errors, and you'll see a variable labeled Slots 0
. Replace this with the Slots
variable from its parent.
To do this, right-click in the graph, search for Slots
, and select the one that only says Slots
. Replace the incorrect variables with the correct ones.
Now repeat these steps for your already existing skill trees that you have made:
Now you are able to get the name of the skill tree as long as you have a reference to it. Simple Example:
If you haven't already customized the ResetAllSkills function for your project, follow these steps to adjust it properly:
Open the ResetAllSkills function in the new SkillTreeSystem project.
Copy all the nodes and logic inside the ResetAllSkills function.
Open the ResetAllSkills function in your existing project.
Delete everything inside the existing ResetAllSkills function.
Paste the logic you copied from the new project into your existing function.
Next, we can add a variable called SkillTreeName
of type Text. This allows you to assign and access a skill tree's name if you wish to give it one.
Remember to make it instance editable.
After resolving all of these errors by doing the same thing, delete the "Slots 0" variable.