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.
Someone is updating this?
@Q2Lummox
Your damages.default.default will specify "any object that's in the hand".
Also, CommodoreAlpha is correct, quotes around the numbers are unnecessary. It might be equivalent, it depends on YAML's syntax.
@CommodoreAlpha
Thanks. :D Sorry, I totally forgot to respond to the post.
@Q2Lummox
According to the documentation, you shouldn't have single quotes around your numbers. But I'm not sure if that fixes your problem.
Also, you didn't set the damage for "default", so that could be your issue.
I have my settings like this:
pvponly: true
verbose: false
damages:
default:
'258': 7
'267': 8
'268': 4
'271': 3
'272': 6
'275': 5
'276': 10
'279': 9
'280': 2
'0': 1
default: 0
expression:
critical: i i 2 / 2 + rand * fl +
weakness: i 2 w << -
strength: i 3 s << +
armor:
default:
DIAMOND_CHESTPLATE: 8
fall:
expression: d 3 - a 0 * +
potion:
'0': {}
For damage only with those objects. But in practice, damage with any object in the hand. I have something configured incorrectly?.
Update for 1.4.7 or Join with the creator of If the damage controll 1 plugin for managers all damages so more good
Hey, i would like to bump the thread on Durability changing. As you probably know, there are no other plugins that change this, which would up the demand on your plugin. Please, considder updating durability.
Thankyou
Relax, it's only math. :)
Anyway, it's basically your normal arithmetic operations, but set up differently. When you see two terms, then an operation right after, you presume the operation to apply directly to the two terms preceding it. For example, I see this: 3 4 +; that means I first see 3, then 4, then +, so I must add 3 and 4 to get 7.
The "d 3 - a 0 * +" is a harder example, so I'll walk you through it step-by-step.
First, you see two terms, "d" and "3", immediately followed by a "-". This means you do d - 3. Imagine that the "d 3 -" portion is now gone, because you have "dealt" with it. We now move onto "a 0 *". (By the way, "*" is computer notation for multiply.)
We see that "a" comes first, then "0", which will be the first two terms. We see "*" immediately following it. This translates to "a * 0". Now, we have two terms, "d-3" and "a*0". If you've noticed, "+" follows these two terms. Therefore, you need to add (d-3) to (a*0) to get the complete formula: "(d-3)+(a*0)".
If you did not follow any of that, you should brush up on arithmetic, or take algebra (or retake it) if you haven't done so. Also, I don't understand why people nowadays need a video for everything. I don't even know why people need a video for math. If all the work is shown, the point of a math tutorial is completely redundant.
What falsevacuum's new equation does, is double fall damage (hence the "*2") without changing the distance you need to fall (hence the -3 constant remaining the same). If you want to multiply the fall damage by any amount, change the "2" in his new equation to any number, with 1 meaning vanilla fall damage, anything <1 meaning less fall damage, and anything >1 meaning more fall damage.
o.o that was a lot to comprehend, is there a video you have?
@DayZedServer
The expression must be a postfix expression (http://en.wikipedia.org/wiki/Reverse_Polish_notation, http://dev.bukkit.org/server-mods/changedamage/pages/config/expressions/)
Basically, instead of
1+2 it's 1 2 +
The default fall expression is: d 3 - a 0 * + That translates to d-3+a*0, or the distance fallen, less 3, plus nothing for armor.
If you want to increase the damage done, try:
d 3 - 2 * which is (d-3)*2
Now that I'm looking at this, I really should have added min, max, and pow functions.
The config is very confusing, can you explain how to edit it? I just want fall damage greater
@VOWFallen
Thank you very much!!, Arrived a little late, but I'm using it again this plugin ... : D
@VOWFallen
thanks update
is work
http://dl.dropbox.com/u/37408974/ChangeDamage1_8_3.jar Let me know how it works.
@Q2Lummox
The update I did was for 1.4.6, I will update to it to 1.4.7. But remember this is all falsevacuum's code, I am only maintaining it.
@Q2Lummox
You'll have a find a new developer, then, because I've halted development.
@falsevacuum
The update of VOWFallen does not work with newer versions of Bukkit.
@Q2Lummox
Sorry, but I'm not maintaining this project anymore. VOWFallen has posted an update in the comments, but I cannot guarantee that it is safe.
Please update for a 1.4.7.R01 build of craftbukkit!
@falsevacuum
I can't change the damage to certain value, since I have no event that fires after damage is applied to the tool. And I can't counteract it by setting the damage to (current-1) since I don't even know if it is going to take damage because its based on chance, so hits you will lose gain one damage, others you wont, and on diamond tools you might gain 2, might not. Anyways lol, I found another method by using schedules. The only problem is, it seems it doesn't want to work on tools that aren't defined in the config, I think I will just define them all. Would love to talk to you over IRC if I have problems. :)
I'm not really sure if I understood what you said below since I'm a java noob. Maybe you just told me the really simple way.
@VOWFallen
It shouldn't be too hard to do. Create an object type that contains an ID and a damage value. Store those instead of just an ID. You would have to parse the name field in getId() for a colon to separate the ID and damage value, psuedo-code:
Find a colon in name
If one exists, divide name into before and after
before -> id
after -> damage
else convert the name to an int and store to id, damage is 0
You'll then have to make adjustments to DamageListener entitiyDamaged() to read the damage value of p.getItemInHand().