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!
@Favorlock
:(... Heroes was super big on my server, well if you ever find a plugin where you create your on classes and add skills pm me... :P
You might as well give up on Heroes unless you plan to switch over to something called "Libigot". It's supposedly a fork of spigot which is a fork of craftbukkitplusplus. It's purpose is to prevent a lot of the annoying changes made by the bukkit team. At the same time its making me rethink my desire to even use Heroes because I have never heard of "Libigot" and frankly don't care to use it seeing as that will likely break all the plugins that recently updated.
Hey I know your not the hero developer but do you know how to fix the problem with heroes? Or do you know if there gona update to 1.4.6 ? Because heroes is to new to be working with skills and its a big part of my server. I really need it to start working again!
@gabizou
I don't know how the Diablo II's tech tree works but I did base this idea on Ragnarok's skill tree system, tho.
@MERCHANToDEATH
Can you send me a pastie.org of one of your class.ymls so I can try to figure it out?
@donald1440
When you get another class you lose skills you had because they are stored per class, so you'd have to level them up again. However, I SHOULD add a configurable inheritance system here where it automaticaly inherits all skills from parent classes. That would be quite a nice addition. Thanks for the suggestion :D
Hi, if you have a class named swordman and a tier 2 class that you can choose after mastering swordman, And that have the same skills pluss some more. Couldent you keep the skills level on those skills?
My players can use all of the skills and don't need to level them up. Also, I have a skills set up like this but a player can still use meditate without leveling up fullheal and /skillinfo meditate doesn't show that I need fullheal. Am I doing something wrong? Meditate: max-level: 6 parents: - strong: [Fullheal] mana: 25 delay: 1500 cooldown: 45000 duration: 17000 period: 2500 MovingCancels: true CombatCancels: true BaseHeals: 16 LevelMultiplier: 0.5
@cream_sicle
Yes, you need heroes for it to work, and do most of your configuring for it in the heroes class.ymls.
Can we simply download and start? Or are there any external plugins that I need? Not sure whether I need the older Heroes plugin for this to work... lol
OK, I thought everything was good, but for some reason my players have all of their skills before they spend any points on them (not just listed in /skills but they an use all of them). Anyone else have this problem, or did I just configure something wrong?
@whatshiywl
It seems to be fixed now, thanks a lot.
Is this kinda like the Tech tree in Diablo II?
@necroloki
Thanks for both of your inputs. 1.5.2-b should solve the problem ;)
I updated to the new version and checked to see that I had 1.4.5 version of vault, but I still have this problem with skills saying "That skill can't be increased". They start at 0 right? If I set most of them to max-level 1 it will cost 1 skill point to master them, right? Does anyone have any ideas what the problem is? Also, is it possible to make only the skills you have mastered show up in the skills list? I understand if this is impossible because heroes handles it, but I wanted to ask. Adding max-level amount to the /skillinfo would be appreciated as well.
So, I tried some stuff. Here is an example of the problem. I have a skill that requires mining as a strong prerequisite, I set mining to a max-level 1, and when I try to skillup mining it says "that skill can't be increased" /skillinfo on mining says "This skill has been mastered at level 0!" but I never put any points on it, and when I try the skill that requires mining it says I don't have it. It's all very confusing. I want to use this plugin so badly, but just can't seem to get it to work right. Any help is appreciated. Thanks.
I am having the same problem as merchant. Here is the class that I was testing plugin with. Critical is one of your skills from your compatible skills. I've tried the skills with and without the "Level: X" node and skill still say "mastered at 0."
@steremoon @MERCHANToDEATH
Have you set the skill's max-level? Remember this has to be set on a per-skill basis, or else your skill will simply not level up at all. The fast guide shows you how to do that. If the error persists, would you mind sending me an example of one of your class files so I see if there's anything wrong with it? The config.yml shouldn't cause much trouble tbh.
In any case, I'd also suggest updating to the brand new 1.5.1-b version. It fixes some missing commands. Doesn't seem to solve your problem but, well, strnage things happens sometimes @_@
@Goobt
I think i'll have to postpone this idea for now. My time has been realy limited lately and has no perspective of getting any better for the next few months D: Perhaps when I have more time I can give that a better attention ;) I could say I would work on that but then I'd keep your hopes high and I'd probably take a reeealy long time to acctualy release something on that matter. Sorry for that D;
@steremoon
I'm having the same problem, might be it needs an update.
@whatshiywl: can i have a example class.yml? no matter what i did to mine, it gave me "the skill has been mastered at level 0"
@whatshiywl
You can name the nodes anything. If you go into spellmaker part of the menu is to add a permission requirement, and you can make it whatever you want. There's also a give permission command in the spells, and you could make a spell that on levelupevent types "/give <yourname> skillpoint." Your plugin could take it from there.
@Goobt
hmm how's this plugin permission-based? It seems to work pretty much like Heroes tbh. I could probably make this work with that plugin but I still don't get the permissions part. There doesn't seem to be any AncientRPG.useskill.<skillname> or anything like that, only one global node for all the skills...
AncientRPG can have a permission requirement and can give permissions:
Click here to see the plugin