ChangeDamage
ChangeDamage by FalseVacuum
NOTE: I don't play MineCraft anymore. Please don't ask for new features. They're not going to happen.
Sorry guys, updates are *very* slow! I don't play MineCraft, and I'm super busy with other things. I do enough coding every day.... I would be thrilled to have someone to which to pass on the torch!
Up for takeover! PM me for details.
Features
- Item/weapon damage
- Arrow damage
- Critical damage
- Strength effect
- Weakness effect
- Separate world configurations for damage output (all of the above features)
- Armor protection
- Fall damage (including armor protection during falling)
- Permission to decide if item/weapon damage changes based on the dealer. This also affects critical damage and the weakness and strength effects.
- Ability to configure item/weapon damage output for PvP only or for both PvP and PvE
- Default configuration so that you can avoid playing with things you don't understand yet.
- Responsive development team—I usually get back to you within 24 hours, and I get right on to bug reports.
- Open source
Overview
ChangeDamage is a plugin which allows you to change the damage an item does or the amount armor protects you. For example, you may want to make diamond swords more overpowered than they already are, increasing damage output to 20 (10 hearts). Or maybe you may want to nerf those OP diamond swords, so you decrease the damage output to 5 (2.5 hearts). Maybe, just for grins and giggles, you want the flower to do 200 damage. However you want it, that's how you can do it. You can also change the damage points of a piece of armor. You could buff the unobtainable chain armor, whilst nerfing the overpowered diamond armor!
So what ChangeDamage does is it allows you to change the damage output of any item. You can choose if this applies to PvP only or if this works for PvE. EvP will not be affected (for example, Zombie Pigmen's gold sword's damage output will be constant). It also changed the damage points of a piece of armor.
Commands
The current commands are:
- /changedamage reload - Reload the plugin
- /changedamage release - Disable the plugin (unload it, so you can remove it/replace it)
Future commands may include options to modify damage output of weapons from commands instead of from the text file
Config
- pvponly - true/false - If false, ChangeDamage will affect player versus entities (PvE) in addition to PvP. If true, ChangeDamge will only affect PvP
- verbose - true/false - If true, ChangeDamage will send you all sorts of useless spam messages that help me debug issues. Don't set this to true unless you know what you are doing.
- research - true/false - If true, ChangeDamage will occasionally print out some notes for me. Please report these notes if you get them. They will be marked "[ChangeDamage] [Research]" and will appear in the console. This is to investigate the possibility of adding critical hit support.
- damages - See "Damages", then see "Projectiles"
- armor - See "Armor Points"
- damages.expressions - Allows you to input an equation for how much damage a critical hit does. Variable 'n' is the amount of damage done by the player, rounded down to the nearest even number. Use the subnodes of "damages.expressions" "strength", "weakness", and "critical" to affect damage output for strength effect, weakness effect, and critical damage, respectively. See "Expressions"
- fall - Allows you to decide fall damage. Only activated when the player falls more than 3 blocks. Variable 'd' is the distance fallen, rounded down to the nearest integer. Variable 'a' is the total armor points of the player. Use node "fall.expression" to specify damage. See "Expressions"
Permissions
The permissions nodes for this plugin are:
- vacuum.changedamage - Gives access to /changedamage
- vacuum.changedamage.damage - Default enabled. Disable to make damage output changes not be affected for this player.
Upcoming features
Color scheme:
- In progress
- Suggested
- Completed
These are features I want to add but have not yet done so:
- Change durability
- Armor color
- Mob effects when wearing certain armors (maybe)
- Automatic updating
- Modify enchantment power
- Change potion power
- Potion effect when attacking
PLEASE make suggestions. If it's something easy, you can be sure to find it in the next update!
Bugs
Color scheme:
- Unresolved
- Resolved but not in the current version
- Resolved
Bugs:
- ClassCastException caused by killing Ender Crystals
- Cannot use non-armor pieces as armor (causes an error when falling)
- NPE in arrow calculation
- Arrow permissions weren't working
- Critical damage didn't work
- When performing a critical hit, damage output was reducing
- The fall damage expression was being read from the wrong node
Download
To download the Bukkit approved version, click the "Download" link on the top right hand side of the page.
To download stable versions click here.
-
View User Profile
-
Send Message
Posted Jul 1, 2012@falsevacuum
And what is the default formula? Just for future reference ^_^
Nevermind, I spotted it below.
-
View User Profile
-
Send Message
Posted Jul 1, 2012@UltrafaceGuy
I can tell you that vanilla critical damage is not actually constant. It has a random component to it. If you want a formula that will provide a constant damage for critical, but similar to vanilla, you can use:
i i 2 / 2 + fl +
Which is the maximum additional damage on vanilla
and
i i 2 / 2 + 2 / fl +
Which is the average additional damage on vanilla.
-
View User Profile
-
Send Message
Posted Jul 1, 2012@falsevacuum
No problem, keep in mind I REALLY care about precise damage (lots of PVP on my server), love testing this kind of stuff, AND have an indicator of how much damage was hit, so if you have any dropbox editions to test I'm always up for testing!
Love this plugin :3
-
View User Profile
-
Send Message
Posted Jul 1, 2012@UltrafaceGuy
Oh. Haha. I see the problem! It's that I didn't add to i.
i 2 / 2 + rand * fl = floor(random * (i/2 + 2))
I need:
i + floor(random * (i/2 + 2)) = i i 2 / 2 + rand * fl +
It should be
This sucks. Now I have to get the update out to everyone >.> Maybe I should change the node or something.
Anyways, thanks a ton for finding that problem! If you hadn't caught it, that would have been out there for who knows how long :/
Edit: I just added a line of code that basically says "if your damages.expression.critical node is set to 'i 2 / 2 + rand * fl', update it". I've submitted the file to Bukkit and updated my SVN.
-
View User Profile
-
Send Message
Posted Jul 1, 2012@falsevacuum
What I meant by that, and it was fixed in the new version, that when I got a vanilla critical, no additional damage was done for the critical. So if I hit 10 damage, and critical-ed with a 10 damage attack, I would still hit 10 damage.
Okay well I figured out why nothing was going into effect, I didn't have the update: true/false in my config and it was just crashing. But now my critical hits actually do LESS damage than a standard one! Hah!
Perhaps this is the cause my my problem?
-
View User Profile
-
Send Message
Posted Jul 1, 2012@UltrafaceGuy
Sorry, but I can't seem to replicate your result. Here's my config:
The output was this (with verbose on):
This instantly killed the pig when I used item 367 (rotten flesh)
Could you please switch "verbose" to true, attack something, and send me your config and output? That will give me a better idea of what is going on.
I'm not sure what you mean by "I have I plugin that displays total damage (MobHealth) and whenever I critical (vanilla) with a weapon, It doesn't do anything more ^_^". Are you trying to say that you can't do critical hits anymore? I'll look at MobHealth and see if it will do any modifications, but it shouldn't. One thing to note about this plugin is that it recalculates the damage from scratch, so any previous modifications to damage will be lost.
-
View User Profile
-
Send Message
Posted Jul 1, 2012@UltrafaceGuy
I'll look in to it. I had to rework the whole damage output thing. Sorry I didn't respond: I was camping.
-
View User Profile
-
Send Message
Posted Jun 30, 2012Well criticals work in the new one, but I'm not hitting the correct damage again, it would seem as if it is using default values for everything :D
-
View User Profile
-
Send Message
Posted Jun 30, 2012@falsevacuum
I have I plugin that displays total damage (MobHealth) and whenever I critical (vanilla) with a weapon, It doesn't do anything more ^_^
Also could you maybe add a config option, Use Custom Critical damage: True/False? I think changing it is a great idea, but as you know, I use Levels+ and the critical damage is already factored in and multiplied. Anything higher and there would be devastation! XD
-
View User Profile
-
Send Message
Posted Jun 30, 2012@MineCraftMyph
I'm not sure when Enchantments get factored in, but I'll look into it. Dealing with critical damage is my first priority, though, since I'm so close.
Edit: Good news! Everything there pops up in the same method!
Edit2: I can make Enchantment support, but it would take a lot of work. Don't worry, I will, but it will take a while to figure out the best way to do it.
-
View User Profile
-
Send Message
Posted Jun 30, 2012Seems like a awesome plugin with essential features, Ill start testing.
+ How about changing the Damage/Protection control over Enchantments?
-
View User Profile
-
Send Message
Posted Jun 29, 2012@UltrafaceGuy
Actually, that might be why critical hits aren't working. My code seems right, but it just doesn't work. If that's the case, then I get to have a lot more leeway with critical hits (yay :D fun)
Just checking, are these Vanilla critical hits, or a plugin critical hits?
-
View User Profile
-
Send Message
Posted Jun 29, 2012Oh and I don't know if it is just in my version or not, but it would appear as if weapons who's damage has been edited, lose the ability to preform critical hits (sparks still fly but no additional damage is done)
Shall I test another build and see if this is still the case?
-
View User Profile
-
Send Message
Posted Jun 28, 2012@UltrafaceGuy
Sweet :D I love it when it works!
And when you get to assassinate people and they have no clue what's up!
-
View User Profile
-
Send Message
Posted Jun 28, 2012@falsevacuum
Sorry I took so long myself! Having too much fun running around backstabbing people with shears (which with the server's texturepack looks kinda like a TF2 Spy's knife!)
LONG STORY SHORT: Worked, and it is amazing!
-
View User Profile
-
Send Message
Posted Jun 28, 2012@UltrafaceGuy
Sorry I didn't respond. Didn't get an email notification :P
And, yeah, that looks right.
-
View User Profile
-
Send Message
Posted Jun 28, 2012@falsevacuum
Nope. That would PROBABLY help.
^ And tester of the year goes to....
KK here's what my config looks like, I'm going to test it, and you'll be able to know for sure if I did it right. http://i.imgur.com/N1Ub4.png
-
View User Profile
-
Send Message
Posted Jun 28, 2012@UltrafaceGuy
Did you edit the config to say
?
-
View User Profile
-
Send Message
Posted Jun 28, 2012Kk testing now :D
- Initial test has failed, I turned the shears example into a reality, testing again with other things...
- Tried it on everything I edited, no dice. Armor works great though ^_^
-
View User Profile
-
Send Message
Posted Jun 28, 2012@falsevacuum
Ok, so I've gotten a more dynamic solution, albeit less elegant. It calls an event on each priority, and when the desired priority is reached, it calls the handler method. To affect it:
damages.priority: X
fall.priority: X Where X is
EDIT: Derp... I didn't test it and there's a null pointer.
EDIT2: Fixed it.