Skill Trees System

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
Skill Trees System: v1.7
by SomeFire​
Introduction
This plugin allows you to create skill trees like in Diablo. Plugin is based on Emerald's Skill Trees for VX Ace.

Screenshots
Sample.png

Features
- Old school skill trees.
- Trees are shown in a separate scene, which can be opened in any way you want.
- Skill can have 1 or more requirements like hero level, another skill, cost in skill points or number of already spent points in the tree.
- Actor can get new trees during the game. For example, when he evolves to or receives a new class.

How To Use
- Copy the "SkillTreesSystem.js" and "SkillTreesConfig.js" files into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'.
- Open "SkillTreesConfig.js" file and read example code.
- Edit "SkillTreesConfig.js" file by creating skill objects and trees.

Works only in RPGMV 1.6+.

If something works not as expected - check console log (F8 should open it). If you can handle error - just do it! If not - share error and stacktrace (if able) here.

Terms of Use
Free to use in any RPG Maker MV project including commercial. Please, credit "SomeFire" and let me know about your game.

v1.7: Code, Demo

Work in progress
If you need to call a common event on skill learn - apply this changes. Report any bugs.

Plugin Development
Feel free to help project with your ideas or improve the code.

Version 1.7:
- Added script calls to learn skills in skill trees.
- Added scale factor for skill icons.
- Added stats requirement.
- Changed sound for skills unable to learn.

Version 1.6:
- Ensure cursor visibility for long trees.
- Fixed bug with on learn actions.

Version 1.5:
- Items with ability to reset skill trees during the game.
- Working message box commands for skill descriptions.
- Draw skill cost (MP and TP).
- bugfixes.

Version 1.4:
- Separate Points Pools for class trees.
- YEP Job Points and class plugins integration.

Version 1.3:
- Fixed loading bug.

Version 1.2:
- Added item requirement.
- Added game variable and game switch requirements.
- Added on skill learn action to change game variables.
- Colored requirements.
- Skill points can be received on level up.

Version 1.1:
- Possibility to add trees during the game.
- Added API section.

Version 1.0:
- Finished plugin!
 
Last edited:

NinjaKittyProductions

Professional Murder Hobos
Veteran
Joined
Jul 9, 2013
Messages
422
Reaction score
368
First Language
English
Primarily Uses
RMMV
I love the simplicity of how it looks. I was reading through the file and could not find where I could have a skill require two different skills before purchasing the new one. For example: I have Firebolt and Waterblast. I would like the character to have both before they could learn Steamvent.
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
I love the simplicity of how it looks. I was reading through the file and could not find where I could have a skill require two different skills before purchasing the new one. For example: I have Firebolt and Waterblast. I would like the character to have both before they could learn Steamvent.
There is such sample - SkillTreesConfig.js, String 437.
Code:
tripleAttack = skill([5], [
    [cost(1), lvl(5), skillReq(combatReflexes, 2), skillReq(doubleAttack)] // Requires 2 skills.
]);
This skill cost 1 point, requires 5 hero level and requires 2 skills: combat reflexes at 2 level and double attack at 1 level.
 

NinjaKittyProductions

Professional Murder Hobos
Veteran
Joined
Jul 9, 2013
Messages
422
Reaction score
368
First Language
English
Primarily Uses
RMMV
There is such sample - SkillTreesConfig.js, String 437.
Code:
tripleAttack = skill([5], [
    [cost(1), lvl(5), skillReq(combatReflexes, 2), skillReq(doubleAttack)] // Requires 2 skills.
]);
This skill cost 1 point, requires 5 hero level and requires 2 skills: combat reflexes at 2 level and double attack at 1 level.
Thanks for this! I guess I overlooked it.
 

Krystek_My

Veteran
Veteran
Joined
Dec 29, 2017
Messages
212
Reaction score
45
First Language
Polish
Primarily Uses
RMMV
It is compatible with yanfly job points?
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
158
Reaction score
19
First Language
English
Primarily Uses
Downloaded the demo, opened the menu and this happened.
 

Attachments

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
So just as an idea anyway we could have the option to bind skill tree to classes, like actors can have 2 classes and each one has there own tree? or is there a command to add a skilltree to an actor like in game? like i could have an actor like gain a second or 3rd class and unlock there skilltrees
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
It is compatible with yanfly job points?
This systems can be used together only if they use different skills sets. If you use same skills - plugins can break each other.

Downloaded the demo, opened the menu and this happened.
Looks like plugins are off, but they should be enabled by default. Do you use RPGMV 1.6.1?

So just as an idea anyway we could have the option to bind skill tree to classes, like actors can have 2 classes and each one has there own tree? or is there a command to add a skilltree to an actor like in game? like i could have an actor like gain a second or 3rd class and unlock there skilltrees
Currently it isn't possible, but it is good idea to implement such feature. I'll do it on the week.
 

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
25
First Language
English
Primarily Uses
RMMV
Will this work with 1.5.1?

I was considering using it in conjunction with JP/Skill Learn.
So characters can have specific skill trees outside of skills that can be learned through their classes...

Thank you!
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
Will this work with 1.5.1?

I was considering using it in conjunction with JP/Skill Learn.
So characters can have specific skill trees outside of skills that can be learned through their classes...

Thank you!
Good to hear, but it will not work on previous versions since I used classes, which are supported only in 1.6+. But you can rewrite script to use simple js objects instead of classes.
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
So just as an idea anyway we could have the option to bind skill tree to classes, like actors can have 2 classes and each one has there own tree? or is there a command to add a skilltree to an actor like in game? like i could have an actor like gain a second or 3rd class and unlock there skilltrees
I've made this possible in the v1.1, so you can use it in you project.
 

atoms

Veteran
Veteran
Joined
May 31, 2013
Messages
481
Reaction score
286
First Language
English
Primarily Uses
RMMV
@SomeFire Thanks for making this, I've been looking for a skill tree system for MV and this one you made seems to look really good! :)
 

Jrrkein

Insert Witty Title Here
Veteran
Joined
Apr 20, 2014
Messages
132
Reaction score
19
First Language
Indonesia
Primarily Uses
RMMV
Any chance if there's a skill tree editor, the structure is so confusing to make it happen
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
Any chance if there's a skill tree editor, the structure is so confusing to make it happen
No, editor is too big project for me and worth nothing. You can try Emerald's Skill Trees for VX Ace as this systems are similar but have different descriptions. So, if you'll understand one system - you'll understand another.
 

atoms

Veteran
Veteran
Joined
May 31, 2013
Messages
481
Reaction score
286
First Language
English
Primarily Uses
RMMV
@Jrrkein I agree it's a bit confusing to begin with, and that's because it's a bit messy the way it's handled, however if you just look at the last half of the script in notepad++ or the provided github link you should quickly be able to learn the features and have what you want working in your game. Just look at the skill tree example in the demo and compare it to the plugin script. It shouldn't stay confusing for you too long after that.

@SomeFire

I really like your visual structure and appearance of the mv skill tree script in-game. I've also got a few questions, three questions. I am wondering if these features I am thinking of are possible.

1. If I used Yanfly's class and subclass system is there a way to enable and disable the skill trees based on which classes and subclasses an actor has equip?

For example if Actor 1 was a Knight and a Healer then two skill trees would appear, Knight and next Healer for Actor 1.

If Actor 1 changes to Thief and Warrior then Knight and Healer skill trees would disappear but Thief and Warrior skill trees would appear for Actor 1.

If the same Actor 1 then changes back to Healer but keeps Thief as there second subclass, then the skill trees that would appear is Healer first and Thief second, the only other condition is that anything learnt from Healer previously would remain learned when Actor 1 switches back to Healer.

Can that be done?

Yanfly's class plugin
http://yanfly.moe/2015/11/27/yep-32-class-change-core/

Yanfly's subclass plugin
http://yanfly.moe/2015/11/29/yep-34-subclass/



2. Can skills and skill upgrades require items? For example if Actor 1 was a Berserker and had a Fire skill, could it cost 3 Fire Potion items to learn the Fire skill? Then, after learning the Fire Skill, could an upgrade could cost 5 Fire Potion items for the same actor 1 Berserker? Then, if he also had a Healing skill separately, with no upgrades, could that single healing skill cost 2 HP Potions AND 1 MP Potion? Can that be done? If so, do you know how I can add this to the plugin script?


3. Increasing a variable upon learning a skill or upgrading a skill. With each skill Actor 1 learns or upgrades can a variable increase? For example if Actor 1 as a Berserker class learns a Fire skill, can the chosen variable, let's label it Fire Power, increase by 1? Then if Actor 1 as a Berserker class again, learns the Heal skill, can the same variable increase by 2?


Thank you very much, I hope those questions are easy to answer, I think they are so that's why I'm asking instead of experimenting myself as I think the latter would take much longer and I'd end up having to ask at least two of the questions anyway, but if one or more of those features can't be done a simple "no that can't be done" would be enough of answer! Many thanks.
 
Last edited:

Kraden96

Friendly Fox
Veteran
Joined
Feb 5, 2016
Messages
39
Reaction score
11
First Language
English
Primarily Uses
RMMV
Question, are you able to make row choices for the tree? Like give them a selection of 3 but they can only pick one? Then grey out the unchosen ones?
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
@atoms,
1. It can be done. But I'm not familiar with this plugins, so I can't tell how difficult it is.
2. Very easy to do - all we need is a new requirement class which takes items in constructor, checks them in the `meets` method and removes them in `use` method. Can you do and share it?
3. It can be done. I'll do it on the weekend.

@Kraden96, yes, it is possible.
 

SomeFire

Veteran
Veteran
Joined
May 27, 2016
Messages
33
Reaction score
56
First Language
Russian
Primarily Uses
3. Increasing a variable upon learning a skill or upgrading a skill. With each skill Actor 1 learns or upgrades can a variable increase? For example if Actor 1 as a Berserker class learns a Fire skill, can the chosen variable, let's label it Fire Power, increase by 1? Then if Actor 1 as a Berserker class again, learns the Heal skill, can the same variable increase by 2?
When you say `variable`, do you mean RPGMV game variables or any JS variables?
 

atoms

Veteran
Veteran
Joined
May 31, 2013
Messages
481
Reaction score
286
First Language
English
Primarily Uses
RMMV
@SomeFire

Thank you for the fast response!

1. Alright thank you, I'll experiment and see how that goes.

2. Sorry I don't know any programming at the moment, if I understand right I get the theory. What's needed is to create a new value for items and then it'll work, but I myself wouldn't know how to write the javascript to accomplish it.

It's ok though if you don't want to do anything extra here. If you think that'll take too much of your time to do or you'd rather not, that's fine, but if you are happy to give an example then that'll help. I just know for me, having the skill in the skill trees consume certain items instead of variables would really help with what I'm aiming for.

3. In my mind I was thinking the events in RPGMV variables, I would find that feature very useful with the ways I use variables in the MV game engine.

But, what would some JS variables do?
 
Last edited:

RedFoxGaming

Veteran
Veteran
Joined
Jan 14, 2018
Messages
88
Reaction score
16
First Language
English
Primarily Uses
RMMV
So for some reason I cannot get this to work. I've made a custom tree in the config script and I can access the skills tree menu through Yanfly's Menu Manager, but no matter what I do it always says that the actor has no trees available.

So here is my config, so far right now I just have two tree for the first actor made.
Code:
SkillTreesSystem.actor2tree = {
    1: new SkillTrees(1,
        [new SkillTree('Healing & Shields', 'gaiaknight_tree1', [
            null,   cureSkill, berserkSkill,                null,                regShieldSkill,       null,            null,
            arrowLeft,   arrowDown, arrowDown,                  null,                  arrowDown,       null,            null,
            multiCureSkill,   statCureSkill, armorUpSkill,   null,                refShieldSkill,       null,            null,
            null,   null,           arrowDown,                null,                null,       null,            null,
            null,   null,           speedUpSkill,            null,                  regMagicShieldSkill,       null,            null,
            null,   null,           arrowDown,              null,                arrowDown,       null,            null,
            null,   null,           magicBoostSkill,         null,                  refMagicShieldSkill,       null,            null,
            null,   null,           arrowDown,              null,                  null,       null,            null,
            null,   null,           magicShieldSkill,        null,                null,       null,             null,
        ]), new SkillTree('Attacking Magics', 'gaiaknight_tree2', [
            harmSkill, aeroSkill, null, null, null, null, null,
            arrowDown, arrowDown, null, null, null, null, null,
            holySkill, tornadoSkill, null, null, null, null, null,
            arrowDown, null, null, null, null, null, null,
            sanctifySkill, null, null, null, null, null, null,
            null, null, null, null, null, null, null,
            null, null, null, null, null, null, null,
            null, null, null, null, null, null, null,
            null, null, null, null, null, null, null,
        ])]
    )
};

And I have an autorun event to run this line of code at game startup:
$gameActors.actor(1).setSkillTrees(1);

I have no idea what I am missing as the game isn't actually crashing or throwing an error.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

Writing out an idea for the No Travel Game Jam. I have a general plot and challenge written out, it's just a matter of filling the rest in and making it interesting.
A definite difficult time right now. How is everyone doing during this pandemic? I already have seen furloughs and layoffs.
Hollow 1977 wrote on Archeia's profile.
Hope you and your family are doing well during this difficult time. :)
My elderly neighbor whom I've been buying groceries for just got carried out of his home on a stretcher by guys with hazmat suits. Considering I've been his only point of contact for the past month it's probably safe to say my boss was right to tell me to stay home once I developed a mild cough after all.
Damn. All these new features to the forums. Takes some getting used to.

Forum statistics

Threads
95,641
Messages
930,672
Members
125,962
Latest member
seogenics
Top