# A Different Approach to Damage Formulas...

#### NinjaKittyProductions

##### Professional Murder Hobos
Hey gamers,
We all know too well the basic damage formula of (a.atk *4 - b.def *2). I know there are a lot of different posts with others talking about the different types of damage formulas they use in their games, some simple, some super complex. However, rarely have we seen a damage formula where it takes the enemy's HP into account as per the formula. What I mean is this:

(b.maxhp * 0.1) - b.def So the attack will do damage equal to 10% of the enemy's MaxHP minus their def bonus.
This can then be lent to more powerful abilities. Maybe something along the lines of (b.maxhp * 0.35) - b.def.

Now we know that this completely ignores the attacker's stats. We cannot find a way to work it in.

We bring this up because on many, many occasions we have seen where other's advice is "mobs should die in 2-3 rounds while boss fights shouldn't last more than 10-12 rounds."

So what do you all think about using a formula like the one above, that is one that uses the enemy's HP as sort of a basis for the formula?

#### xDRAGOONx

##### Veteran
I'm curious about completely ditching the attack stat, feels like it would make gaining new weapons pointless. I also feel like finding new weapons is such a big part of RPGs, I'm wondering what you might have implemented to replace it.

#### NinjaKittyProductions

##### Professional Murder Hobos
I'm curious about completely ditching the attack stat, it feels like it would make gaining new weapons pointless. I also feel like finding new weapons is such a big part of RPGs, I'm wondering what you might have implemented to replace it.
The above formulas are just a few things we have been bouncing around. We are just trying to figure out with this type of damage formula mechanic, how would you all deal with it?

As for what to implement to replace weapons, we have no idea lol. Maybe by making sure all your attacks have an element, then you could add equipment that increases the amount of elemental damage you deal. Other than that, we also realize that by doing this with said formulas, you open yourself to being affected as well. So HP doesn't really play as big a role either. With said formulas Defense plays a major role since it mitigates damage received.

#### Tai_MT

##### Veteran
Largely, it should be "actions" and not "rounds".

Round - All party members execute a single action.
Action - A single party member does something (attack, defend, magic, item).

The sweet spot is generally 2-4 Actions to defeat an enemy you are meeting for the first time and 1 action to defeat an enemy you are already familiar with defeating.
Meanwhile, a "boss" is generally meant to take around 40 actions (10 rounds or a bit more).

This is to prevent "player fatigue".

As for implementation of "percentage based damage"... Not really sure that works out well. Some of the Final Fantasy games have let the player do it, and it has generally lead to "this is a worthless attack". It's useful for the enemy to hit the player with it, but not all that useful for the player to hit the enemy with it.

After all, if I can mash "Attack" and do more than 35% of the enemy's HP on a turn, where's the sense in using the percentage based skill? Likewise, what is the sense of spending a skill to do something that a "state" like "Poison" could do?

There is very little reason to do a percentage amount of damage to an enemy when other actions can inflict more damage.

However, if you have no attacks or skills that rely on a traditional damage formula and are instead using only percentage based attacks... Then all a player will do is spam the highest damage percentage possible to make combat faster. Or, they'll simply get annoyed with your combat.

Let's put it in terms of XP gain.

If Bunnies give me 5 XP and Wolves give me 25 XP, there is little point in fighting Bunnies when it will take the same amount of hits to kill a Bunny as it would a Wolf. The Wolves give a better reward for the time spent. It's not even a contest. All a player need to do is run from any combat where the XP and Currency gain is suboptimal, because no matter what they fight, it's going to be the same 35% damage.

As for using max HP and such... Yeah, I do that. But, the reason I do it is for very limited and very specific purposes. I have a skill that takes into account how much MP the enemy has and bases damage dealt according to that. The skill does more damage against mages than it does warriors. Which, is the purpose. Likewise, I have another skill that tracks the HP of one of the player's characters and deals damage based upon how low that is (you'll see this is fairly common in a ton of RPG's, especially JRPGs). If you can get the player down to 0 HP and use the skill, you deal a lot of damage. This skill exists as part of a "combo" of skills and is meant to be used in very specific situations to damage spike enemies or bosses.

The reason a lot of players don't typically use a lot of percentage based attacks or "max hp" and "max mp" is because they're so highly situational and those situations rarely ever occur.

Chrono Trigger has a similar skill where the character "Frog" drops an attack that hits all enemies, and it does more damage with the less HP the character has. However, this is counter-intuitive to the game design and is also quite rare. If you want to maximize damage, you need to create a situation in which the next attack may actually knock out the character, and attacks hit you randomly. Likewise, by the time you have enough HP missing to make it useful, you will rarely ever get to a point where you have a lot of missing HP because you're overpowered.

This is how a lot of RPG's work with such skills.

Then, you've got games like Final Fantasy 6 in which you can learn "Demi" which drains half the HP of enemies that aren't outright immune to it... But, it's honestly better to never cast it since you can chain "Ultima", which is the most powerful skill in the game... up to four attacks for the cost of a single cast (X-Magic for doublecasting… and then have someone Mimic this, which means they cast it twice for free).

Generally speaking, there's little reason to have "percentage based attacks" unless they are filling a very particular niche and are uniquely powerful in a variety of situations rather than one or two.

Finally, if you're still checking against "defense", then your formulas are going to be weird and damage is going to be wildly inconsistent.

You may have an attack that deals 35% damage, but their Defense negates it entirely. How do you get around that without buffing the attack stat and using it? All a player would need to do is just buff their own Defense stat to become invincible. After all, if it checks against defense after looking at 35% of the HP, you need only have more Defense than you have HP.

I could simply keep my level low while rushing the best equipment in the game to utterly BREAK any challenge, since attacks wouldn't ever hit me, since my defense is higher than my HP.

If I have 100 HP, and you would deal 35 damage with the attack, I need only have 35 defense to be utterly immune to the attack.

It's okay to chase "unique" features for a game, but you should always approach any new feature or design choice from the perspective of "how can I break the game with this?" and use extremes to see the upper and lower limits of something. If you don't know how a game can be broken with anything you're implementing, you probably shouldn't implement it.

Playtests are insanely valuable. This is why you have a "dev room" in your game or a second project that exists purely to test out new features and mechanics.

#### FleshToDust

I like raising my atk stat and seeing the damage go higher and higher so i'd probably not like this way of doing things. Also swords.

Maybe if you weren't dealing with medieval stuff and had mechanical things going on you could change it a bit.

#### xDRAGOONx

##### Veteran
@Tai_MT you've definitely made some great points.

@NinjaKittyProductions it seems like you'll have to spend a decent amount of time dealing with the various unknowns. Have you gone over Damage Formulas 101? It contains a great deal of information, although it doesn't go into much detail about how to utilize the information, it's still a great place to go for ideas.

After reading it, I decided to use Yanfly's Weapon Unleash plugin to replace the basic attack with a different attack skill based on the users equipped weapon type. I have only 11 weapon types, so I have 11 different attack replacement skills.

#### Redeye

##### Chronicles Creator
I've grown more accustomed to abolishing DEFENSE altogether and make the enemy's survivability based on their Max HP. It's much, much easier on the formula balancing phase. If you DO want a Defensive stat, instead of adding it to the formula, you could have it affect your PDR or MDR stats that reduce all physical / magic damage by a percentage. I would say that, without buffs, PDR and MDR should not exceed ~35% on a party member, unless you want to make them a hardcore tank. A good way to do that would to give the DEF stat diminishing returns for PDR the higher you go, same with MDF and MDR.

Edit: I little bit more on topic, like Tai said, Max HP-scaling attacks tend to only work if you're really going for a "Demi" or "Gravity" spell, but are pretty much overshadowed by skills with traditional damage formulas if they happen to simply deal more damage. So there's not much of a point.

Last edited:

#### xDRAGOONx

##### Veteran
@Redeye I agree for the most part, i have minimized my use of the defense stat so far. I was able to turn the enemy base defense stat into something more of an armor class, weighing against the users base attack stat to decide if the user is even capable of doing more than minimal damage. I still have yet to apply it widely but it already feels like an easier system for me to work with as I'm not trying to balance attack vs defense to calculate damage.

#### NinjaKittyProductions

##### Professional Murder Hobos
Thanks for all the replies. We aren't using this type of system in any of our games, it was just something we wanted to explore. Its why we posted in the Game Mechanics section.

Damage Formula 101 We have used this post over and over again. We absolutely love it ^_^

I agree with almost everything that has been stated in this post. We were just looking to explore the possibilities of percent based HP formulas and maybe some possible ways to implement them. We are loving the discussions so far ^_^.

#### TheoAllen

##### Self-proclaimed jack of all trades
It all just boils down to the stat interaction in your game. The attack is just a label given to an arbitrary number tied to your character and it does nothing. When we say about "attack stat", we refer to a number that modifies the damage done to the target. Of course, you can have an "attack" stat in 4 kinds of attack. Agility can be an "attack" stat if it directly modifies the outcome of the damage done.

The question is, how you want it to be complex? Labeling a number as "attack" stat is much easier to tell your player that basically if you want the damage to be greater, increase this particular stat, or telling them how powerful is this certain character

In Azur Lane, they have like 4 attack stats which are "Weapon damage", "Slot Efficiency", "Level Advantage", and "Weapon Coefficient". The greater those variables, the greater the damage is.

Now we know that this completely ignores the attacker's stats. We cannot find a way to work it in.
And that is why I explained my point of view above. Ignoring the "attack" stat is not really matter this way (it is just a label). It is just how you choose the stat to interact with your game. If you, however, choose this kind of interaction, you have to find a good game design to complement this stat interaction.

We bring this up because on many, many occasions we have seen where other's advice is "mobs should die in 2-3 rounds while boss fights shouldn't last more than 10-12 rounds.
I fail to understand why mobs die in a few turns and bosses last longer should matter or relevant at all in this case. Care to explain why is it so relevant?

#### Tai_MT

##### Veteran
I found that if you want to balance attack and defense, it's honestly easier to use smaller numbers and simple formulas. Generally speaking, the more complex your formulas and larger your numbers, the more variation you have to account for and the more chances there are to accidently break your combat.

For example, it is easier to balance 10 Defense and 12 Attack with an additive formula (I use a.atk - b.def) than it is to try to balance 100 Defense and 120 attack with the default a.atk *4 - b.def *2 formula.

Using the additive formula, the enemy is basically guaranteed to do 2 damage to the player (unless you have variance, which can push this up or down by a single point) on each hit. You can easily hit a target of a specific amount of rounds to have players be killed this way.

However, using the multiplicative formula and higher stats, you're looking at 280 damage. If you add variance in, say a 10% variance, you're looking at 252 to 308 damage. This range could mean the difference between the enemy dying in a single hit or taking two hits.

This, of course, does not even get into whether or not you've landed a "super effective" hit with an element either. With the additive formula, a "super effective" hit might push the damage to 4 or to 6 with variance (if you're using variance), while a "super effective" hit with multiplicative higher stats can slam the damage firmly in the 504 to 616 range (with the 10% variance).

In practice, using the smaller numbers with simpler formulas means you can "fine tune" the amount of damage done as well as exactly how much HP is necessary for an enemy to have to go down in a specific amount of actions (which also allows you to set up fairly complex attack chains for bosses if you desire). While, more complicated formulas and larger stats require enemies and bosses have more and more HP to compensate for the damage.

For example: If I want a boss to go down in 40 actions (10 rounds) with a simple formula, that boss is looking at about 80 to 100 HP total (without critical hits and without super effective hits. Using 4 party members, each doing 2 damage a hit, which is 8 damage a round). But, if I want a boss to go down in 40 actions (10 rounds) with the complex formula and high stats, the boss is looking at about 12,320 to 14,000 HP (again, without critical hits and super effective hits. With 4 party members, each doing 308 damage a hit, which is 1,232 damage a round). That's a massive difference in the amount of HP needed.

One of these methods requires exponential growth of enemy stats just to maintain balance while the other just requires additive growth. What happens when you've reached the upper limit of HP you can even give an enemy within the RPG Maker Engine? Then, you need to begin exponential growth of defense if you haven't already.

To get back on topic a little here:

By and large, players don't measure how well they're doing by how big the numbers are. They measure it by how many hits it takes to defeat the enemy they're facing. The measure of growth for a player is in how long it takes to defeat an enemy. If an enemy used to take 5 hits to defeat, but you've leveled up a little and it now takes 3 hits, then there's tangible progress and a power curve that the player gets to feel. After all, seeing the number 130,055,504,186,684,321 for damage doesn't mean anything to a player if they still have to land another 50 hits to kill the enemy. A player hitting an enemy for 10 damage can be as exciting as hitting for 10,000 damage if it's a wildly different number and hard to get to, and it shaves turns off of combat.

However, if your damage formulas always just take a percentage of HP, and there's never any improvement, then combat begins to feel like a slog, leveling up begins to feel worthless, equipment begins to feel like a waste of time, and the entire experience begins to suffer as a result of relegating so many systems to "uselessness".

Players should genuinely feel more powerful if you are granting them more power. However, if you are not granting them more power as they go along, then you have to change your entire combat system around to make it feel like it isn't a "slog". After all, if I can defeat the boss in the same amount of effort no matter what I have equipped or how high my levels are... what's the point of engaging with any combat that's not forced upon me (this is the argument I use against scaling XP and scaling enemies as well)?

##### Chemical Engineer, Game Developer, Using BlinkBoy'
It all boils down to how your game will be played.. Like if all skills wont use attack or other stats, then you will probably not need equipment that raises the stats that wont be used. The viability of such system would really depend on how well it blends with the game. Remember that the game is the collection of the linkages of the various systems, whether it will be good or bad will largely depend on how your systems synergize with each other.

So if your problem is thinking of a viable formula, its time to look at how your game is structured and how each formula you think of will play out.

As a player though, if my skills will more of depend on the enemy rather than me, it feels a bit boring. Like I wont feel becoming stronger. Maybe if your game isnt about levelling and getting stronger it might work, or maybe it wont. Experi nce wise, Im never a fan of such skills because they usually are either so OP coz you can use them on anything, or useless coz they only affect some enemies.

Last edited:

#### Cythera

##### Veteran
There are already so many good posts in this thread, talking about low/high numbers and simple/complex formulas and the player wanting to feel like they are getting stronger with their stats. I do agree with most of the points already mentioned, though I like the idea of using HP in a damage formula. I do it myself - though I use current HP, never max HP. Using max HP brings up a very similar problem to bosses and 'Poison' states - why attack when I can just stack poison and do massive amounts of damage each tick?
If you want to use HP in a damage formula, you could design skills that increase the higher an enemy's current HP. Not a bad lead skill against a tanky boss, but the closer the battle gets to the end, the less beneficial that skill is, thus it can't be used as a 'Poison'. So you're not just spamming that skill the whole fight as it won't be efficient.
Or, how about a character that passively deals X% more damage against enemies with low HP?

#### xDRAGOONx

##### Veteran
When I first started using rpg maker. I had no idea how dynamic damage formulas could be. I've learned a lot lately and know there's still much more to consider, but, I feel like using hp in a damage formula could result in a useful skill for the player, with careful consideration. Threads like this are such a great way to learn.

#### NinjaKittyProductions

##### Professional Murder Hobos
We appreciate everybody's replies ^_^. This community isn't afraid to share their ideas and we love it.

It seems that using HP or even MaxHP in a damage formula would fit a very niche type of skill, such as Demi from Final Fantasy. However, we could expand upon the basic formula using HP as well. Something along the lines of (b.mhp *0.10) + a.atk - b.def. This would almost guarantee at least 10% of the enemies HP has gone. However, we understand. Why try to force something into a place that it doesn't really belong to.

Besides the aforementioned ideas above, how exactly would you all use enemy HP or MaxHP in a damage formula? or would you not use it at all really? Not looking for specific formulas just ideas on how you would implement such an idea and why.

#### shockra

##### Slightly Crazy Programmer
These types of skills need to be used sparingly, but can be effective in the right situation. First of all, it's a good idea to make skills that use HP or MaxHP like this ineffective against bosses. They can make such battles too easy.

Personally, I think that these types of skills are more suited for bosses to use against the party. Attacks that always deal damage equal to half HP can force different strategies rather than using a constant heal to max HP. Another option is an attack with no variance with this formula:

b.hp - 1

This way, the target is always left with 1 HP after the attack, forcing the player to either heal or die. Again, make this unusable against bosses, or used only by enemies.

#### xDRAGOONx

##### Veteran
Maybe you could factor in the current number of battle members making the skill weaker when you have a full party and stronger when the user is alone.

What if you made a skill that did more damage to the enemy the lower the user's current HP but if they get knocked out and revive, they cant use it again until the next battle?

Maybe you have a system where enemies transform at certain HP %, then having skills that take off guaranteed values could be need stratagezing to skip certain ranges that make the enemy transform into stronger versions.

#### Soryuju

##### Combat Balance Enthusiast
Something along the lines of (b.mhp *0.10) + a.atk - b.def. This would almost guarantee at least 10% of the enemies HP has gone.
Something you should probably consider in a formula like this is that the relative value of the character’s ATK stat will change depending on whether the player is fighting a boss or a regular enemy.

Quick example (excluding DEF for now): say a character has 5 ATK, and we have a regular enemy with 10 MHP. The HP factor contributes only 1 damage in this case, so the total damage dealt is 6. Roughly 83% of the total damage dealt comes from ATK.

Now say we have the same character attack a boss with 100 HP. Now the HP factor contributes 10 damage, but ATK still only contributes 5 damage, a mere 33% of the total damage dealt. The HP factor causes the value of ATK to fluctuate wildly between regular enemies and bosses.

There are a number of ways you could attempt to correct this problem, but the more general takeaway here is that by having two highly-variable damage factors in your formula, you’re potentially creating an optimization puzzle for players which could have unintended consequences on your combat. If the player realizes they get a lot less value out of their ATK stat against bosses, they’re going to start strategizing around that knowledge.

The other things you have to factor in here are skill costs and opportunity costs. If players get a set value of free scaling damage with every attack, it might create incentives for them to favor inexpensive skills over expensive ones with higher power ratings. They may go as far as committing all of their resources to defense while just chipping away at bosses with their basic Attack command, knowing they can safely end the battle with just a little extra time invested. How valuable is that resource-guzzling specialized attacker when the weakest support character is capable of dealing significant damage to bosses for free?

If you’re concerned about bosses taking too much time to kill, my advice would be to stick with a more traditional approach and simply give bosses less HP. There’s no rule saying a boss needs to have 20x as much HP as regular enemies, especially if the boss has ways of posing some immediate threat to players. This method will save you the headache of trying to balance a damage formula to accommodate such high-variance input.

##### Chemical Engineer, Game Developer, Using BlinkBoy'
Besides the aforementioned ideas above, how exactly would you all use enemy HP or MaxHP in a damage formula? or would you not use it at all really? Not looking for specific formulas just ideas on how you would implement such an idea and why.
TBH, I prefer not using them because making them into a viable option without being too OP or too useless is so hard.. Like if for example you make it unusable on bosses so its not OP, players usually end up not using them at all since their other skills would usually deal more damage to normal enemies. Now if you weaken the other skills, players would then use these skills more, making the other skills useless..
It might be better used in a the form of a very rare, one-off item.

#### Tai_MT

##### Veteran
(b.mhp *0.10) + a.atk - b.def. This would almost guarantee at least 10% of the enemies HP has gone. However, we understand.
Let's plug some numbers in.

100 Max HP
10 Enemy Defense
1 Character Attack

(100*0.10) + 1 - 10 = 1 damage

100 Max HP
10 Enemy Defense
10 Character Attack

(100*0.1) + 10 - 10 = 10 damage

100 Max HP
50 Enemy Defense
80 Character Attack

(100*0.1) + 80 - 50 = 40 damage

2,000 Max HP
50 Enemy Defense
80 Character Attack

(2000*0.1) + 80 - 50 = 230 damage

So, what did we learn? We learned that so long as the Character Attack is higher than (or equal to) the Enemy's Defense score, you will indeed do at least 10% of damage.

What else did we learn? We learned that the Character Attack isn't all that important to dealing damage. In fact, it's nearly negligible. Without the Attack and Defense, we're doing 200 damage a hit. That means, in 10 hits, the boss is dead. The Character Attack, itself, is only contributing to killing the boss 1 turn faster (boss would be dead in 9 turns if we use the Attack and Defense).

So, to make "Attack" even worthwhile to the player, you would need to ensure that Defense values remain low and Attack Values are high.

Look at the amount of "drift" there is. Enemy HP is going to exponentially increase the amount of damage done, while Character Attack and Enemy Defense are going to contribute very little (even with a gap of 30 points, all you're getting is those extra 30 points of damage). What does the formula do with maxed out stats (I'm using RPG Maker MV for this purpose)?

999999 Max HP
999 Enemy Defense
999 Character Attack

(999999x0.1) + 999 - 999 = 99,999 damage.

What if the enemy has the minimum amount of defense?

100,997 damage (or 998 if the game rounds up).

Attack power is effectively meaningless in your game with this formula. Damage dealt is directly related to just how much HP the enemy has and not how good of a sword you have or how high of stats you've got. Even with max stats, you're contributing nothing. With Defense of the enemy at 1 and attack at 999, you're only contributing 998 extra damage. This is 0.009% of the total damage dealt. It's not even 1 tenth of 1 tenth. It is 1/100th of 1/10th of the damage dealt.

This is what I meant by using "extremes" to test your formulas. Test the absolute ceiling of stats against the absolute floor of stats.

Now, if you're looking for examples of how I'd use Max HP and such in combat...
Last Stand (player skill)
(a.mhp - a.hp) * 1.5

Yep, that's literally the only skill I have in my game that uses Maximum HP to deal damage. It's very simple as well. Maximum HP minus Current HP, multiplied by 1.5. It scales effectively over the course of the game (the more HP the player gets, the more damage can be done) and requires a risk investment of needing more missing HP to deal more damage.

I also have another skill to augment this one in which the character can remain alive at 0 HP so that you can maximize damage from this skill.

So, if my character has 100 HP and they lose it all, it's 100 * 1.5 = 150 damage.
If 150 HP and they lose it all it's 150 * 1.5 = 225 damage.

Since my game is "low stat" and getting to 150 Health will likely take a while (requiring at minimum 26 Quests completed), the damage is scaled properly to the point in the game where it would be required.

The problem you're going to run into with trying to use Max HP to deal damage is that at some point, it's going to out-strip your attack stat. With your current formula, it outstrips the attack stat very quickly, which makes your attack stat pretty much useless.

Honestly, if you just want to guarantee a boss dies in 10 hits... just use a state. That way, the player can pile their own Attacks on top of each "tick" in order to accomplish what you're doing here. It frees up your characters to deal all their most powerful skills, leaves your attack stat meaningful, and still ends the fight in 10 rounds or less.

I'd simply suggest that if you're wanting to do something with Max HP, you need to carefully consider why you want to do something with it and what purpose it would serve to have it in the game.

As with my skill, the purpose of it is to deal a massive damage spike to the enemy. High Risk, High Reward. It also requires my players manage the TP Resource in order to pull it off as well as Heal Up before the "I can't die" state wears off. It serves a very specific purpose and is a niche skill players can choose to maximize or ignore. At their most powerful, you're looking at needing 180 TP in order to land one of these hits. 100 TP to become immortal for 6 turns, and then another 80 TP in order to deal *3 damage to a single target (in which, you are given 6 turns to come up with this amount of TP).

To use my skill with any degree of reliability and purposefulness, the player will need to have all the right equipment, all the right party members, and the right strategy.

But, that's the purpose it's meant to fill. Adding strategy to the game. Adding a tactic.

I'm not really sure how you'd use a "deal 10% HP damage to the enemy" as anything other than perhaps a state. It simply ends the fight in 10 turns. That's what it does. Is that any different than using Poison? Is it any different than simply giving the player more attack power so that they're dealing 10% HP damage each strike?

I don't really see the point of such skills. They're either insanely overpowered or extremely underpowered. When I opted to deal with them, I went "overpowered" and spent a lot of time putting systems in place to balance that overpowered nature. My goal was to create "strategy" and "tactics".

It's also worth noting I only did it for a single skill. Because of the amount of work I had to put in just to balance that one skill (technically, it's 10 skills), I decided to never muck about with it again. It's too difficult to balance it in a "low stat" game, or even make it feel "fair". It too easily ruins boss encounters. On top of which, I already have 4 levels of Poison... one of which can kill a boss in 5 rounds.

### Latest Profile Posts

FAST-MAPPING VIDEO

Hey, guys! Do you want to hear a riddle? If so, go to this link!
Omg, 'Marsha' took over the RPGWeb twitter for a bit and its the most adorable thing ever! I like it

"Gennady" Gen na Dee reptiloid scientist
I wonder how well Procedural Map generation would work in RPG Maker MZ... Well, only one way to find out! Hehe!