Eventing a Skill Tree
hiddenone
by
hiddenone
on
March 3, 2022
March 1, 2022

Eventing a Skill Tree

Eventing a Skill Tree
by

hiddenone

on

March 3, 2022

One way to let our players feel more in control of our heroes is to let them choose our hero’s skills from a skill tree. Let’s take a look at how we can event some of our own.

Eventing a skill tree is perfect for games that have limited skill choices or a small party, but for huge interconnected skill trees it may be better to look into using a plugin. Also for this tutorial we won’t be including any extra prices for unlocking skills like items or level requirements, but those can be added with additional conditional branches. With that housekeeping out of the way, on to the eventing!

Setting up a Skill Tree Item

Before we make the skill trees themselves, we need to decide on our method for getting to the skill tree. We could have a specific NPC who takes us to the skill tree or give each actor a “learn skills” skill they can use in the menu, but for this example let’s use a key item to open up our skill trees. Our item needs to have its Scope set to ‘1 ally’ and Consumable option set to ‘no’ so that our player doesn’t lose the item every time they use it (though having a limit to how many skills can be learned could be an interesting mechanic). When the item is activated then our player chooses which actor’s skill tree they want to open and then run our Learn New Skill common event.

Our common event is where we’ll set up some important variables and send our player to the right skill trees. First thing we need is to know which actor our player chose in the item’s menu and save it as a variable, using the game data section. Here we can also disable menu access so that our player can’t heal, use items, or save while in a skill tree map.

Since our player can use this item anywhere they want, we need to also make sure to save their current location. We covered this in a previous tutorial so we won’t go into details here but we need to store our player’s current map id, map X, and map Y in variables so that we can use them later to return to the same spot.

With our variables stored, we can move on to the last part of our common event where we transfer our player to the right skill tree. Since we saved our chosen actor in a variable, we can use conditional branches to make sure we send our player to the right actor’s skill tree map.

While we could instead have every actor’s skill tree on one large map, it’s easier to keep track if we separate them into different maps. Then we can just check to make sure each actor’s conditional branch is going to their own map.

Once we make a conditional branch for every party member, our common event is ready to go.

Basic Skill Tree

Now that our player can enter each actor’s skill tree, we can move on to the tree maps and the needed events. For this section let’s give Michelle a simple skill tree layout with Attack Up, Agility Up, and two battle skills.

We could use custom art to make things prettier or forced movements to make sure our player moves only onto skill spots, but we don’t need any of that to make it work. Using default tiles to make connected paths and icons that we turn into sprites to show what each skill is is more than enough for this tutorial.

Before we get to the skill events, let’s make sure our player can leave the skill tree. We can set that up with a simple Show Choice command where our player is transferred back to their previous location and gets access to the menu back.

For our Attack Up event, let’s have it increase Michelle’s Attack by 5 points once it is activated. The event’s first page is pretty straightforward, we need to ask our player if they want to increase Michelle’s Attack and if they choose ‘yes’, then we can use the Change Parameter command to increase her Attack by 5 and then turn On self-switch A to activate the second page.

The event’s second page doesn’t need to do anything special. If we want to let our player continue to increase Michelle’s Attack indefinitely then we could skip the second page, but if we want to limit how high her Attack can be increased then we need to include a page to act as a stopping point.

Then we can use the same setup to make our Agility Up event, and Michelle is ready to become even stronger.

Connected Skills

Now, a skill tree isn’t much of a tree if it doesn’t have branching or interconnected skills, so let’s see how we can do that. Michelle is a hard hitter so let’s give her the option to learn Double Attack and Triple Attack. But to learn Triple Attack, our player needs to have already taught Michelle the Double Attack skill.

Our Double Attack event will be set up much like our Attack Up one, though using the Change Skill command instead of changing parameters.

Our Triple Attack event is where things will be different. If we made it exactly the same as our other skill tree events, then our player could choose to teach Michelle the Triple Attack skill right away. So we need to include some way to make sure that Michelle has already learned Double Attack before we offer Triple Attack as an option. Luckily the Conditional Branch command gives us the power to check an actor for a specific skill, so we can use that and include an else branch for cases where Double Attack hasn’t been learned.

Once our conditional branch is ready, we can plug in our learn skill section if Michelle knows Double Attack and have a message inform our player that they can’t learn Triple Attack yet if Michelle still needs to learn the first skill.

If we wanted branching skills where our player has to choose between two different skills, then we could use a similar conditional branch to check if the actor has already learned the other skill. If they have, then our player is unable to learn the second skill since they already chose the other one.

And with that, we can start setting up skill trees for our heroes! How would you use this in your own games, could you see using this setup to make something not connected to battle skills?

Recommended Posts