2013-07-07, 02:49 PM
One thing that occurred to me.
I was wondering what would happen if you had well over 255 armor. Because since monsters can do at most 255 damage, and you can wear so many pieces of armor, that seems like it would be easy to achieve if the author is not wary of this.
Essentially you should be invincible at this point. So I dawned two pieces of 255 armor. And setup a monster with 255 damage. I wasn't sure what would happen with the armor being more than the damage since, it seems like that would produce negative damage. I wondered if it could possibly be yet another bug.
Well that was not how things played out. It turns out there is another wrinkle in the formula. Basically if the armor is more than the damage, the ATK-DEF part of the equation is skipped: max(0,ATK-DEF)+ATK*ATK/(DEF*2).
And in this case the result of the exponential function was around 63 damage. Again skipping the first term of the equation seems like its totally arbitrary to me. But it does indicate that the original formula has a much larger damage window than square root 0.5 to 2. Whether it works the same way when DEF is less than ATK who is to say.
It's definitely a very piecewise function to say the least. Which is not good for authors.
All and all. I think ATK-max(0,DEF-ATK*ATK/(DEF*2)) is a pretty solid formula. You could probably add some parameters to it to increase its damage window, but I don't think such parameters should be extensions. It's easy enough to setup a custom function. It's much better behaved. But you do need to be cautious about not letting the player wear too much armor.
You could scale the armor in the hit_offset_quantifier extension if you wanted to use the entire range. Or scale up the attacks one. I wouldn't recommend that though unless its just a last ditch desperate attempt, or a test, better to just keep the armor pieces from stacking too high.
EDITED: I think things will be complicated when better hit detection arrives and authors would like to have weapon versus individual piece of armor. The weapons will have to be recalibrated or vice versa, and coverall armor would have to be adjusted to have the stats of a single piece of armor. Not sure how that could all be managed. Probably would just have to make do with custom formulas. It would be easy enough to do.
I was wondering what would happen if you had well over 255 armor. Because since monsters can do at most 255 damage, and you can wear so many pieces of armor, that seems like it would be easy to achieve if the author is not wary of this.
Essentially you should be invincible at this point. So I dawned two pieces of 255 armor. And setup a monster with 255 damage. I wasn't sure what would happen with the armor being more than the damage since, it seems like that would produce negative damage. I wondered if it could possibly be yet another bug.
Well that was not how things played out. It turns out there is another wrinkle in the formula. Basically if the armor is more than the damage, the ATK-DEF part of the equation is skipped: max(0,ATK-DEF)+ATK*ATK/(DEF*2).
And in this case the result of the exponential function was around 63 damage. Again skipping the first term of the equation seems like its totally arbitrary to me. But it does indicate that the original formula has a much larger damage window than square root 0.5 to 2. Whether it works the same way when DEF is less than ATK who is to say.
It's definitely a very piecewise function to say the least. Which is not good for authors.
All and all. I think ATK-max(0,DEF-ATK*ATK/(DEF*2)) is a pretty solid formula. You could probably add some parameters to it to increase its damage window, but I don't think such parameters should be extensions. It's easy enough to setup a custom function. It's much better behaved. But you do need to be cautious about not letting the player wear too much armor.
You could scale the armor in the hit_offset_quantifier extension if you wanted to use the entire range. Or scale up the attacks one. I wouldn't recommend that though unless its just a last ditch desperate attempt, or a test, better to just keep the armor pieces from stacking too high.
EDITED: I think things will be complicated when better hit detection arrives and authors would like to have weapon versus individual piece of armor. The weapons will have to be recalibrated or vice versa, and coverall armor would have to be adjusted to have the stats of a single piece of armor. Not sure how that could all be managed. Probably would just have to make do with custom formulas. It would be easy enough to do.