XPStrength
XPStrength
You can allow players to achieve bonuses at certain levels - when they have a certain level, defined by you, they will get a certain bonus to their attack damage, defined by you. You can define as many levels as you want.
Features
- Toggling - You can use /xpbonus to toggle the level-attack bonus. If your level is lower than the lowest level defined by you (the script works this out automatically from the config file) then it will not let you use the /xpbonus command. If you are above the lowest level, you toggle the /xpbonus on and then you drop to below level 30 (see XP draining) it will be automatically turned off. The player's /xpbonus saves.
- Permissions - The permission node is xpstrength.bonus. If the player doesn't have this, they will not be able to use any of the XPStrength features.
- XP draining - You will (configurable) lose xp every time you hit. There is a 50% chance that you will lose xp (you will lose the amount of hearts that you hit - take away 10 hearts and you lose 10 xp), a slightly-less-than-50% chance that you will not lose xp, and a 1% chance that you will lose double the amount that you hit.
- User-friendly config - There is a configuration file that allows the user to modify all the levels and their bonuses easily. It uses .txt rather than .yml to avoid the pesky tab errors.
- Customisable language files - There is a file containing every message sent by the plugin, so the user can customise every single message at the touch of a button.
- Level cap - You can set a level cap that players cannot bypass.
Installation
To install, simply place the .jar in your /plugins/ folder and start the server. Inside /plugins/XPStrength/ you can find the user's accounts (I'm not sure why you'd want to edit these, although if for some reason a user's account breaks, submit a bug report and then delete the file.)
The plugin will automatically create a config file using some default values for you to get the idea of how to modify it, although for more information on the configuration file you can click here.
The plugin will automatically create a language file uses the default English values. You can modify the language file yourself by reading it, although for more information on the language file you can click here.
A configuration editor has been kindly created by papand13 and can be found here.
Permissions
There are two permissions nodes for XPStrength.
- xpstrength.bonus - this allows the player to gain a damage bonus from XPStrength.
- xpstrength.bypass.cap - this allows the player to bypass the level cap.
- xpstrength.bypass.drain - this allows the player to bypass the experience drain.
Thanks!
Thanks for reading, and possibly using my plugin. If you have any suggestions or bugs, submit them and I will look at the bugs and consider the suggestions!
Helping
Are you interested in helping develop XPStrength? Head over to the GitHub repository and fork it in order to contribute. Thanks for the help!
@jameskmonger
1.5, and the same for level 10 and 20. I haven't tasted past there, I shall do it immediately.
EDIT: Tested it out and at level 40 I hit 7 additional damage (3.5 heats). Looks like something is adding a full heart onto the bonuses. In addition, sometimes it didn't add the bonus, randomly, but this may be due to one of my many damage altering plugins. Still, might be something to look into.
@UltrafaceGuy When you get to level 5, how many extra hearts does it say you're going to hit?
@jameskmonger
Hot diggity!
Looking good, but I'm having a weird issue that even level 5's are hitting +1.5 hearts of damage.
There's the config. What'd I do wrong this time? XD
@UltrafaceGuy Just implemented a customisable language system.
@jameskmonger
Alright, sounds good, I'll update it and keep you posted.
@UltrafaceGuy I'm working on your problem at the moment, but there's one thing that I noticed. You are currently doing this:
whereas you should be doing this:
Infact, I changed your config file to this:
and it worked as it was meant to work.
I have made a note of this on the config guide.
@jameskmonger
No problem! I might as well, considering I've already switched over to your plugin haha.
I'll look into both of those issues tomorrow morning, probably just some leftover code from where I had coded all the values in - should be easy to fix. Thanks for reporting them
Here's the config, I think it just doesn't work for levels below 30.
Yeah if drain is false, I'd rather not confuse people with allowing then you turn extra damage off, as there would be no benefit. The other problem would be they'd be reminded of /xpbonus every time they leveled. Perhaps make it send a different message if drain is off, or add a
Levelupmessage: You have reached level %lvl%, and now hit %damage% more damage! And I can confirm it doesn't work for bows. I thing you have to use the projectiles code and use some crazy getPersonWhoFired method.
Double post.
This seems very Interesting. I am a co-owner of an awesome server., So i have to deal with plugins quite a bit. I will talk to the owner about getting this. If it is good..i will try to promote this plugin (: Zayne
@UltrafaceGuy I'll add an auto_toggle setting in the config file - would you like the user to be able to still use /xpbonus if auto_toggle is true? Or not?
Also, can you post your config file? It should work but if it doesn't I'll use your config file and look into it.
I tried the plugin out, and it works great, I'll work on testing out bows. Quick question: can you have the xpbonus always on for configs with drain set to false?
And one other thing. Can you set the levelup message to show up when the levels in the config are reached? I have someone level up to 20 and they don't get a message XD
Configurations have been added.
I'm implementing the configuration at the moment. The current structure (I feel this is a good way to make it) of the config file is like so:
The first line obviously sets the xp drain. The rest of the lines, however, are slightly different - they implement the levels and their bonuses. They look confusing but I assure you, they are a lot easier than they look. The first one means that between levels 30 and 39, the player will have a damage bonus of 2. The second line means that between 40 and 49, the player will have a damage bonus of 3. The third line is different. It means that between levels 50 and "-1" (I used it as a way of doing infinity - if you place -1 then anything above the first level will work) will work, so anything above 50 will result in a damage bonus of 4.
Another benefit that I discovered of using .txt files rather than .yml files is that the server accepts the following structure in the same way as the one above!
Hooray for easy-to-write config files!
@UltrafaceGuy Dont worry, now that you've raised the idea I will work on it :P
That's something that always irked me about levels+, the fact that bows were just hung out to dry.
@UltrafaceGuy Hmm, I haven't tested that! It does no checks apart from the following: "is the person who damaged the entity a player" and "is the player's xp toggled on". I assume it does work with arrow damage.
Alright, sounds good.
Oh! I forget if I asked this or not, but does it effect arrow damage?
@UltrafaceGuy The interval method would be good but I don't really want to limit users to solely having regularly damage increases :P
@antikx No problem. The permissions have been added, I now must wait for the download to be approved.