- Oct 14, 2021
- Reaction score
- First Language
- Primarily Uses
I would be very careful about using the kinds of formulas you've chosen here. Your damage numbers are quadratic and your defence value is exponential and these are going to become very unwieldy at high levels, and you will probably end up constantly tweaking parameters chasing weird interactions you discover - you might end up doing pitiful damage to high level targets with appropriate equipment, but then doing literally millions of damage to early game enemies.I've recently finalized the defensive portion of my damage formulas:
value /= 2 ** (armor * 1.4 / (user.level * 4 + 10))
…where armor is either DEF, MDF, or (DEF+MDF)/2.
But now I'm on the fence on whether or not to redo the offensive portion of my damage formulas. I was thinking of using the formula for Kinetic Energy as a base: K.E. = ½m*v² …in which:
m = mass
v = velocity
So I was thinking of something along the lines of...
damage = 0.5 * weaponDmg * a.atk * a.agi
I basically substituted mass for weaponDmg, which is just a custom attribute I created for in-game weapons and should be fairly representative of a weapon's weight. Then, instead of velocity², I multiplied a.atk (Strength) with a.agi (Dexterity). This seems logically sound enough for me, but it's quite obvious that such a formula would mean ATK and AGI would be equally valuable in terms of raw damage output. I would much rather have ATK be the primary damage modifier while AGI provides various secondary bonuses (HIT, CRI, CNT, etc...).
With that in mind, I could just as easily use a.atk² instead:
damage = 0.5 * weaponDmg * a.atk ** 2
Of course, these formulas are a huge departure from my current formulas. I can easily tell the values given by the Kinetic Energy formula could get to be very large due to the exponential nature of the formula. I would need to have the output divided by another stat/value similar in magnitude to ATK in order to balance this. Or I can simply scrap this idea and start from scratch again, lol...
Edit: Or, I can go back to one of my earlier iterations...
damage = a.atk ** (1 + a.agi / (-900 / 2401 * (a.level - 50) ** 2 + 1000)) + weaponDmg
…which I suppose could also be written as:
damage = Math.pow(a.atk, 1 + (a.agi / (-900 / 2401 * Math.pow(a.level - 50, 2) + 1000))) + weaponDmg
…hmm, did I get all the parenthesis right? Or do I need more for the Math.pow terms?
If I had to pick two favorites, I'd say SMT/Persona (square root of atk/def) and DOTA/World of Warcraft (atk damage is linear, defense reduction is asymptotic to 75%) are the easiest to keep reasonable numbers inside of.