Damage formulas

Hey everyone,

I'm brand new here and I'm on VXace.

I wanted to share my damage formula and get some thoughts on it. I would also like to know what formula you use. My game is a standard turn-based, side-view battle system.

I changed two of the stats:
mdf is Power
Luck is Resistance.

The basics of the formula is:
(A.atk/b.def)*a.mdf

The actual more complicated formula is different, which I will get to, but I wanted it to accomplish a few things:

1) Agility to mean something.
2) Damage to not scale wildly out of control.
3) Damage to never fall to the "null" zone.
4) Multiple ways to build a character.

Here is the actual formula for basic attacks:

(1.0+((a.atk+[a.agi/2.0])/{b.def*1.0}))*a.mdf

-The ".0" allows the formula to use demicals.
-The "+1" means a character will at minimum, deal their base Power(mdf) in damage.

I like is for the most part but here is what I have found:
-Adding to a character's Power is a simple way to increase their damage output. An item that gives +10 POW means, on average, +20 damage.
-Adding to Attack is more complicated. And item that gives +10 Atk, gives +?? in Damage as it's completely dependent on the enemy he is targeting.

Anyways, hopeful this makes sense and isn't too long of a read.

Thoughts will be helpful!
Just a heads up.
'Game Mechanics Design' is not for getting feedback on an individual, specific project, it is meant to be more general than that. Therefore, although people may comment on the example you give, they are not obliged to, as long as they are discussing ways of constructing damage formulas.

I personally don't think that damage formulas can be looked at in isolation. I would want to be thinking about what range of skills I was creating and what synergies there might be between the skills of different characters. This will have an impact on how I would construct any individual formula. I would, for example, be looking to see if this particular formula was only for e.g. dealing damage, or if there was a status effect in the mix too.

Turning to the example you gave, it seems to be just the formula for what would be the default attack with the equipped weapon. But without knowing the whole ecosystem which supports that, and how it relates to all the other skills, I have no real opinion on it.
Just a heads up.
'Game Mechanics Design' is not for getting feedback on an individual, specific project, it is meant to be more general than that. Therefore, although people may comment on the example you give, they are not obliged to, as long as they are discussing ways of constructing damage formulas

Turning to the example you gave, it seems to be just the formula for what would be the default attack with the equipped weapon. But without knowing the whole ecosystem which supports that, and how it relates to all the other skills, I have no real opinion on it.

Thanks for the heads up.
I'm more looking for thoughts on the foundation for building an ecosystem, to use your words; a blanket formula that can be used, with certain skills/weapons adding their own tweaks to it.
I generally base damage formulas around the average maximum HP of enemies and actors to create a damage scale. This makes it easy to control and adjust the pacing of combat. So if basic attacks average 15% HP damage, and ultimate attacks average 80% HP, that becomes the damage scale that I base my formulas around.

If average HP is 450. Basic attacks average 67.5 damage, ultimate attacks average 360 damage.
Let's assume the average ATK and DEF stat is 18.

Basic Attack: ATK * 7.5 - DEF * 3.75
Ultimate Attack: ATK * 40 - DEF * 20

With that in mind, I write a formula to fit the project I'm working on. The above is similar to how its done by default.

base = a.level * 0.5 + 4
power = (a number between 1 and 100)
power 15 = Basic Attack
power 80 = Ultimate Attack

BASE * POWER * ATK / DEF
If I'm reading your attack formula correct, it would read in natural language as "The Quotient of Attack plus Half Agility divided by target's Defense, then add 1 and multiply by Power". I don't know what your skills will look like, but I'm going to assume the formulas are similar since you didn't mention them.

While it's impossible to say for certain without seeing the rest of your game, my instinct is that you're most likely hurting your design by overcomplicating things. It's always harder for the player to appreciate and understand how a given stat will affect damage numbers when more than one stat contributes to the same cause - in this case, you have three (attack, agility, and power), so at most players will probably think "attack will increase the damage I deal, and so will power, and so will agility plus it will make my character act quicker".

One of your (smart and well-intentioned) design goals was to allow multiple builds, but having three stats perform similar functions will most likely mean that there is a "right" and a "wrong" way to build characters (which stat will increase the formula the most at this time?), unless you are doing some really creative stuff with passive equip effects - and in addition, it will be hard for the player to even figure out which way is right without a ton of trial and error. A better way to allow for multiple builds is usually to design stats which do very different things from each other - meaning that you could choose to build a character for (as examples) raw damage, tankiness, crit opportunities, or status application.

Additionally, since you have three stats that increase damage, and just one stat that decreases damage (and does so almost proportionately - i.e. a character with 60 DEF will take just over half of the damage that a character with 30 DEF will take), this also makes a point of DEF much more valuable than a point of any of the other three. (Power is also slightly more valuable than ATK in this formula since it isn't subject to the divisor.) Even if you work around that so that, for example, two equips of the same level might offer 12 ATK vs. 5 DEF, it can be hard to communicate to the player that the 5 DEF is actually just as good or better than the 12 ATK.

So, with all that being said, my recommendation would be to keep the damage formulas as simple as possible - using as few stats as you can without losing really big strategic choices that you can offer your player. A good damage formula for a basic attack, which satisfies your stated goals #2, #3, and #4, would be: (a.atk * X) / (b.def + Y), where X and Y are constants of your choice designed to inflate the damage numbers to whatever level you feel is satisfying (I tend to like 10 and 5, respectively). From there, you can look at the different aspects of your combat system that are unique and fun to play with, and design some of your other stats around the ability to delve deeper into those mechanics. For example, my game has a higher emphasis on Critical Hits to score bonus effects on skills, so I devoted one stat entirely to influencing your Crit rate, and it also allows characters to restore TP each turn, so I had AGI (in addition to influencing turn order) determine how much TP the character restores each turn. That kind of thing will help you achieve your goal #1 of letting stats like AGI and LUK mean something.
Ah, I love damage formulas.
I tend to use k * a.atk / b.def because (a) it's simple, and I learned to create as few stats as possible when I was designing tabletop games and (b) because you can just set k to whatever number you want the default damage to be. If attack and defense are equal, it will do k damage. You can make k some factor of level (which is basically what pokemon does) if you want to increase average damage with level, to account for increasing max hp, or you can find some more creative solution. You could also just tweak enemy atk/def values to adjust it by level manually to account for the HP increase.

For example, I just started a game where HP starts at 1,000 for all players and enemies, and at level 99 it hits 2,000. Since you can probably beat the game well before level 99, the HP values in the game barely change, and I can just set k to 250 and leave it. I adjust game balance for each area as normal, by adjusting enemy stats. If I had HP increasing much more, I'd have to get more creative about what I wanted the average damage to be and replace k with some forumla that gets me that number at each point in the game.

Overall I love multiplicative relationships vs. additive ones for one of the reasons mentioned: it's a lot easier to avoid zero damage. It's also nice since it tends to result in double attack = double damage, double defense = half damage, which is very simple & easy to relate to.
I've been working with this for my base attack formula: [a.atk*0.5-b.def*0.25], which seems to work out really well for me. At first, I was thinking of just going simple, like [a.atk-b.def], but then you'd get instances with attacks doing no damage whatsoever if an enemy had half decent defences up, lol. With the current formula, base attacks usually do at least 1-2 damage as a minimum, which is fine for what I'm aiming for.

I don't like having base attack doing a bunch of damage to avoid people going simply attack-to-win, but with some buffs up, it's easily penetrated and attacks will start to do quite some damage.
I ended up writing a custom method for the formula box that allows for me to have a Base Power, Attack Stat, Defense Stat, Multiplier, and State-on-Critical so I could have some broader options when designing skills. Anyway, over the course of many revisions to my project I've tried both [a.atk * a.atk / b.def] and [a.atk - b.def] and I'm still torn on which I prefer. They both serve very well as damage formulas but they work better for different number ranges in my experience.

[a.atk * a.atk / b.def] seems to work really well with higher numbered damage/HP systems (100+). While [a.atk - b.def] seems to shine best in lower numbered damage/HP systems. As others have said before me your formula is ultimately just the way your game gets its numbers. Most of your game play quality is going to come from how you design your skills and enemy troops. So I'd say try a few formulas, pick one that gives you numbers you like and "roll with it".

Side Note: For anyone who has trouble using [a.atk - b.def] formulas because of potential 0 damage you can fix this easily by using the following in the formula box:

[[X, Y].max, Z].min

X:
Put your desired Formula here.
Y: Put your desired Minimum Damage here.
Z: Put your desired Maximum Damage here.

** Note this only works for VXACE, not sure of the proper Java Syntax for MV **

Using this with your formula will make it so your damage cannot fall below Minimum Damage and cannot exceed Maximum Damage. I've found it extremely handy for balancing as well as reducing the amount of "b.def*0.5" stuff you usually have to do with defense in [a.atk - b.def] formulas.
It's good to see you're incorporating other stats in your skills. But, you may confuse the player. So I suggest you do what I do, and just put your skills formulas inside each skill description...

Two Random Enemies
Magic x 1.5 + Agility x 2 - Enemy Spirit and Defense

Doing it like this solves the communication problem for non-traditional formulas.

Good luck on your game!

Original thread: https://forums.rpgmakerweb.com/threads/damage-formulas.92599/