How to create a Skill Tree and related elements

Started by LukeTheCreator200 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to create a Skill Tree and related elements

How could I create a Skill Tree in MCreator, and related elements.

If anyone knows, please tell me in a detailed but not too complicated.

 

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here’s a simplified and…
Sat, 01/04/2025 - 21:58

Here’s a simplified and clearer version of your explanation for creating a skill tree in MCreator. It focuses on making it straightforward and easy to follow:

How to Make a Skill Tree in MCreator

Let’s create a basic skill tree with two branches: Strength and Resistance. Players will use their experience levels to unlock skills. For simplicity, each branch will have 4 skill levels: I, II, III, IV

Step 1: Create the GUI for the Skill Tree

  1. Open the GUI Editor in MCreator:
    • Create a new GUI for the skill tree
    • Set up a background image for the GUI (optional, but it helps visually)
  2. Add Skill Icons:
    • Create icons for each skill level: one for the locked version and one for the unlocked version.
    • Place the locked version directly over the unlocked version (we’ll control their visibility using procedures)
  3. Add Buttons:
    • Place buttons for each skill. Each button will be linked to a procedure to handle unlocking and effects
  4. Keybind to Open the GUI:
    • Create a keybind in MCreator that opens the skill tree GUI when pressed

Step 2: Set Up Procedures for Skill Unlocking

Yeppi !! Procedure Time :)

1. Create Boolean Variables for Skills

  • Go to Global Variables and create a Boolean variable for each skill (e.g., Skill_Strength_I, Skill_Resistance_I, etc.)
  • Default each variable to False (locked)

2. Handle Skill Unlock Logic

  • Attach a procedure to each skill button. This procedure will:
    1. Check if the player has enough EXP:
      • Check if the player has sufficient EXP to unlock the skill.
    2. Unlock the Skill:
      • If the player has enough EXP:
        • Set the skill's Boolean variable to True
        • Deduct the required EXP from the player
        • Display the unlocked icon by hiding the locked one
      • If not, display a message: You don't have enough EXP!

3. Add Effects for Unlocked Skills

  • For simplicity, when a skill is unlocked:
    • For Strength skills: Add a Strength potion effect to the player, increasing its level with each skill
    • For Resistance skills: Add a Resistance potion effect similarly
  • You can use the Add Potion Effect block in procedures to handle this

Step 3: Display Unlocked/Locked Icons

  • Use a procedure to control icon visibility:
    • If the skill’s Boolean is False (locked): Show the locked version
    • If the skill’s Boolean is True (unlocked): Show the unlocked version

Optional: Using Skill Points Instead of EXP

If you want to use skill points:

  • Create a Global Numeric Variable for skill points
  • Adjust the procedures to deduct skill points instead of EXP when unlocking skills
  • Note: You will need to create a system for gaining skill points based on your mod's mechanics

 

Tell me if you have any other question :)

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you, this is very…
Sun, 01/05/2025 - 00:01

Thank you, this is very helpful. I appreciate it.

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And this can be used for…
Sun, 01/05/2025 - 00:09

And this can be used for many, right? If I have many different skill trees? :]

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I show and hide the…
Sun, 01/05/2025 - 00:46

How do I show and hide the icons?

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
First question : Yes Second…
Sun, 01/05/2025 - 07:32

First question : Yes

Second question :

You will have this when adding the skill icon to gui change always to your condition

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried that, it didn't show…
Sun, 01/05/2025 - 08:31

I tried that, it didn't show anything.

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a Procedure that has…
Sun, 01/05/2025 - 09:06

Create a Procedure that has


if Skill_Resistance_I = true

    return true

return false

 

then attach it to that

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I got it working. Thanks, ;]
Sun, 01/05/2025 - 09:27

I got it working. Thanks, ;]

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
np, if you need anything…
Sun, 01/05/2025 - 09:52

np, if you need anything else just ask :)