# Integration with previous version (1.2.4 -> 1.2.5)

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>\
\---------------------------------------------\\

### Skill Stages Added (Upgradable Skills)

1. 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.\
   \
   ![](https://content.gitbook.com/content/lAiliYSjiUCcPswEtNNW/blobs/2hU0iHdRX2fcsXZaj7AI/image.png)\\

2. 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.\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FKb2Rze9r5K8UeUEpD8Iv%2F1.%20CopyOverStruct.png?alt=media&#x26;token=ac5eaffb-f490-4ce9-bfa4-b35f8c7e16c7" alt=""><figcaption></figcaption></figure>

3. Open the `S_SkillStages` struct inside your project (the one you just copied over), and click the **Save** button.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FkswOycNdz2kl9YL1lFDA%2F2.%20OpenStructAndSave.png?alt=media&#x26;token=49631b00-321d-4818-8c0f-351a76f45197" alt=""><figcaption></figcaption></figure>

4. Next, open the `S_SkillTreeSlotDetails` struct. Add a new variable of type `S_SkillStages` and name it `Stages`.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FSPgMeBc6rULviopZ6bS6%2F3.%20AddStructToStruct.png?alt=media&#x26;token=523bb116-981d-49aa-a431-71cc29c285f0" alt=""><figcaption></figcaption></figure>

5. Open `WB_SkillTreeSlot`, select the TextBlock, rename it to `StageText`, and ensure the "**Is Variable"** option is checked.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FDqfeynLoAKk5HUwLWo60%2F5.StageText.png?alt=media&#x26;token=a9d96f7f-c9e9-4a87-bfc5-7b30c177b09b" alt=""><figcaption></figcaption></figure>

6. 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.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FUJQRg3vrRzI1dUv06YwX%2F6.%20CopyFromNewProjectSlotFunctions.png?alt=media&#x26;token=15866130-9e86-40c1-8d41-33f60b07f0e7" alt=""><figcaption></figcaption></figure>

7. 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.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Fp7xEmVG67NyQSCt0VgZL%2F1.gif?alt=media&#x26;token=a6f16da3-b3d0-49cc-9953-ab29bf953aa6" alt=""><figcaption></figcaption></figure>

   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.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F62l4AwSMlo8DsRirNie0%2F2.gif?alt=media&#x26;token=a763a4ad-f856-4af2-8d88-ae7fa2e35cd3" alt=""><figcaption></figcaption></figure>

8. Go into the constructs graph inside WB\_SkillTreeSlot, and add the following highlighted node (Update Stage Text") to the pre-construct:\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FbezFq47CfCUeaUsHBBci%2Fimage.png?alt=media&#x26;token=a2e84808-363c-4b55-84d5-8f7ae40a88ba" alt=""><figcaption></figcaption></figure>

9. 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`.\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FJNSH8KXNBTPahii4Mk3t%2F3.gif?alt=media&#x26;token=de715920-5f25-4f20-8faf-fc3fb80e6bb5" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FFlbh4LHUERs7DWZL21pI%2FNewInput.png?alt=media&#x26;token=cf8553e8-0dbd-46da-844a-fb5b37265cfe" alt=""><figcaption></figcaption></figure>

10. 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:\
    \\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Fla7F1IwUGP7oyMp9g1if%2FCopyFunctionsAC.png?alt=media&#x26;token=fff8bb49-203a-4a42-a0bf-6870af06e666" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F2JO6Sg7PWGxTwHEoAef3%2F4.gif?alt=media&#x26;token=127581d1-826d-4e13-9ae2-ca7c3d55261c" alt=""><figcaption></figcaption></figure>

11. 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.\
    \\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F7NpgNDMJqoqrvtP1iV5n%2FReconnect.png?alt=media&#x26;token=b5f3700c-b54e-493d-afc9-1f5fa20e8767" alt=""><figcaption></figcaption></figure>

12. 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:\\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FodZPJSfwmV4b4nJWKIsj%2Fimage.png?alt=media&#x26;token=25e2e871-89a0-46af-b3e8-07b2835da360" alt=""><figcaption></figcaption></figure>

    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`.\
      \\

      <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FwFYiyUov8dNnmlHqOlzU%2FNewResetSkillsFunction01.png?alt=media&#x26;token=d7ba2ea7-fa3d-4ddb-bac3-2d2071709a58" alt=""><figcaption></figcaption></figure>

    * 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."\
      \\

      <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FUZA4UG4jPEPuprjwIYJK%2FNewResetSkillsFunction02.png?alt=media&#x26;token=0c9e84d1-d0f0-4323-9b80-16c7b9ae7761" alt=""><figcaption></figcaption></figure>

    * 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.\\

      <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Ft6dFyGa9n2jxiwpPfSWn%2FFrame%2052.png?alt=media&#x26;token=cf9b98ff-4e0c-4d9f-8ccd-dd677118dde9" alt=""><figcaption></figcaption></figure>

      \
      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.\\

      <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FaDGAZzacwViWe2YoDBIE%2Fimage.png?alt=media&#x26;token=40419119-caf9-4ded-a0a4-a8989e65f120" alt=""><figcaption></figcaption></figure>

13. 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:\\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Fil5ipVPxRy09S90RJz4E%2FEverything%20after.png?alt=media&#x26;token=85e234e2-f185-46b7-a069-cf5121fd0e36" alt=""><figcaption></figcaption></figure>

    \
    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.\\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FFN4TDt9hyc61k2m42H1n%2FCopyOverPressedAndReleased.png?alt=media&#x26;token=55a23053-0c5e-4291-a5b1-040ab8d07071" alt=""><figcaption></figcaption></figure>

14. 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:\\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F6jTDrZ0YT3Yq5Siy8W2I%2FGraph.png?alt=media&#x26;token=cb0e1683-3c5a-435f-9f06-12c5de23ead0" alt=""><figcaption><p>1 - Open OnAcquired and OnUnlocked graph.</p></figcaption></figure>

    \\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FILGg3zM6T8mvbvpXSzvb%2FAdd%20AS.png?alt=media&#x26;token=f6ffa009-33c5-42c0-aa3a-d0e967c2b4d0" alt=""><figcaption><p>2 - Add the Apply Skill function from the "Skill Tree Manager" at the end of the OnAcquired event and connect the name from the slot details variable.</p></figcaption></figure>

    \
    \\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FlYLJUt4EKsYWEmkWdIKa%2FAS.png?alt=media&#x26;token=310e9d8b-cdac-4095-b291-13327319e4a5" alt=""><figcaption><p>Close Up</p></figcaption></figure>

    \
    See [applying-skills](https://cryptic-eclipse-studios.gitbook.io/simple-skill-tree-system-v1.2.5/applying-skills "mention")for more details on how to add logic when a skill is being acquired or to the different skill stages.\\

15. 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.

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Fg2U8tEL9F0397F2JbLcN%2Fimage.png?alt=media&#x26;token=5346c1ed-5843-4821-b17f-4c0f5fb4e673" alt=""><figcaption><p><mark style="color:orange;">Your checks inside your "Open Reset Skill Prompt" should look like this</mark></p></figcaption></figure>

16. 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.\\

    <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FBqa4Q9z1tDUvlPP87UNZ%2FFrame%2053.png?alt=media&#x26;token=8f0676ad-83c6-4d96-b85b-ab77c6f66399" alt=""><figcaption></figcaption></figure>

    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.

### Changed Skill Tree Base

1. Duplicate `WB_SkillTreeBase` and rename it to `WB_SkillTreeMain`. This will be the blueprint you'll use to create your skill trees moving forward.\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F5TY69MM808eMcHTIrymX%2FNewBase.png?alt=media&#x26;token=cb18c0be-9239-48d0-8432-a936db12308f" alt=""><figcaption></figcaption></figure>

   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FUy8J6XXaCRA2CWmrUViw%2FMain.png?alt=media&#x26;token=3374ccb8-a428-46cb-84e1-a9749b6a6b17" alt=""><figcaption><p>So you will have a <mark style="color:orange;">WB_SkillTreeBase</mark> as well as a <mark style="color:orange;">WB_SkillTreeMain</mark></p></figcaption></figure>

   \ <mark style="color:orange;">WB\_SkillTreeBase</mark> will be used as a parent for other skill trees.\ <mark style="color:orange;">WB\_SkillTreeMain</mark> will now be the widget we duplicate when creating new skill trees.\\

2. 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`.)"\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F6BxYOV43vJKtNFb8niyY%2FBaseDel01.png?alt=media&#x26;token=08656b0b-6f43-459c-b780-d4c0bedcdf0c" alt=""><figcaption><p>Designer Tab</p></figcaption></figure>

   \
   After clicking deleting these you will recieve a confirmation prompt, click yes:\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FPkYswSSuN9JB5tuwVa0X%2FBaseDel03.png?alt=media&#x26;token=b4a15593-f81a-4e07-96ef-c2138b3835b9" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F0eKdOs3rnOtIjAY4OFBg%2FBaseDel02.png?alt=media&#x26;token=4d8f6374-9887-4b5e-adeb-8c352fcb9f7f" alt=""><figcaption><p>Graph Tab</p></figcaption></figure>

3. 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.\ <mark style="color:orange;">**Remember to make it instance editable**</mark><mark style="color:orange;">.</mark>\
   \
   ![](https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2F7QZEsXsmzedkJe9soSM2%2Fimage.png?alt=media\&token=4024afdf-0a3b-40ab-9bc3-794ba059055a)\\

4. 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`.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FVh9PlNgJ5sP5iXkDWN7G%2FParent.png?alt=media&#x26;token=4c790b1d-47ec-4ff3-9926-64e2b49c1e31" alt=""><figcaption></figcaption></figure>

5. 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.\
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FUClkWL1FOHaynPpxhiM1%2FReplaceErrors.png?alt=media&#x26;token=fde26b51-90f4-47cd-9aa2-9042a10309e3" alt=""><figcaption></figcaption></figure>

   After resolving all of these errors by doing the same thing, delete the "Slots 0" variable.\
   \
   ![](https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2Fkty98qJJ2D01wibeRRsP%2FDeleteSlots0.png?alt=media\&token=06a81448-7bc8-44d8-88bc-6a53809264ad)\\

6. Now repeat these steps for your already existing skill trees that you have made: \
   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FmDPZisDMBgL6A5qDUOtT%2FRepeat.png?alt=media&#x26;token=8ed5d646-5306-4210-8c34-574c3a6b77a3" alt=""><figcaption></figcaption></figure>

7. Now you are able to get the name of the skill tree as long as you have a reference to it.\
   Simple Example:\\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FL9r5OiMcESXb7m57Ilo9%2Fimage.png?alt=media&#x26;token=96bca8ed-3c4c-4afd-87a3-7a6523de5b28" alt=""><figcaption><p>Setting the text variable to the name of the current skill tree.</p></figcaption></figure>

   \\

   <figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FX7spYjxAKkzmIpTKWD1K%2FFrame%2055.png?alt=media&#x26;token=fee09e6c-0623-4db7-a2e9-3fdf9e58e028" alt=""><figcaption></figcaption></figure>

### Additional Changes/Fixes

#### ResetAllSkills didn't get adjusted correctly in the previous versions

If you haven't already customized the **ResetAllSkills** function for your project, follow these steps to adjust it properly:

1. Open the **ResetAllSkills** function in the **new SkillTreeSystem** project.
2. Copy all the nodes and logic inside the **ResetAllSkills** function.
3. Open the **ResetAllSkills** function in your **existing project**.
4. Delete everything inside the existing **ResetAllSkills** function.
5. Paste the logic you copied from the new project into your existing function.

<figure><img src="https://644676383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlAiliYSjiUCcPswEtNNW%2Fuploads%2FiqwWr4RBaVZstUUyZRPm%2Fimage.png?alt=media&#x26;token=d66bbcc5-9ead-436c-b9c7-85f822a8194b" alt=""><figcaption><p>The <strong>SkillsToLeaveUnlockable</strong> input allows you to reset all the skills while keeping certain starting skills (or other specified skills) still unlockable.</p></figcaption></figure>
