Thoughts on my damage formulas

Howdy all, I've been working on my project for about 3 months now and ever since I started, I've been grappling with what I should I use as my damage formula. Early on, I got it into my head that I should use a formula that divides the user's attack against the target's defense then it would multiple the remainder against the user's attack. Now, I'm not good at math which constantly makes me question why I even bother with any of this and as such this idea has been my bane ever since. However, mama didn't raise a quitter (or teach her child about the Sunk-Cost Fallacy), so I've come to share some formulas that I've brewed up for public review:

1. a.atk * (a.atk/b.def + (a.luk/1000))

The basic and first iteration of the idea, basically as I described above. Adding in the user's luck in was something I cribbed from the Fallout games and was there to give the Luck something to do because it does shockingly little else in the system. I'm still quite fond of it but I fear it might make the numbers a bit too jumpy. That and the numbers in the division part of it could start becoming closer together as the game progress, granting slimmer bonuses and penalties. Which I suppose could be countered by larger number scaling but still.

2. a.atk + (100 * ((a.atk/b.def) + (a.luk/1000))

This iteration was created as a means to counter the 'jumpy' problem, having the remainder be multiplied by a separate static number then adding that on to the attack stat. The only problem with it is that the number is just that: static. It doesn't grow or adjust at any point in the game. Leading into...

3. a.atk + (10 * a.level * ((a.atk/b.def) + (a.luk/1000))

I don't know if using the player's level in the damage formula is novel or stupid. Either way, I needed a number that scaled with player throughout the game so their level seemed like an obvious choice. For the most part it seems to work but my concerns with it are more of the structural set up of the game. The player does not earn EXP but rather a currency they can spend at both shops and to level up (Think Dark Souls). So I fear I might accidentally trap players behind a virtual paywall or encourage excessive grinding. Also, I do know that formula will not work properly for monsters using it since they don't track the player's level with the a.level, I will be using a variable in the actual in-game formula, this is just here for demonstrative purposes.

4. a.atk + ((a.atk/2) * (a.atk/b.def)

This last iteration I'm showing off is another means for a dynamic number: halving the player's attack and then multiplying that by the remainder. It would work since the attack stat is only going to grow throughout the game. However, something feels wrong about referencing the same statistic three times in one equation. I'm not math-savvy to explain why, it's more of a gut feeling.

Well, those are my formulae, I welcome all feedback and criticism. Apart of me feels like I might be overthinking it in some places which my very well be the case. Thank you all and have a good day.
First question: what are typical numbers for stats in your game? Because (a.luk/1000) is just going to be 0 unless your stats get into four digits (and if they do get that high, then the engine's default use of Luck for state infliction chance will actually start to be noticeable).

Now, I'm not sure what you mean by "jumpy". Do you mean that the output is volatile if ATK or DEF changes by a little? Well, since your formula is multiplicative, that is going to happen if you have small numbers. For instance, if you start with 6 ATK and find a +2 sword, damage (against the same enemy as before) will be multiplied by 64/36 (i.e. it almost doubles), while if you start with 60 ATK and find a +2 sword, it gets multiplied by 3844/3600.
There are a number of threads devoted to this, including formulae crafted by mathematicians and explained for the layman.

I got the one I use from post #29 here:

I've come to share some formulas that I've brewed up for public review:
One thing I'll point out about all of the formulae you put here - they all include a.atk/b.def

Presuming your game is balanced by having stats close to each other (e.g. a level X actor against a level X enemy will have approximately the same values for attack and defense), that will just be 1 * whatever else you have in your formula.

And even if they're not exact, you'll have to have significantly different values for those parameters for that part of the formula to see much difference at all.

1. a.atk * (a.atk/b.def + (a.luk/1000))
So this will, when fighting enemies of your level, essentially be saying "your damage is your ATK."

As described above, the dividing part is presumably going to be close to 1, and unless you're vastly changing the expectations for parameters and using huge values, luck divided by 1,000 will be almost 0.

2. a.atk + (100 * ((a.atk/b.def) + (a.luk/1000))
This is basically the same as above, one presumes the damage will usually be "ATK plus 100."

3. a.atk + (10 * a.level * ((a.atk/b.def) + (a.luk/1000))
As above, the presumption is this will usually be "ATK plus (10 * level)."

I don't know if using the player's level in the damage formula is novel or stupid. Either way, I needed a number that scaled with player throughout the game
There are plenty of games that incorporate level into damage; but, y'know, typically ATK does scale with the player as they level up.

4. a.atk + ((a.atk/2) * (a.atk/b.def)
As above, one presumes this will typically be, simply, "1.5 * ATK."

One thing I'll note: you have a few formulae above that will, with presumed parameters, produce wildly different values (1 and 2 are drastically different).

This tells me that you haven't done what I would consider the first steps of this process.
1 - Determine what values you want to see for damage. Do you want a high level hit to do 20 damage? 150? 9,999?

2 - Determine how many hits an average enemy of your level should take to defeat.

Those two things will inform your HP progression (at least for enemies) and let you take whatever formula you want to test and figure out what the ATK and DEF values need to be to make it work.

(and if they do get that high, then the engine's default use of Luck for state infliction chance will actually start to be noticeable).
True, but only if the actors have values that high and enemies don't, as that's based off the difference between the two.
Luck would range from 10 to 100 and would have been divided by 1000, coming out to around .0X or .X
It would then be added to the atk/def fraction as a small bonus, essentially. If my math and understanding of MV math and when it rounds up numbers is correct.

I suppose some context for the intended gameplay loop is in order, at least to get my thought process. The game is Active Time combat and is meant to have an interplay between attack and Agility, with weapons and armor that deal and absorb more damage but are heavier and weapons and armor that is lighter but deal less damage. Player and Monster stats are never meant to be exactly the same unless the player is going middle of the road with weapon choice.

I admit there was a lot of freeball testing, more about what formula felt right and appropriate than having specific goals in mind. I did have some general ones, namely make a formula that attacks hurt more if it passed the enemies armor and hurt less if it didn't. I honestly didn't know I should've had more specific goals in mind, I just kinda threw myself in and I don't really know where to look for guides or resources like that.
Luck would range from 10 to 100 and would have been divided by 1000, coming out to around .0X or .X
It would then be added to the atk/def fraction as a small bonus, essentially. If my math and understanding of MV math and when it rounds up numbers is correct.
MV rounds the result of the damage formula. So...if your LUK ranges from 10-100, let's take a middle of the road example of 50. 50/1000 = .05. That will result in a change of one point for every 9-28 damage you're doing with the rest of the formula.

Player and Monster stats are never meant to be exactly the same
That's just going to make everything harder to balance if it's not, y'know, balanced (in terms of being equal). So I can't think how you can approach this unless you do what I described above and work backward from your desired goal.

I honestly didn't know I should've had more specific goals in mind
Don't misunderstand me - there is no should. There's no morally right or wrong way to do this. But what I described is the only thing that makes logical sense to me.

If you go the other way, starting from a formula with no intended values, then you have math and you're simultaneously trying to throw random values into it and change the formula around said random values. For me, I don't know how to get anything accomplished that way.

Original thread: https://forums.rpgmakerweb.com/threads/thoughts-on-my-damage-formulas.158390/