Heroes Skill Tree
Description
Introduction
So you use the Heroes plugin on your server and your players gain acess to loads of awesome skills as they level up. Great! But wait, what's that? You are saturated with skills and you can't arrange them all on your classes because their level difference is too small and the server becomes too easy? Or do you simply want a way to... rearrange your skills inside your class, shifting away from the plane level req and going straight up to the parenting system of Heroes classes? Well these let you decide what classes a player must have already gone through to unlock another stronger class and why can't we do it with skills as well!? Seems legit that a skill tree would turn things a lot more interesting and allow for greater flexibility.
Thinking about that, I decided to create this plugin, that allows you to do that! No more will players easly get that skill for simply achieving a certain level! Now, they will have to manage their skills on a brand new way, in order to get the best set ever! Still not convinced? Let's take a fast look on what this can and will do.
ATTENTION: The text below is rather long and contains some "useless" jokes to make it look more like a conversation rather then a formal description. If you are lazy like me and/or you want a more especific guide for this plugin, please refer to the Fast Guide.
ATTENTION! IF YOU ARE UPGRADING FROM 1.3.2-B OR OLDER TO 1.5-B OR NEWER, READ THIS:
From now on, player data will be stored on their own .yml file, instead of keeping everything on the same huge file. So the current players.yml is intended to be useless. However, I suggest you don't delete it until you are sure that your players are getting their SkillPoints correctly. The plugin should be able to tell how many SkillPoints the player has based on his level and skill levels. The idea is that the data files are only read when the player joins and form then on, the file's only purpose is to save stuff until the player logs out.
To keep it simple, don't touch your files xD
The Plugin
SkillPoints
Every time a player levels up it earns a set amount of SkillPoints to the class he is. These SkillPoints are stored and the player can choose to use them whenever he feel like. SkillPoints serve for one and only purpose: Level up skills. That's right! As of now, Heroes allow us give the player a skill but in order to give him a stronger version of the same skill at the same class would be wierd because you would have ot set a whole new section on class.yml. And what if you want your skill to go all the way up to level 10??? No, there's no way you will create all those permited-skills. This plugin allows you to do it on a much confortable and simple way! This will be discussed further below.
One SkillPoint can be used to raise a skill level by one. If you level down a skill, the SkillPoint is retrieved. But wait! That means your players can go arround mastering skills, unlocking further ones and then getting the points for new ones? NO! Permissions nodes allow you to control basicaly everytihng, including if a player can reduce it's skill levels so they better choose it wisely.
When first logging on after the installation of the plugin, the player will earn all the SP he would have gotten based on their current levels. Take note that this will calculate the SP based on the class the player is on the moment of logging in, ignoring the others he might have had before!
Skill levels
Every skill starts locked for the player, which means level 0. The player can spend one of his SPs to unlock the skill, bringing it to level 1 and making it eligible to be used. From then on, the player keeps spending his SPs until the skill reaches it's maximum level. When this happens, the skill is "mastered" and can not be leveled up anymore. The term mastered was intentionaly imported from Heroes' class mastering system to help the understanding of the concept and to keep things simple.
When a skill levels up, whatever is set on it's section on class.yml will affect it's result. At the moment, only the damage, the health-cost, the mana-cost, the reagent-cost and the stamina-cost are supported. See on the Configs section below to see how to set these.
ATTENTION: Remember that other settings will still work! If you add a node for raising damage per skill level, for example, and don't remove the node to raise damage per player level, it will apply both! Keep an eye on that.
Parenting system
In order to keep stuff simple, I opted to adopt the same parenting system that Heroes itself uses for their classes. It works just the same way. One skill must have all of their strong parent skills mastered and at least one of the weak skills. Once these requirements are met, the skill can be unlocked by the player using a SP.
ATTENTION: Skills only test for parentship reqs when attempting to unlock them. Once they are unlocked, they can be leveled up freely.
The Config
"So you mean to tell me that I will have to edit all my skills again and/or I will have to download compatible skills for this dark magic to work!?" Well... no. This is one of the best parts of this plugin: if you install it and do nothing, your server gameplay won't change at all. All of the previous configs and skills work on their default state and things will only change where and when YOU want them to change (i'm talking to the admins. normal players: smile and wave, smile and wave...)!
So you DO want that skill to be unlocked at a certain level with no other requirement restrictions? Alright, simply don't set any parents for it. You want this skill to have parents but ONLY be unlocked if the normal level req work? Well, tell you what, the default Heroes level requirement for skills are still what decides if the player will or not use that skill even if the parenting reqs are done. So simply set it to whatever level restriction you want and be happy. But wait, you, over there, in the corner, you want the parenting system to be the only reqs for your skills and don't want the level req to mess with it? Fine then, just don't set a level req. Or at least set it to 1! Everyone's happy, right?
Now, setting a skill parentship sure is important. If you don't do it in any skill, well, this plugin will implement no tree at all... although you will still be able to mess arround with skill levels. But setting parentship is not hard at all. Take a deep breath, count to 10, copy the way you set your class parents and apply it to your skills. That's right, just as if the skill was a class! parents: strong: [skill1, skill2, skill3] weak: [skill4, skill5] it's simple as that! Do it under the skill's own section inside your class.yml's, just as if you were to add another node to it, like health, amount or mana.
Then, you have to set a max-level: for the skills to master at, just as if you were adding another extra node to the skill. By default, all skills master at level 1. So if you don't want to set it it will work just like normal Heroes. You unlock the skill and use it the same way forever.
To finish adapting your skill to the new system, you can set an HST node to it. HST nodes set increasing/decreasing values just like the ones you are used to, but they use the skill level instead of the player level. The available nodes are: "hst-damage", "hst-health", "hst-mana", "hst-reagent" and "hst-stamina". The first one increases the damage of a skill, the second increases the health cost of a skill, the third increases the mana cost, the forth increases the reagent cost and the last one increases the stamina cost. Note that none of them set the base value, which are still set by the normal nodes you have.
It's worth to remind you guys that the settings that deal with per-player-level increases still work just as they would without the plugin, regardless of the skill level. If you wish to only have increases based on skill levels, remove those other increases.
Also, you can be relaxed about your vanilla Heroes information, like player exp or skill settings. HST only READS from it but NEVER writes something to it, ever! It only messes with it's own config files, which we may talk about a little right now:
The plugin comes with 2 default files. The first one being the config.yml, where you set basic information about how the class will behave. For now, only the points-per-level: works, setting how many SkillPoints will be given/taken for each level. The default is 1.
The second one is more important. It's called players.yml. There, is where all of your player's data regarding this plugin will be stored. It is a per-player database, telling you the player's current SkillPoints on each class and each of the skills' levels for that player. I strongly suggest NOT touching on it, even when the serve is down. I do intend to improve the way the plugin deals with this file but, as of now, it's way better to just leave it alone. Mainly don't try to delete stored info. In case you need to edit anything, use the skilladmin commands. They still can't set individual skill levels but this is planned. And talking about commands...
The Commands
- /skillup (skill) [amount] - Will increase the given skill level by amount. When no amount is given it levels up 1 level;
- /skilldown (skill) [amount] - Same as the above but to level a skill down;
- /skillinfo (skill) - Shows the info of that skill. If it's locked, mastered, it's level, and it's max-level. Also shows player's SkillPoints;
- /skillpoints - Shows player's currently available SkillPoints;
- /unlocks - Shows the skills the player can unlock with the skills they have mastered now;
- /skilladmin set (amount) [player] - Sets the player's SkillPoints to the given value. If no player is given it's applied to the player who issued the command;
- /skilladmin give (amount) [player] - Same as above but instead of setting it, it adds to it;
- /skilladmin remove (amount) [player] - Same as above but instead of adding to it, it removes from it;
- /skilladmin clear [player] - Clears the given player's SkillPoints to 0;
- /skilladmin reset [reset] - Clears the given player's whole skill levels and SkillPoints to 0. This is automaticaly done upon /hero reset.
The Permissions
- skilltree.* - Gives all permissions of this plugin;
- skilladmin.* - Gives all skilladmin permissions;
- skilladmin.set - Allows player to set his/others' SkillPoints;
- skilladmin.give - Allows player to increase his/others' SkillPoints;
- skilladmin.remove - Allows player to decrease his/others' SkillPoints;
- skilladmin.clear - Allows players to clear out his/others' SkillPoints;
- skilladmin.reset - Allows players to reset his/others' skills and SkillPoints;
- skilltree.override.* - Gives all skilltree.override permissions;
- skilltree.override.locked - Allows player to use locked skills;
- skilltree.override.unlock - Allows players to unlock skills freely, ignoring parentship;
- skilltree.override.usepoints - Leveling up skills don't require SkillPoints. At the same time the player won't retrieve these when leveling down skills;
- skilltree.info - Allows player to check a skill's info. By default it's given to all players;
- skilltree.points - Allows player to check his SkillPoints. By default it's given to all players;
- skilltree.up - Allows leveling up skills. By default it's given to all players;
- skilltree.down - Allows leveling down skills and, at the same time, retrieve SkillPoints;
- skilltree.lock - Allows player to re-lock a skill by leveling it all the way down to level 0.
TODO
- Create more config nodes (eg. cooldown, radius, etc);
- Add configurable cost to unlock/reset/leveup/leveldown skills;
- Add configurable amount if SkillPoints to be given every level;
- Add /skilladmin wipe (player) command to earase player from config;
- Add better commands for managing skill levels on players.yml.
For Skill Developers
If you make skills and have any that uses nodes not supported by this plugin, you can make your own skill work with skill levels! Isn't that awesome? Simply use the HeroesSkillTree.getSkillLevel(Hero hero, Skill skill) to get an integer telling you what is the level of that skill for that hero and you can deal with it the way you want. I suggest creating a custom node with "hst" at the beggining and the node you always use. For example, if you use the "amount" and "amount-increase", you can use the "hst-amount" node so it's easier for the admins to use the node.
Fully Compatible Skills
This section will contain links to skills that fully support HST nodes. Remember that all other skills will still work with this plugin. You just won't be able to set any unsupported node to it, like "hst-amount" or "hst-cooldown".
- What's Heroes Skills (as of v4.1)
If you want to add your skills to the list, just PM me. ;)
Credits
I would like to thanks some people that made this plugin possible.
First of all, I would like to thank, of course, the creators of the Heroes plugin for providing us with such an amazing tool to play and mess with and enchance our experience on minecraft to extreme levels. Please keep up with the outstanding work!
Second of all, I would like to thank all the plugin devs that left their plugins open-scourced. This allowed me (and still is) to learn more and more of java and plugin making.
Last, but, certainly, not least, I would like to thank the bukkit/minecraft community, especially other developers, that are always there to help on both forums whenever starters, like me, need them. I hope that one day I can pay it back and help people arround with their issues and I hope this colaborative spirit never dies within this community.
Extra thanks to:
Multitallented for helping with code, formatting, testing the plugin and other important stuff Andrew2060 for helping me understand some basic Heroes methods and how they work SagaciousZed for helping me with file management
Come experiment it!
This plugin is currently installed @ proxis.midgard.eu
It would be an honor to have you hop in there and say "hello". There are some realy nice people arround that place. They are awesome!
Donate!
So, this is it, it's the end of my big text wall made especialy to you, reader, with all love and caring and cookies, but no cake yet, sorry. It would be very nice, after this long journey, if I could find more and more reasons to keep staying up late at night to finish my code. Even though I like doing it for fun, any extra compliments are always welcome. Because of that, I am happily accepting DONATIONS. Even if it's one cent it will count. Well, not in reality since PayPal will eat the cent up with it's taxes but it's the intention that counts right? And a one cent worth intention means a lot to me. Thanks for reading and for staying arround!
And have fun!
@Goobt
can you send me a link to a permission-based rpg plugin? this way I can see what I can do ;)
Could you make a version of this that works for permission-based rpg plugins?
Like, if it is typed into the console (/skillpoint give goobt 1) I get a skillpoint. I can use the skillpoint to unlock certain permissions, but only if I have the required permissions before it.
@ssscrazy
I like your ideas. In fact, most of them are planned and the new 1.5-B version introduces the /unlocks command to list the commands you can unlock. This serves as a starting point to make full tree page that's easy to understand and work with. But I hadn't thought of the branching page thing. I'll see what I can do about that.
Thanks for the suggestions and support! :D
Hello, this plugin is quite amazing and I love the idea. However, there are a few areas this plugin could improve in. I believe that this plugin needs a help page that you can view in game so that if you type in /hst help or /hst then it will say all of the available commands. Also, I recommend a page listing all of your unlocked skills so that you don't have to remember which you have. Finally, I recommend a tree page that lists skills and their branches. So it could say something like Bolt (5 levels) to Megabolt (10 levels). These few updates to the plugin would make it much simpler and easier to use. Forgive me if any of these ideas are impossible, stupid, or already implemented. If they are already in the plugin please show me where they are, because I would really like to use them. This really is an epic plugin. Good job!!
@iAutolycus
alright, can you send me one of your .ymls?
1st of all Thanks this is an awesome addition to Minecraft and Heroes alike. Can't wait to see what your stand alone is going to look like. 2nd I have installed the plug in and everything seems to work right except 1 thing. When someone becomes "Mage level 1" they can use all skills. In my class .YML I took out the heroes skill line and replaced it with the hst one
@Netro9
This is being worked on. 1.4 should come out this weekend with a fix for that and the possibility of setting levels for skills as parentship requirement.
So, for example, instead of just saying "hey you need that skill mastered" you can say "you need that skill to be this level". This allows for even more complex skill trees, since one skill can unlock multiple skills at different times.
After 1.4, some tweeks will be made to eliminate final bugs and then we will have the first release version! woot!
Hello,
I am really excited to use this plugin but everytime I use the /skillup command I get a null refrence exception. Tried with and without the number at the end of the command. Using the latest Craftbukkitt and your latest plugin.
Exception below:
I found this free program very helpful for making complex skill trees. Thought some other people might want to check it out. I am not connected to this program in any way, and am not spamming, just trying to give people a bit of help. http://www.yworks.com/en/products_yed_about.html
@bill85101
I'll get an example ready in the weekend for you guys. But be sure to check the Fast Guide. All useful info is there and you don't have to read a crazy huge text wall :P
@Perfk
On your case, you could add to the skill the lines "max-level: 3" and "hst-mana: 1" to increase the mana cost for each skill level, from level 1 to level 3. But there is no support for this "speed-multiplier" so you wouldn't be able to change this. I would suggest setting hst-mana with a negative value, so it decreases the mana cost for each level. At least it would be worth somehting ;P
@Multitallented
Well some basic nodes are already automaticaly supperted, like the skill damage, the cooldown, the stamina cost, mana cost and health cost. This could probably cover a good part of skills that don't need to have their code changed at all. Also, I don't think I can make a whole new skill system like that xD Heroes has the base for skills so it's just easier to manipulate it. But yeah, maybe in the future it would be interesting to make Heroes an optional requirement! And thanks for your support on the idea btw :D
I love the idea of this plugin, but not how it's implemented. It should be a standalone plugin, not a wrapper for Heroes. It's not feasible to re-write each skill so that it complies with HST skill levels.
@whatshiywl
Can you take a example for me? Please..
Hey Whatsishiywl,
Could i get you to setup a test class.yml. - i have read your wall of text a few times, but i just cant understand how to apply this to my own class.
if you want, you can use my test setup:
http://pastebin.com/Uvhsxc6L
all i want is for it to have 3 levels, where each time the speed and mana goes up
Thanks for a what i hope to be a great plugin :)
@bill85101
You are not defining your classes correctly. Look here to see how to set up your classes and THEN you apply the changes you want to them. Remember each class has it's own file, which the name is the same as the name of the class itself. Also, be sure to update your craftbukkit ;)
Link Removed: http://www.mediafire.com/?pk7oc5tkkflhx0x This is my setting .But it still wrong. (My language is not English so it poor.... But I really want to set)
@bill85101
1.3.1-B is the version the plugin is at. Sorry about the cofusion. It should go away once I get 1.4-B out.
@MERCHANToDEATH
SkillPoints are listed on a per-class basis, no matter if they are primary or not. It's an even deeper division that is being used. But as I said before, there is no real need for implementing the option to disable SkillPoints to a certain class soon because the SkillPoints earned on a class can only be used while the user is on that class. So they can't exploit SkillPoints earned on other classes.
looking forward to testing out the new version tonight. I wanted to know, are the skill points listed as being for primary or secondary class or are they all together even though you can only use them on one of the other class? I hope that question makes sense. I still wish I could just turn off skill points for a primary or secondary class or for each class individually, hope you might be able to work that out in the future.
Amendment: I'm still having trouble. All skills show in the skills list even with strong parents set, and I still get an internal error when I try to skillup anything. You can have a skill level to 10 or whatever even if it has no level bonus, right?
I use 1.3.2 .....
@bill85101
What is your problem my friend?
PS.: 1.3.1 will be up soon and it will probably fix /skillup being broken so, update! \o/
who can take a setting simple for me? I have a big problem"~