# Give me an example of a good, simple stat and damage formula

#### Brandon Thomason

##### Dragon Rearling
I'm creating a game that involves the following stats:

HP - The hit points of the character
ATK - The physical attack power of the character, monster, or boss. Determines how much physical damage is delivered. Higher ATK means more physical damage done to an entity.
DEF - The physical defense power of the character, monster, or boss. Determines how much magical damage is warded off. Higher DEF means less physical damage done to the entity.
MGC - The magical attack power of a character, monster, or boss. Determines how much magical damage is delivered. Higher MGC means more magical damage done to an entity.
RST - The magical defense power of a character, monster, or boss. Determines how much magical damage is warded off. Higher RST means less magical damage done to the entity.
SPD - The speed of the character, monster, or boss. Determines the attack order of entities. Higher speed means more attack chances.
EVD - The evasion chance of an entity. Higher evasion means more chances of completely avoiding an attack.
ACC - The accuracy of an entity's moves. Higher accuracy means more chances of hitting another entity.
CRIT - A critical hit, which virtually doubles the damage done to an entity.
OBLQ - An oblique hit, which virtually halves the damage done to an entity.

Each character, monster, or boss has all of these stats.

But I don't know of a decent formula except pokemon which would take these stats into effect. There are no IVs, EVs, etc.

If the game does not support this, please tell me. If I (or my programmer) would have to design this, please tell me as well.

#### Andar

##### Veteran
that list is how the RPG-Makers of VX and later work (98% identical, just no oblique hits), only XP has different stats than what you listed.

However what you want does not exist - because the balance of a game contains much more than only the damage formula. For example it matters when in the game a skill with a formula becomes available to the player - a good beginner damage formula will not be a good end-boss-formula.

That said the base attack formula for the later makers is 4*user.atk - 2*target.def and this is considered good enough for most cases as a start before you balance

#### Wavelength

##### Pre-Merge Boot
Most of those stats would not factor into your damage formula, meaning that you're actually asking a lot of questions that, together, would represent the entire skeleton of a battle system. A lot of the formulas (such as Critical Hit rate) are done for you by default in RPG Maker, though you can change them with programming or a script.

I personally like (a.atk * sp) / (b.def + n) as a damage formula. Replace sp with the Skill's relative Power level - higher numbers for more powerful skills - and n with any positive integer (usually an amount smaller than or equal to low-level enemies' DEF stats). I usually like sp around 10-80 and n around 10. For magical skills, you can replace a.atk with a.mag and b.def with b.mdf (which are your MGC and RST stats respectively). I explain in several similar threads why I feel this kind of "multiplicative" damage formula works well.

For stuff like Critical Hits/Oblique Hits, I usually like to start with a percentage to Crit/Oblique, and modify it based on the attacker's and target's stats. For example, Oblique Hit if Math.random() < 0.15 * b.evade / a.accuracy would make it so that low-accuracy battlers would have a high chance to Oblique Hit high-evade battlers.

With all that being said, I highly recommend to all designers to try to simplify your stat system until it's almost too simple. I personally think you have too many. Allow stats to represent big choices about the way characters play; don't make them about small choices or complex math. My game timeblazer originally had 8 stats and I simplified down to 4: ATK, DEF, AGI, and DEX (which controls Crit rate). My game How Badly originally had a lot of stats and I found I could simplify it down to 3: VIG (which directly controls Max HP and represents defensive play), PWR (which enhances the power of all your abilities and represents offensive play), and SPD (which controls how often you get to act in combat and represents utility/tactical play).

#### Milennin

##### "With a bang and a boom!"
a.atk-b.def?

Even the most simple damage formulas can work, as long as you balance your stats around them. It's not rocket science, unless you make it so. Almost none of those stats have anything to do with damage formulas. You only need to take this into account for regular damage formulas:
-Is the attacker applying physical (ATK) or magical damage (MAT)?
-Is the defender applying physical (DEF) or magical defences (MDF)?
Anything going beyond that is going the fancy route.

#### bgillisp

##### Global Moderators
The way I handled it was I first assigned number values to level 1 and level 99 characters. Then I also figured out where on the curve everyone would be on average when entering an area, and used that to set my monster stats for the zone.

As for damage formula, I did some tweaking based on the damage I wanted done, and ended up with a version of @Wavelength 's formula in the end. The only problem I noticed with that formula is for it to work well with the HP values I used and for large ATK/DEF values I had to make sure that ATK was about 2x DEF at all points of the game. But that's stuff you again will learn in testing of the game.

#### TheoAllen

##### Self-proclaimed jack of all trades
Good is something subjective, but here the simplest one

Disregard all stats, and just go with ATK and HP. Defense is basically just another HP. You get rid the def and up the maximum HP and you will have the same effect.

Magic attack and Physical attack is basically also the same. So you can just use one single attack stat. If a mage use magic attack of all of their skill and warrior use a physical attack, then there's no point of having both.

So the damage formula can be just as simple as
a.atk * <skill power constant>

#### Oddball

##### Veteran
I usually use something like a.atk*12/b.def

#### kirbwarrior

##### Veteran
4*user.atk - 2*target.def
It's perfectly usable and what I recommend for new makers
a.atk-b.def
Is incredibly simple and something I generally like. It says on the tin what your numbers mean. If you have 12 atk and are dealing 9 damage, you know the enemy has 3 defense.

#### atoms

##### Veteran
I like what is almost completely default in VX Ace/MV, that is also what a few others have said here.

Which is, a.atk * 4 - b.def * 2.

And then I also like a.mat * 4 - b.mdf * 2

I do use a.agi on rouges/thieves/treasure hunter type of classes. I can use that with both a.agi * 4 - b.agi * 2 and separately, a.agi * 4 - b.def * 2, I would normally have at least two different skills that have both these formula's for them.

And a.luk can be on healing. So maybe a.luk * 4 for healing? I just make sure to balance it so it gives a good amount of HP that makes it worth using.

And I do make basic custom formulas for some of the skills, just to add a nice variety, but I just match it all with what each actor's class can equip.

It seems to all work fine and well for me so far...

Last edited:

#### SolonWise

##### The Lonely Maker
The problem with the "default" damage formula (A.Atk*2 - B.Def) is that 1 point in Strenght has more value than 1 point in Defense, so, in games with you can choose what attribute to gain points, it is more suitable to invest in attack.

I like the damage formula of Final Fantasy Tactics, which the character's attack is multiplied by the weapon's damage. So, let's say your character have 6 in attack, and he is using a sword with 5 attack. 6*5 = 30 damage. You can also take this number and subtract by the foe's defense, or, like in FFT, there is no defense, only HP. Please note that in this formula, you propably will have to make your characters gain a single point in attack every 3 or 4 levels, otherwise the party will be extremly overpowered if the player grind even a little bit. Also, you will have to make a different damage formula for every weapon in the game.

#### kirbwarrior

##### Veteran
The problem with the "default" damage formula (A.Atk*2 - B.Def) is that 1 point in Strenght has more value than 1 point in Defense, so, in games with you can choose what attribute to gain points, it is more suitable to invest in attack.
That's not always true. Each point of defense is 2 less damage and investing in it could just mean taking 0 damage. When you're invincible, it doesn't matter how much damage you do.

Also, you will have to make a different damage formula for every weapon in the game.
Just mimic FFT and have Weapon Power be it's own stat. If you're not using defense, you can just replace that stat with it.

#### SolonWise

##### The Lonely Maker
That's not always true. Each point of defense is 2 less damage and investing in it could just mean taking 0 damage. When you're invincible, it doesn't matter how much damage you do.

Just mimic FFT and have Weapon Power be it's own stat. If you're not using defense, you can just replace that stat with it.
If the damage formula is (A.atk*2 - B.def), each defense point reduces damage in only 1, while each point in attack raises your damage output in 2. Maybe its fair, because an attack is suposed to do damage, and if the formula was only A.atk - B.def, a lot of attacks would cause zero damage.

Weapon power in its own stat is indeed a good idea.

#### atoms

##### Veteran
Edit: I am liking the idea mentioned a few times above about Weapon Power stats, I may try and test that out in future.

But you really can balance the default formulas, when still gaining lots of new weapons that increase Attack Power (a.atk), by increasing defence power by a bit more on each of the enemies (b.def). If you feel it's still too low, you could try to increase Defense by a little more. I.e. Instead of + b.def * 2, you can make that + b.def * 2.8. Just playtest further untill it's a good formula for you with your weapons increasing stats.

My response for now:
I edited my first post, since I put the wrong formula in it by mistake, whoops!

I also now want to add what I'm now doing. It's a bit odd, but I like it at the moment. Anyway for now, in my current project, I now have a mixture of stats on some classes/actors but otherwise default formulas.

I.e.
a.agi * 2 + a.atk * 2 - b.def - b.agi. For example.

Or

a.luk * 3 + a.atk - b.def * 3 - b.luk. For a odder example.

I have to make every formula clear in the description box though, and since you don't have much room, I expand the window size by default and then just paste that formula so the player knows the damage done.

This is just one example.

To make my enemies slightly stronger, when I want them to be, I just add an extra +1 number onto there formulas.

For example.

a.atk * 5 - b.def * 2. instead of a.atk * 4 - b.def * 2. (This total, if stats are all 10, would be 30 damage output.)

Or if it's very little, then a.atk * 5 - b.def * 2.5. (This total, if stats are all 10, would be 25 damage output.)

Decimal numbers seem to work as well, I think it has for me anyway.

I also am now liking multiple hits a lot more than single hits, but mostly only adding them by one. So normal skills hit twice, but skills that usually hit three times would hit four too. Everything increases by 1.

I just like the idea of everything having slightly higher powered, and higher emphasis or evasion and critical hit. But I've change the critical multiple hits from the default * 3 to * 1.7 at the moment. I may change that to * 1.8 or *1.9 as I'm playtesting with things.

All I've done is one map with different enemy setups so far, only to test the mechanics formulas out and make sure they work ok.

It does work nearly ok with the default setup, but I do have to adjust health bars and things like that, at the moment while I'm still testing things out anyway.

You could use the same formulas I'm chosen here, without multi-hits, and it should work nearly 100% fine with the default systems though. That's because it's still all basic and default really, just a little bit of a twist to things.

Last edited:

#### GLM

Disregard all stats, and just go with ATK and HP. Defense is basically just another HP.
I disagree. There are instances in some games where DEF can entirely mitigate some damage and not others. That's not as simple as saying it's just extra HP.

In my own game firearms ignore most armour (but not natural defense, aka VIT), while melee weapons do not. It's one of the core mechanics and simply adding HP wouldn't get you the same thing at all.

#### TheoAllen

##### Self-proclaimed jack of all trades
I disagree. There are instances in some games where DEF can entirely mitigate some damage and not others. That's not as simple as saying it's just extra HP.
Beyond that point, it's not "simple" anymore. My formula is the simplest one that works at the fundamental level. Your formula is good for a more complex one or more innovation. But innovation without the base is going nowhere. I'm not saying specifically your design is going nowhere, but devs need to know the base of stat interaction. Most of the time, the base stats are ATK and HP. Based on that, the modifier can get more complex.

Before I put a defense/armor mechanic in my game, that was the question I had to thought a lot. Why I need a def? Why do I have to decide the defense stat of an enemy? I have two enemies, why I need to bother to even put a number to the defense stat on those two? Can I just ignore it and bump their HP instead? My game isn't complex as "pick the right equipment/whatever to counter specific enemy because they can't get hurt by a specific setup". Besides, for some reasons, I didn't have a plan (and still dont) to have a full damage cut that cuts 100% of damage taken. So I felt I always had no reason to have a defense stat that eventually blocks all attack.

I tried to completely kick defense stat in my damage formula. Guess what? everything went simpler, easier to understand, easier to dev, and not really take away the game experience. The only thing that matter was some of the skill is overlapping with each other. By that time, I realized I need more interaction to make some of the skills aren't like a carbon copy of each other. Then I wanted a defense stat, but not by the way how people handle it. Flat reduction? no. I don't like the way it works. Armor scaling? also no, it just makes things complicated and hard to control as a dev. I'd like to link my another reply to a specific thread explaining how I did my armor formula, but I lost where I posted it.

Besides, why don't you answer the actual question served in this thread?

Last edited:

#### SolonWise

##### The Lonely Maker
I came up with a simple damage formula I intend to use from now on, in most or all my projects. The attributes I use are Attack, Defense, M.Attack, M.Defense, Agility and Guts. (I don't like "Luck"). So, the damage formula is either (a.atk + a.agi - b.def) or (a.atk + a.luk - b.def). That way, agility and guts gains importance as attributes. For attacks with sword, gloves, axes and so on, the secondary attribute is guts, and for attacks with bows, knives and even rods, the secondary attribute is agility. Small numbers, simple like that. I'm doing some tests and it fits perfectly my kind of projects.

For skills, something simple as (a.atk + a.atk + a.agi - b.def) will make the skill damage output do always more damage than the normal attack. In this case, the character's attack value will be the difference between the normal attack and the skill. Yeah, I've seen some projects where the normal attack does more damage than a high consuming MP skill. You can even do a skill where the guts of the character is more important than attack. (a.atk + a.luk + a.luk - b.def). Same case. This skill's damage output will be the character's normal attack PLUS his guts value. Please note it can change if the skill have some elemental propreties.

#### M.I.A.

##### Goofball Extraordinaire
Ah, simple damage formulas.. my specialty!!

Since I use small and predictable numbers, I will tell you all my proprietary and flawless Damage Formula for my main project. Are you ready for this? Here it is:

(A.Atk)

Ta Da!!
Whatever an Actor or Enemy has for ATK is pretty much the damage they will deal. I don't use a defense stat. Instead, I mitigate incoming damage by Percentile defenses against Damage Types. It takes a little longer, but it's super easy to manage, play test, and figure out how much Damage will be dealt. Hope this helps.

-MIA

Last edited:

#### GLM

Besides, why don't you answer the actual question served in this thread?
I was just making a comment on that statement. No offense meant.

If I were to use the standard MV combat system, I would probably have your damage equal your a.atk, do the "no DEF" thing and use a percentage-based damage reduction using resistances and make like "slice, thrust and blunt" elements.

I was just trying to make a point because I guess I misinterpreted your post.

#### Calvynne

##### Veteran
I honestly use some extremely complex systems for getting the numbers I want, but in essence they can be boiled down to a few rather simple formulas.

Attack = Weapon Attack Power (I set this as another variable, or use a formula to pull it out of the users a.atk value)
Multiplier = (a.level*a.atk)/128 + 2 (or +/- whatever value you want, the M value is how hard you want to push things around)
Defense = b.def

(Attack - Defense) * Multiplier = Damage

With this, I then can do things like having Agility, Accuracy, Evasion, Luck all interact with the formula in different ways, for different skills. Have Accuracy impact the Multiplier value before the final damage calculation is done for example.
This formula starts to scale up pretty quickly, and if you push the Multiplier up to x4 or x6, you'll quickly get into the 10K-20K damage range even with a relatively low weapon attack power (100-150).

Here's a damage formula that just uses the formula box for the calculation and nothing else:

(a.atk/2 + (a.atk/2*ChargeValue)) + Math.random(a.atk*(a.luk/40)) - (b.def/2 + Math.random(b.def/2))

The charge value is the character's TP value, maximum 3, minimum 0.
I use this formula for smaller number games. At the 255 stat range it gives you around 2K damage before defenses.

### Latest Profile Posts

So the overhaul on my project has been going great, I like this version of the project a lot more. It's more contained and less overly ambitious for what I can achieve given my constraints on time, money, and skills in advanced programming. I'm going to wait till my project is mostly finished to begin working UI polish again. I'm going to learn how to use LUNA MV to polish the project.
last time i used this site i was a different gender.. wow rlly makes u think... anyway transing ur gender is pretty cool and theres hair growing on my feet now 10/10
I should have listened to RPGMAKER Meme thread. I should have backed up my data. The Orphan of Time, my WIP, is completely gone, all those hours of work are completely gone
God what was my life before smartphones (I had a grandma's phone before wednesday)
Stream will be live shortly with The Witcher 3! Feel free to drop by!