# How do you begin to balance your numbers and formulas?

#### SOC

I love game balance. I love thinking about "how much damage should this do," or "how does it feel to use this." But I am terrible at getting started and I have absolute garbage math skills. I don't know how to create proper formulas, I don't know how to make skill damage/heals scale to be useful early and late game, I don't know exactly how much of what number give what stat and everything involved with balance. I just know "I think this should do this amount of damage," but don't know how to achieve it. I can just copy the basic default formulas that come with the database skills like "a.atk * 4 - b.def * 2" and "a.mat * 4 - b.mdf * 2", but that's not exactly useful when trying to achieve specific amounts of damage. I can kind of get around that by adding flat damage values to a skill, like "I think this skill should do about 300 damage at this time of the game" so I can put "300 + a.mat * 4 - b.mdf * 2" but that's not true balance, nor does it enable it to scale into late game where I want that skill to be able to do thousands of damage.

Where do I go to begin to learn these things and set up stat growth per level, balancing it with enemy stats and creating relevant and meaningful skills that remain useful from early game to end game? If I specifically want to learn how to use RPG Maker formula math for balancing my game properly, where should I go? I understand basic math and algebra so I understand formulaic equations and stuff, but not how to create or apply them to functional RPG mechanics. I especially want to be able to make creative and specialty formulas, like an ability for a tank class that does more damage depending on the actor's current target rate, or abilities that hit more times depending on the actor's current M.ATK or AGI and stuff like that. Creating sub stats like STR, VIT, INT and MND, where INT is for mages and MND is for healers. FFRK heavily inspires me, but I have idea how to translate some of their ideas into RPG Maker because I don't know how to use math properly.

Heck, I really like how FFXIV handles skills and abilities. They slap on a "potency" in the description and balance around that. This skill has 100 potency, and this skill has 150 potency, and that skill has 300 potency. Those 3 skills are just as useful at level 5 as they are at 80, and I wouldn't mind creating something like that in MV, making it very easy and clear to balance and communicate with the player. It's even got unique abilities like Spirit's Within that has a base potency that decreases the user's current HP drops.

Last edited:

#### NinjaKittyProductions

##### Professional Murder Hobos
finalbossblues had a really good read on skills, which can be found here: http://finalbossblues.com/skills-what-youre-doing-wrong/
Formar0153 had this formula page for vx ace: http://cobbtocs.co.uk/wp/?p=271
Mr. Trivel had this formula page for MV: https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

I have always found that the damage formulas do heavily depend whether you are doing low numbers or high numbers, but the general rule I like to follow with my game is pretty simple...
• basic skills should do 50% to 100% more damage than my base attack
• area skills should do 50% more than base attack
• if a skill does any status ailments those aliments are set to affect at 100% (no slight or moderate chance).
• warrior or the like will have skills that scale with atk while casters will have skills that scale with matk. Thieves and archers have skills that scale with agi.
I typically use script or plugins like yanfly's Weapon Unleash (http://yanfly.moe/2015/12/26/yep-51-weapon-unleash/) to replace the attacks of certain weapons to coincide with classes (as above).

Above all, the best advice I have received when balancing stats and formulas is to play test the hell out of your game.

#### TheoAllen

##### Self-proclaimed jack of all trades
I use skill damage scaling. For example, if normal attack deal 400 damage (and 400 was the result of a base formula, like atk minus def or something), then skill A will deal 150% damage of the normal attack. Going with this, any skill will still relevant even in late game.

I even think that the damage or stat growth doesn't really matter. You do what you want to do. You choose what kind of stat/damage growth. Then, in the end, you achieve balance by tinkering the enemy stat number. What makes some skills irrelevant in late game is also because you make the late game enemies have a higher spec.

As for creating sub stats, think that again why you need those stats in the first place? If a mage that has high magic attack stats and a low attack stat, but their action all requires magic attack stats, and not physical attack stat, why not just ditch magic attack stat and use universal attack stat?

My rule of thumb is always to make it simple (and maybe also stupid). I don't go around making extra stats unless I could answer why I need it. Up to this time, I've reduced default stats up to the point I only need HP, attack, defense, and armor HP. I have no luck, agi, magic defense, and magic attack stats. And by having fewer stats in my game, I have an easier time to balance my game.

#### SOC

I use skill damage scaling. For example, if normal attack deal 400 damage (and 400 was the result of a base formula, like atk minus def or something), then skill A will deal 150% damage of the normal attack. Going with this, any skill will still relevant even in late game.
What is your game's normal attack? Is it just the default formula (a.atk * 4 - b.def * 2)? How do you make skill A do 150% damage of that?

As for creating sub stats, think that again why you need those stats in the first place? If a mage that has high magic attack stats and a low attack stat, but their action all requires magic attack stats, and not physical attack stat, why not just ditch magic attack stat and use universal attack stat?

My rule of thumb is always to make it simple (and maybe also stupid). I don't go around making extra stats unless I could answer why I need it. Up to this time, I've reduced default stats up to the point I only need HP, attack, defense, and armor HP. I have no luck, agi, magic defense, and magic attack stats. And by having fewer stats in my game, I have an easier time to balance my game.

I think sometimes having these sub stats create more balance opportunities, and as a player I kind've like the feeling of having both ATK/STR and M.ATK/INT/MND. Finding gear that gives +2 STR is much different than +2 ATK, while having mages focus on INT and healers focus on MND creates a feeling of uniqueness between the two characters. I guess you're right in the end though, because you can simply have mages wear one special set of equipment and healers wear another with different graphics/names, even if they fulfill the same role. I should probably keep things simple in MV until I'm far more comfortable otherwise.

#### TheoAllen

##### Self-proclaimed jack of all trades
What is your game's normal attack? Is it just the default formula (a.atk * 4 - b.def * 2)? How do you make skill A do 150% damage of that?
In my complete game, I use basic atk * 4 - def * 2 with a multiplier. So the formula goes like
Code:
``(a.atk * 4 - b.def * 2) * 1.5``
With x1.5 is the skill multiplier. Different skill usually has a different multiplier.

I think sometimes having these sub stats create more balance opportunities, and as a player I kind've like the feeling of having both ATK/STR and M.ATK/INT/MND. Finding gear that gives +2 STR is much different than +2 ATK, while having mages focus on INT and healers focus on MND creates a feeling of uniqueness between the two characters. I guess you're right in the end though, because you can simply have mages wear one special set of equipment and healers wear another with different graphics/names, even if they fulfill the same role. I should probably keep things simple in MV until I'm far more comfortable otherwise.
In my opinion, if you're doing a linear RPG with locked party members, such thing doesn't really matter. All you need to know is how much are their attack power, health, and defense. But in case you're building a more open RPG with an opportunity to build your party, customize your character, strategizing how to deal with the enemies in a certain area, such complexity may have a purpose. Granted, I never try to design an open RPG.

SOC

#### Jesse - PVGames

##### Game and Graphics Developer
(a.atk * (a.atk / (a.atk + b.def)))

This works incredibly well for both high and low numbers. You will pretty much almost never run into a situation where you are throwing 0s for damage and all you need to worry about is the attack power and defense stats which are a lot easier to balance out than those plus formulas. I use this as my basic attack formula. For skills that do more damage, I just multiply it by like 1.25 or something, or if it's an area attack I multiply it by 0.75. You can get creative with it. I also add variables to the formula to give more control if/when necessary.

#### Aesica

##### undefined
My approach (and it works extremely well so far) is to just throw the default formula in the garbage and go with something entirely multiplicative. Currently, the base of what I use is:

Code:
``a.attackStat * skillModifier / (1 + b.defenseStat * 0.01)``

Consider:
• Harold (50 ATK, 50 MAG)
• Mecha-Harold (450 ATK, 450 MAG)
using
• Attack (1x modifier)
• Ultima (12x modifier)
vs
• Cute Slime (30 DEF, 30 MDF)
• Omega Weapon (400 DEF, 400 MDF)
So in battle:
• Harold uses Attack vs Cute Slime: (50/ 1.3) = 38 damage
• Harold uses Ultima vs Cute Slime: (600 / 1.3) = 462 damage
• Harold uses Attack vs Omega Weapon: (50 / 5) = 10 damage
• Mecha-Harold uses Attack vs Cute Slime: (450 / 1.3) = 346 damage
• Mecha-Harold uses Ultima vs Cute Slime: (5400 / 1.3) = 4154 damage
• Mecha-Harold uses Attack vs Omega Weapon: (450 / 5) = 90 damage
• Mecha-Harold uses Ultima vs Omega Weapon: (5400 / 5) = 1080 damage
About enemy defense: For best results, you probably won't want to give the enemies much in the way of DEF/MDF from start to finish (which makes planning their stats that much easier) unless they're meant to be highly resilient to physical and/or magical damage. As seen in the example, Mecha-Harold's attack vs Omega Weapon is barely better than noob Harold's attack vs Cute Slime due to the huge DEF variance

Skill damage modifiers: Ultima was an extreme example, as you generally wouldn't want to give such a high modifier to something unless it was meant to be used very rarely. As the example shows, the basic attack damage is nearly useless by comparison, and while Ultima should obviously be more powerful, it probably shouldn't be as far ahead as it was. If you cut Ultima's modifier by half (6x) it'd still be extremely powerful vs either foe compared to basic attack. It just wouldn't feel brokenly more powerful.

What I like about it overall is that it's mathematically very easy to work with when planning and trying to balance skills. If basic attack remains at 1x, it's easy to plan in your head that your warrior's Whirlwind Cleave ability and its modifier of 3x is going to deal three times as much damage per hit in comparison. If that's too much, its easy to dial down to something like 2 or even 1.5.

So yeah, this is what I've been using in all of my stuff and figured I'd share it.

Edit: Also, just thought I'd throw this out there for those who are more script-savvy. Rather than hard-coding the same damage formula into every ability box, I wrote myself a small plugin with a function that handles the damage formula. So, in my damage formula box, instead of:

a.atk * 3 / (1 + b.def * 0.01)

I'll put:

Aesica.Utilities.damageFormula(a.atk, 3, b.def)

That way, if I ever decide I don't like something about this formula, I can change it in one location and have it apply to every skill rather than having to comb through every single skill manually. And even in my just-for-fun experimental game, I've already got about 100 skills between players and enemies.

#### Wavelength

##### MSD Strong
Look to damage formulas that are published (Wiki's are great places to find them) from other games that you've played, if you don't know where to start, and figure out what each element of the damage formula is doing. Do that with 5 or 10 games. Then, think about your own game and want you want to achieve with your damage formula - for example, how much do you want damage to scale versus stats and skill power, do you want any kind of "diminishing returns" (where each point of a stat is worth less than the last) or "exponential scaling" (where a stat is raised to an exponential power such as "atk ^ 3" within the formula), is there any purpose in giving physical vs. magical attacks different formulas, etc.

Different games have different goals in this regard, and therefore necessitate different formulas. I haven't found anything that works perfectly yet, but I'd tend to agree with Jesse and Aesica that multiplicative, rather than additive, formulas tend to work better. Multiplicative formulas scale directly with an attack-type stat, and divide it by a number that includes your defense-type stat, rather than subtracting the defense stat from the attack stat. My own formula is (a.atk * [skill power]) / (b.def + 20) where skill power is 20 for a basic attack, and ranges from about 20 for weak attack skills with a lot of non-damage utility, to about 70 for strong damage-oriented spells, to about 150 for the game's strongest skills. I adapted this from League of Legends and DotA, with changes to meet my own game's needs and a lot of simplification. This formula has a few things that I really like about it:
• The value of the ATK and DEF stats are very clear. When your ATK doubles, the amount of damage you deal doubles. When the sum of your DEF plus 20 doubles (for example your DEF goes from 30 to 80), the amount of damage you take is halved.
• The value of Skill Power is very clear, as well. A 50-Power skill will deal twice as much damage as a 25-Power skill (and I show these numbers to the player).
• Even though they are clear, the value of a point of ATK versus a point of DEF cannot be directly compared to each other, because the value of DEF grows as ATK gets higher. This allows players to choose style over a hard mathematical comparison when choosing how to build their characters (into ATK or DEF).
• All skills remain relevant throughout the game, even the early ones, because they have no base value. The amount of damage they deal scales directly with the player's attack-type stat. Skills never become obsolete unless you intentionally make them obsolete by giving the player skills with much higher Power levels (and similar utility) later in the game.
• High-Power skills can safely be given to the player early on (usually offset with a high MP Cost or similar). It doesn't break the game balance because the player's still-low attack-type stats will keep the damage moderate in proportion to enemies' HP at this point in the game.
• The multiplicative formula offers a much wider target for balance than an additive formula would. For example, if a character's ATK stat is less than half of the target's DEF in a (a.atk * 4 - b.def * 2) formula, the character's Attack will literally deal 0 damage, whereas in my formula it will always deal half of the damage it would deal if those stats were equal. Therefore, if characters are considerably over/underleveled, the balance isn't thrown straight out the window.
• The one weakness of this formula in my mind is that as ATK and DEF both grow, the total damage from the formula grows, but only to a moderate extent. In the game I use this formula in, characters only end the game with about twice their starting Max HP, so it works well for my game. In games where early-game enemies have like 50 HP, and late-game enemies have like 5000 HP, this formula would cause battles to get much, much longer as the game progresses, which means we would probably need a second multiplier to go along with a.atk that will scale throughout the game - I chose to multiple by a.level in a game where I needed this scaling.
Finally, advice I always give to everyone about balance - Playtest, Playtest, Playtest!!! Figure out dozens of different stat/equipment setups that players could use, try scenarios where the player is underleveled, overleveled, and appropriately leveled based on where they are in the game, and play through the entire game a couple times yourself, as well. You will find that certain elements don't feel properly balanced in certain scenarios/setups. Figure out why that is, and then make the appropriate adjustments. Playtest some more after that. It's a grind, but if you want a balanced game, it's super necessary.

#### lianderson

##### Veteran
This is an extremely complicated question. That said, I'll try to answer it, as well as explain a few steps more.

But where I personally begin, is ask myself what kind of battle system I'm making. How complex will it be? How long will the battles be? Will I use direct damage reduction, or multiplicative? How will the skill system go? The armor system? The enemies? Do I want fast growth or slow growth? etc, etc.

Once all of these questions are answered inside my head, which is something that takes a few days or even weeks, I then make a text document to map out some more stuff. A few days or week after that, I then make a prototype encounter with prototype skills., as well as a prototype dungeon. I also make the set of enemies after that in order to feel out the scaling.

Once that's done, and I feel the combat flows well, I then design and mass produce the rest of the skills, enemies, and items needed for the majority of the game. I've personally found that mass production of things one at a time, is the most time efficient way to get things done.

It's a long process with a lot of testing, but with enough rpg playing knowledge, you start to pick up on a lot of the broken builds in other games, and thus lower the chances of them ever happening inside your own.

Last edited:
SOC

#### Aoi Ninami

##### Veteran
(a.atk * (a.atk / (a.atk + b.def)))

This works incredibly well for both high and low numbers. You will pretty much almost never run into a situation where you are throwing 0s for damage and all you need to worry about is the attack power and defense stats which are a lot easier to balance out than those plus formulas. I use this as my basic attack formula. For skills that do more damage, I just multiply it by like 1.25 or something, or if it's an area attack I multiply it by 0.75. You can get creative with it. I also add variables to the formula to give more control if/when necessary.

After everything that's been said about the advantages of multiplicative formulae, I decided to run the numbers to see if I could switch to this formula without having to redo all my monsters' stats from scratch. The first calculation (Erika attacking Slime Cube) gave 14 damage, instead of 27 with my old (additive) formula. So I tried multiplying your formula by 2. The result was spectacular: every damage calculation I ran for the first dungeon came out within 3 of my old formula. I only had to tweak one monster's HP for everything to die in the same number of turns.

So I think I'm going to make the switch and hope that this makes it easier to balance the rest of the game

Last edited:

#### Jesse - PVGames

##### Game and Graphics Developer
I think that you will find that it will be very easy to make a good balance progression with this. Glad it could be of help!

#### Wavelength

##### MSD Strong
@Jesse - PVGames

I was surprised by your "(a.atk * (a.atk / (a.atk + b.def)))" formula, which at first looked like a bad formula but as I thought through it, made a lot more sense. So I tried out some numbers:
• Attacker has 5 ATK, Target has 5 DEF: Attack deals 5 * 5 / 10 = 3 damage (rounded from 2.5).
• Attacker has 100 ATK, Target has 100 DEF: Attack deals 100 * 100 / 200 = 50 damage.
• This means that damage has scaled at the exact same rate as stats are scaling. If HP is scaling at the same rate as the other stats as well, battle length will remain consistent throughout the game, which is superb.
• Attacker has 5 ATK, Target has 100 DEF: Attack deals 5 * 5 / 105 = 0 damage (rounded from 0.238).
• Makes enough sense. If the target's DEF has outscaled the attacker's ATK this hard, the damage should be minimal. At higher values, such as 10 ATK vs. 150 DEF, the attack would deal at least 1 damage.
• Attacker has 100 ATK, Target has 5 DEF: Attack deals 100 * 100 / 105 = 95 damage (rounded from 95.238).
• This one is very strange to me. The attacker's ATK has massively outscaled the target's DEF, but the damage is less than twice what they're dealing to a target with twenty times the DEF as this target has. The value of extra DEF to an underleveled battler is almost nothing, whereas the value of extra ATK to an overleveled or underleveled battler remains consistent.
• Attacker has 110 ATK, Target has 100 DEF: Attack deals 110 * 110 / 210 = 58 damage (rounded from 57.619).
• Attacker has 100 ATK, Target has 110 DEF: Attack deals 100 * 100 / 210 = 48 damage (rounded from 47.619)
• These two together (combined with the fact that a similar effect would be seen with changing ATK or DEF from 5 to 6) seem to suggest that ATK is a more valuable stat to build than DEF at most levels. This could be offset, of course, by aspects such as frequent healing during battle, or by equipment and level-ups generally raising DEF more than they raise ATK.
Speaking specifically to the last two notes about your formula - that it makes DEF nigh-useless for weak battlers and that it tends to favor ATK bonuses over DEF bonuses - have you considered these issues in your formula? Perhaps your game keeps levels between battlers very tightly matched, and also gives the player very little control over how to build their characters? If that's the case, the ability to scale damage with stats (as mentioned in the first note) could make this formula ideal for you own game. If not, and you don't have really tight control over battler levels and stats at any given point in the game, then I'd be very intrigued to hear about how you're addressing these issues!

Also, I assume that this is your formula for basic attacks. How do you increase it for skills? Do you generally multiply the whole result by a coefficient based on the skill's intended power, such as "(a.atk * (a.atk / (a.atk + b.def))) * 1.60"?

#### Jesse - PVGames

##### Game and Graphics Developer
No formula is perfect, I suppose it depends on what you are trying to achieve. I just found this one to work very well for my purposes.

I do variations of the formula for different skills (and even different basic attacks depending). A few of the skills in my game, for instance, do more damage to enemies if the enemy has a certain state afflicted to them. In which case I do something like this:

(a.atk * (a.atk / (a.atk + b.def))) * 2, and (a.atk * (a.atk / (a.atk + b.def))) if they don't have the state (so double the damage).

I also use variables to allow for higher-damage attacks, so something like:
v[1] * (a.atk * (a.atk / (a.atk + b.def)))

this will multiply the damage by variable 1 (in my game, you can purchase skill upgrades which increases these variables). Though, I didn't want it to be double damage each time you upgraded, so I went with the following:

((v[1] + 1) / 2) * (a.atk * (a.atk / (a.atk + b.def)))

So at level 2 of the skill it does 50% more damage, level 3 does 100% more damage, etc. 50% increments instead of 100% increments. This, of course, can be refined further if you wanted to.

Just for the sake of it, I will share a few more damage formulas I used in my game because I absolutely love damage formulas. Some of these I created after reading some of the great guides to damage formulas that can be found around these forums and online, and some were just a lot of trial and error. Feel free to use these if you want:

Formula:
dmg = ((v[1] + 1) / 2) * (a.atk * (a.atk / (a.atk + b.def))) ; if (b.isStateAffected(37)) b.addState(22); 100 ; dmg
What it does: It does the above damage formula, but if the enemy is inflicted with state 37, there is a 100% chance state 22 will be added.

Formula:
dmg = ((v[1] + 1) / 2) * (a.atk * (a.atk / (a.atk + b.def))); a.addState(33); dmg;
What it does: It does the above damage formula, but whenever the skill is used, the attacker gains state 33.

Formula:
(b.mhp * 0.1) * v[1]
What it does: Does damage equal to 10% (0.1) of the target's max HP times the variable. If the variable was set to 3, it would do 30% damage.

Formula:
((v[1] + 1) / 2) * ((a.atk + (a.def / 10) + (a.mhp / 20)) * (a.atk / (a.atk + b.def)))
What it does: This is a bit more of a complicated version of the above damage formula as it adds 10% of the attacker's Defense and 5% of the attacker's MP to the attack power.

Formula:
a.gainMp(Math.floor(a.mmp * 0.03)); dmg = ((v[1] + 1) / 2) * (a.atk * (a.atk / (a.atk + b.def))); a.addState(16); dmg;
What it does: The attacker recovers 3% of their max MP, and then the damage is the same damage formula as above, but the attacker also gains state 16.

Formula:
if (b.isStateAffected(36)) v[1] * ((a.atk + (a.luk / 5)) * (a.atk / (a.atk + b.def))); else v[1] * (a.atk * (a.atk / (a.atk + b.def)));
What it does: If the target is afflicted with state 36, the first damage formula is used (which increases the attack power by 20% of the attacker's Luck stat), and if the target is not afflicted with that state, the regular damage formula is used as above.

Formula:
b.hp > ((b.mhp / 100) * 50) ? (v[1] * (a.atk * (a.atk / (a.atk + b.def)))) * 2.75: ((v[1] + 1) / 2) * (a.atk * (a.atk / (a.atk + b.def)))
What it does: If the HP of the target is above 50%, it will use the first damage formula, and if it is below 50% it will use the second formula.

Formula:
b.hp < ((b.mhp / 100) * 25) ? (v[1] * (a.atk * (a.atk / (a.atk + b.def)))) * 3.25: ((a.atk + 10) * ((v[1] + 1) / 2)) - b.def * 2
What it does: like the above formula, except it does more damage to enemies that are below 25% health.

Formula:
(v[1] * (a.atk * (a.atk / (a.atk + b.def)))) * (1 + (b.isStateAffected(17) ? 0.15 : 0) + (b.isStateAffected(18) ? 0.15 : 0) + (b.isStateAffected(19) ? 0.15 : 0) + (b.isStateAffected(20) ? 0.15 : 0) + (b.isStateAffected(21) ? 0.15 : 0) + (b.isStateAffected(22) ? 0.15 : 0) + (b.isStateAffected(23) ? 0.15 : 0) + (b.isStateAffected(24) ? 0.15 : 0) + (b.isStateAffected(25) ? 0.15 : 0) + (b.isStateAffected(26) ? 0.15: 0) + (b.isStateAffected(27) ? 0.15 : 0) + (b.isStateAffected(28) ? 0.15: 0) + (b.isStateAffected(29) ? 0.15: 0) + (b.isStateAffected(30) ? 0.15: 0) + (b.isStateAffected(31) ? 0.15 : 0) + (b.isStateAffected(36) ? 0.15: 0) + (b.isStateAffected(37) ? 0.15: 0) + (b.isStateAffected(38) ? 0.15: 0) + (b.isStateAffected(40) ? 0.15: 0) + (b.isStateAffected(39) ? 0.15: 0))
What it does: Don't let its length fool you. It takes the regular damage formula as above and multiplies it by 15% increments depending if the enemy is afflicted with specific states. So if the enemy has states 17, 18, 38, and 39, the damage is increased by 60% total. I used this on a skill that inflates its damage based on the debuffs on an enemy and then removes the debuffs. Sort of a strategic choice, either let the debuffs continue to do their thing on the enemy or explode them all and do big damage.

Formula:
((a.atk + (a.mhp/5)) * (a.atk / (a.atk + b.def)))
What it does: Increases attack power by 20% of the attacker's Max HP. I used this in conjunction with requiring HP as the skill cost, so basically the character "spends" health to deal a high-hitting attack.

Formula:
v[1] * ((a.atk + (a.mp)) * (a.atk / (a.atk + b.def)))
What it does: Increases the attack power of the skill by their current MP amount. What I used this for was a skill that consumed all MP and did damage in relation to how much MP was consumed.

#### woootbm

##### Super Sand Legend
This is an interesting question. I think, more intrinsically, your question is "what's the point?" At least I hope. For me, there is no point to just throwing numbers around. A lot of the answers above sound arbitrary, to me. I mean, you can make a fun game doing any of this, of course. At the end of the day, I find that the average player gives no thought to what the numbers on the screen are and how they got there. But for me, I want damage formulas to accomplish some strict guidelines. My requirements boil down to a couple simple points.

1. How many turns it takes to kill an enemy. Can I easily design enemies that feel as beefy or as weak as I want them to be.
2. Can the player understand the damage they are putting out. How and why.

The first point is the obvious one that any designer will feel as they make their game. The second one? It seems like a lot of designers don't care about. I'm not sure why. I don't want my game to feel like math class. Or for it to seem completely unpredictable. The best the player can usually glean in a lot of these is that "more attack means more damage", but not the specifics.

In my first game, (Oni Sellsword) since it was incredibly short and I was not making changes to the UI to explain things properly, I went with the most simplistic formula imaginable:

a.atk - b.def

1 attack is 1 damage, and 1 defense is 1 less damage. Since the game is so short it was easy to tune every encounter to get these tiny numbers to work right. It's very limiting, no doubt, so I don't really recommend it. As a post mortem I did have mixed feelings about the end result. Even though it accomplished all the stuff I wanted it to.

My next game is longer, and I will be adding something in the UI to explain the stats. So I can afford to be complex. Even so, I wanted something simple where number changes would be highly palpable. Sorry for my overuse of parenthesis in this one, I'm paranoid.

a.atk * (1 - (0.01 * (b.def * 5)))

Up front, 1 atk still equals 1 damage. But each point of defense is a whole 5% mitigation. That means I have to be very very careful with how much defense things can acquire (you don't get any when leveling up, I also use a plugin to cap the stat at 18). This is pretty much the same thing as @Aesica 's, only hers is 1 def = 1% mitigation it looks like (so more room to add on). From there, I just have to explain skills in terms of ATK. I can say something does "double ATK damage" or "ATK +20%" in a skill's description, and the player can see the results. +100 ATK? That's 100 more damage. Easy.

#### kairi_key

##### Veteran
Joining in on a passenger cabin, lol.

So... is plotting your formula to a graph worth it?

#### SOC

What would be a good formula for a skill that does around 80 damage at level 1 to a 50 HP enemy but scales to be still be useful at level 99 doing around 6000-7000 damage to a 11000 HP enemy, then? I've tried many of these formulas listed in this thread, but I'm still struggling with this concept. Ideally I'd like to start with pretty simple stats like 25-30 ATK but be scalable to like 250 ATK (or more if needed) by late game. I guess I don't mind working with smaller DEF numbers if necessary. I don't really like it when 1 ATK = 1 damage and 1 DEF = 1 less damage, I think it feels better to see your ATK go up in smaller numbers but your damage increase much more, up to 9999.

Last edited:

#### woootbm

##### Super Sand Legend
Ah. So you're a fan of big numbers then.

First off, you might be having an issue with RMMV's base stat limits. For example, I'm not sure- off the top of my head- if you can create an enemy with 5 digits worth of health. And to hit 7000, after taking defense into effect, might mean you are starting with 5 digits worth of damage. Which might be getting chopped down to 9999 and screwing up the formula somewhere (IE if you do 11000 damage and then minus 4000 from defense you might not get 7000 total because the first number was changed to 9999. Maybe. I'm not sure) . If so, you'll need a plugin to bypass this stuff (Yanfly has one). You might also be getting thrown off by the damage variance field. So keep that in mind (maybe turn it off while testing a formula to see more straightforward results).

But secondly, I don't understand how this is a problem. Just give your characters enough attack and your enemies the right amount of defense. It shouldn't matter what formula you use. It's just math. Unless you're saying you're using default stats and items or something?

#### TheoAllen

##### Self-proclaimed jack of all trades
I'm gonna put my attempt to make a formula in my project I'm working on since the last project I had was to use simple flat reduction defense because I didn't want to think something complex (I just wanted to finish a game).

In the new game I'm working on, here is my attempt.
Code:
``(a.atk * 4 * skill_modifier) * (1.0 - b.def*0.01) * bonus_modifier * element_resistance``
Note that this isn't something I write in the damage formula, but in all the entire thing in the code. i.e, I hardcoded stuff. In the database formula part, I'd just write a simple.
Code:
``a.atk * 4 * skill_modifier``

Anyway, yes. The damage reduction is a percentage reduction that if you have 100 defense, it means 100% damage cut for all the damage. Again, I just want to keep it simple. So instead of buffing how much defense, I'm gonna put to an enemy or actor, I'm just gonna buff their HP. As for how much defense I'm gonna put to an enemy, I pretty much have a sort of guide that it will be 0 to 100. Actor defense stat growth will be flat. They will have something like 10% damage cut as their initial defense, and it won't grow much further as they leveled up. If they want to stack damage cut is through passive skills or equipment.

But here is the twist. All battle participants have a chance to drop their defense to zero. This is where the armor break/defense down come into the place. All battle participants have armor HP (technical talk, it's MP repurposed as armor HP). Almost every action damage armors. Some do damage to armor more than another. When the armor HP drops to zero, it will inflict an armor break that drops the defense for a limited amount of turns. You should use this advantage to use a hard-hitting skill while their defense drops.

By doing this, if I want to prolong a battle, I'm just gonna add more HP to an enemy without thinking much about how much defense they have. Likewise, if I want the viable strategy is to keep breaking their armor, I'm just gonna put the defense stat at a high amount. So, the damage value remains consistent through the game if all enemies have zero defense. The late game enemies just have more HP. The only time when it isn't consistent if you hit the enemy with a wrong/right element attack.

And also regarding the formula itself, "bonus_modifier" is various. It could be something like a passive skill. Such as 10% more damage against burned enemies. More damage against stunned enemies. More damage based on the missing HP/How high the HP is. Or other bonuses that I'm still planning out.

Disclaimer: This is something that I'm still trying, and it was the result of the 3rd revision of my game mechanic. Frankly, it doesn't have any proof of concept yet.

Edit: it goes something like this (the entire system wasn't fully functional in the video, but the armor mechanic works at least)

Last edited:

#### Aesica

##### undefined
This is pretty much the same thing as @Aesica 's, only hers is 1 def = 1% mitigation it looks like (so more room to add on).
They're pretty different, actually. With mine, there's no hard stat limit since the damage is divided by the defense result while yours appears is 20 since it would make the defender invincible. (hence the cap of 18 I imagine) Here's how mine holds up vs 1000 raw damage:
• 0 defense is 1000 / 1 = 1000
• 50 defense is 1000 / 1.5 = 666 (hail satan!)
• 250 defense is 1000 / 3.5 = 285
• 500 defense is 1000 / 6 = 166(.6? hail satan again!)
So defense actually gets less valuable the higher it goes, meaning I'll unlikely ever have to worry about the internal cap of 500 (one of the addons I'm using lets me break past that anyway, but I won't need to)

Sorry for my overuse of parenthesis in this one, I'm paranoid.

a.atk * (1 - (0.01 * (b.def * 5)))
Yeah you don't need most of those. The order of operations has your back:

a.atk * (1 - 0.01 * b.def * 5) will get you the exact same result since 0.01 * b.def * 5 happens before 1 - n

### Latest Profile Posts

Jeez...
I finally decide, after several ppl asking me to, to create a gamethread about project M... And my internet craps out on me halfway through the process
making my first game is like trying to stuff all my experience with old games into one
so its slow and painful when i dont get it right... i bet the next game is gonna be finished earlier!
When you don't find any time to work...
First Ten Minutes of my Caretaker inspired game

Finally, I got a good Gmail message [from smg5urded]
"This game does look a bit plain, but, I'm sure this does not destroy the experience as a whole. Monsters fit your style of game-play, mapping looks crude but I'm sure you can make it better if you do a remake of Forgotten Eclipse"