# Damage Formula Help

#### Fernyfer775

##### Veteran
Hello there. In my game, characters will have 2 types of stats that will influence damage of abilities. There will be the default ATTACK stat, but there will also be a POWER stat, which will effectively help negate enemy defense.

Anybody super good with numbers mind tossing me a few ideas or tips?

#### Andar

##### Veteran
Not really, because you didn't give us enough info to work with.

Basically the four values ATK, DEF, MAT and MDF are nothing but numbers to be used in the damage formulae - you could easily rename them to what you want and use them in the fomulas.

But until you tell us how you want those values to behave, no one can give you any detailed formula to get there.

#### Fernyfer775

##### Veteran
Everything will behave the same, and most damage formulas will be: a.atk-b.def

What I'm wanting to do is make the Power stat reduce the enemy Defense stat, I just don't know how to work the numbers.

For example:

Actor has 40 attack and enemy has 25 defense. An attack will have this formula:

(a.atk*2-b.def)

Without the power stat kicking in, this would work out to about 55 damage.

With the power stat, you would effectively ignore some of the defense stat and up your damage a bit.

Think of it as a type of "armor penetration" stat.

I don't want it to be a flat number, but rather, to work in percentages, I'm just not too good with numbers to figure out a way to do this effectively.

Here are some examples I tried, but the numbers just aren't cutting it.

For this example, I'll use LUK to signify the POWER stat.

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

What the above formula is doing is taking the enemy defense stat, and multiplying it by 2. That number then gets divided by the actor LUK stat + 1. That whole number then gets multiplied by 2, resulting in the total enemy defense, which is then subtracted from the actor's attack stat.

Here are the results using A.ATK=40 and D.DEF=25

At 0 Luck: 60 damage dealt

At 1 Luck: 110 damage dealt

At 2 Luck: 126 damage dealt

At 3 Luck: 135 damage dealt

At 4 Luck: 140 damage dealt

At 5 Luck: 143 damage dealt

As you can see, as the amount of power goes up, so does the damage, but it's increasing VERY slowly.

This is probably the closest I've gotten, but I still feel as though I can make it better. Any suggestions?

Last edited by a moderator:

#### Another Fen

##### Veteran
When you say the damage increases too slowly, how much damage would you like the formula to deal instead?

Especially since both ATK and LUK (power) just seem to increase the damage, what should be the difference between both stats?

When using the standard damage formula, high ATK battlers probably have some kind of an edge against armored enemies already, as their (higher) damage values are reduced by a lesser fraction.

Since you asked for a percental reduction, you could try something like this:

4 * a.atk - 4 * b.def * [1 - 0.01 * a.luk, 0].max

This would ignore 1% of the enemies defense for each LUK point.  [A, B, C].max  selects the maximum value out of A, B or C, so the green colored part prevents the defense rate to drop below 0%.

Last edited by a moderator:

#### Sorynth

##### Warper
My suggestion would try to find That way: (ATK/DEf)*str (or pow). Basically your ATK is more Like the power of your weapon multiplied by the str of your arm. When thinking of it you do arrange the variation. So lets say 75str with 150 ATK, against 500 DEf, then you would still do 22.5 damage. 125def=>90, 100DEf=>112.5, 75def=>150 and 50def=> 225Just be clear at the start is you wont have anything logical with a start of less then 10

### Latest Profile Posts

When there's a will, there's a lifehack.

Before i mess with battle UI further, does it look decent enough?
Free MZ? That's good. I should go try it out then.
Let's see if I can make it in time xD