Need help with damage formula and game balancing.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
910
Reaction score
364
First Language
English
Primarily Uses
N/A
Hello guys,

I'm running into a problem with damage formula while balancing my game. I have three characters with three different physical attack skills.

P1: a.atk * 2.2 - b.def * 1; costs 4 (or 5) MP, attack 5 times, character's attack power is 19.
P2: a.atk * 1.25 - b.def * 1; costs 8 (or 9) MP, attack 10 times, character's attack power is 37.
P3: a.atk * 2.1 - b.def * 1.5; costs 6 MP, attack 4 times, character's attack power is 35.

Enemy: DEF is 30, fought at level 1 or 2.
Enemy 2: DEF is 60, tested at level higher than 20.
As you can see, magic attack is not a factor here.

The characters' stats are set so that P2 has the highest attack power, followed by P3, then P1.

So for the first enemy, everything works out fine. P2 does more damage per hit than P1, less damage per hit than P3, but make up for that by attacking more times, so does higher total damage. P3 does more damage per hit, but hit less times, so does less total damage. P1 does the least damage per hit, does the least total damage. All corresponds well with the MP costs.

Things went to hell when the second enemy comes to play. P1 ends up doing the most damage per hit and the most total damage. P2 does the least damage per hit and total damage. P3 is slightly better than P2. I changed the characters' level to 40 to see how it would be. P3 does the least total damage, P1 does slightly more, and P2 does the most. They all gain 1 point when they level up. This was after I readjusted the damage formula. P2 used to have 1.11 for attack, and P3 had 2.05, I think. Also because I felt that P2 and P3 somehow became weaker as they fight enemies with higher defense stat, while P1 became more OP.

So, what's happening here? How can I fix these formulas to make the damage numbers balanced again?
Optimally, P2 should do twice the total damage of P1, while P3 does 1.5 more damage than P1. Easy way I can think of is to get rid of the multi-hits and just have one number for total damage, but that wouldn't be fun...

Appreciate any help!
074.gif
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
577
Reaction score
794
First Language
German
Primarily Uses
RMMV
I usually use this formula:

(2 * USER STATS - 1 * TARGET STATS) * MULTIPLIER

Here are some examples of how this may look like:

(2 * a.atk - 1 * b.def) * 1.2
(2 * a.mat - 1 * b.mdf) * 1.35
((1 * atk + 1 * mat) - (0.5 * b.def + 0.5 * b.mdf)) * 0.75

This way, all the numbers are always within similar ranges, only really amplified by the multiplier.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,093
Reaction score
5,768
First Language
English
Primarily Uses
RMVXA
The formulas are doing exactly what you are asking them to do - when DEF significantly outweighs ATK, only the first formula will give you a significant damage amount.

You could make things easier on yourself by not adding different multipliers to DEF - try to balance the skills around each other using only a multiplier to ATK and a number of hits. That reduces one layer of complexity and makes them easier to compare as you design them.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,259
Reaction score
7,672
First Language
Indonesian
Primarily Uses
RMVXA
Try to think at the basic level.
Your goal is to make second physical damage do twice damage.
The simplest solution would be.

- P1: (a.atk - b.def)
- P2: (a.atk - b.def) * 2

This is the most straightforward approach ever.
The base formula is
- <base formula> x <multiplier>

"But the second character has higher base stat".
In that case, you could just use one single formula and let the character stat do the talk. Pick one, are you going to rely on the damage formula or character stat? Nothing wrong with using both, but the result can go in an unexpected way especially when the player has an option to increase their stats through level up or changing equipment.

====================
"What about multiple hits?"
Here is my solution
- P1: (a.atk - b.def) / 5.0
- P2: ((a.atk - b.def) * 2) / 10.0
- P3: ((a.atk - b.def) * 1.5) / 4.0

The base formula is
- <total damage> / <total hits>

Imo, this is easier to digest.
 

CleanWater

Independent Developer
Veteran
Joined
Apr 8, 2017
Messages
709
Reaction score
862
First Language
PT-BR
Primarily Uses
RMMV
For damage formulas, it's usually good to keep things simple and straight forward.

For every hit/def you need to have an universal formula. Then, the attack of each skill is based on that. Basically the same suggestion @TheoAllen gave just above.

If your basic formula is a.atk/2 - b.def/4 and want a skill that does more damage, you can do:

(a.atk/2 - b.def/4) + x (bonus damage)
(a.atk/2 - b.def/4) * 2 (twice damage)

If the skill is to be penalized:

(a.atk/2 - b.def/4) - x (less damage)
(a.atk/2 - b.def/4) / 2 (half damage)

... And so goes on. :wink:
 

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
910
Reaction score
364
First Language
English
Primarily Uses
N/A
@Wavelength Yeah, I started doing that now. There might be a time when it's better to use different multiplier higher than 1 for enemy's defense. But now, I'll try sticking with using just 1.

- P1: (a.atk - b.def)
- P2: (a.atk - b.def) * 2

This is the most straightforward approach ever.
The base formula is
- <base formula> x <multiplier>

So it would be something like:
P2 = (37-18=19) - b.def ) * 2 = P1x2
Uh... Is this really how people use damage formula? XD So you balance the whole game around one character? I guess it works, yeah, but is this typical?

Pick one, are you going to rely on the damage formula or character stat? Nothing wrong with using both, but the result can go in an unexpected way especially when the player has an option to increase their stats through level up or changing equipment.

Players have the option to change weapons, so I can't just use the same formula. That will break the game for sure. But I did take your advice for the multi hits, sort of.

Anyway, as much as I tried to play around with the numbers, different multipliers and dividers, I just couldn't get the result to be as I wanted. The total damage numbers just wouldn't stay consistent.

Perhaps I was going about this the wrong way? Instead of strictly making a skill does twice the damage of another, maybe it's better and easier to have it do a certain higher amount of damage?

P1: 19 - 12 = 7, x5 = 35, x1.1 = 39
P2: 37 - 12 = 25, / 2, x 10 = 125
P3: 35 - 12 = 23, x 4 = 92

So skill 1 does the least damage, cost the least MP (4). Skill 2 does the most damage, cost the most MP (8). Skill 3 is in the middle of those two (6 MP). So each MP is worth like 20 damage points or so. Perhaps lower, or higher, depending on the attack and character.

At level 11, it becomes like this:
A 29 - 12 = 17, x5 = 85, x1.1 = 94
B 47 - 12 = 35, / 2, x 10 = 175
C 45 - 12 = 33, x 4 = 132

At level 51, skill A becomes more cost efficient, but... not like it matters anymore at that point.

A different enemy at level 50:

69 - 60 = 9, 45, x1.1 = 50
87 - 60 = 27, /2, x10 = 135
85 - 60 = 25, x4 = 100

Not too bad...? As long the players don't venture into areas with enemies higher than the levels they are supposed to be at, I think they will be fine. But that might be another issue.

Well, at least this seems like a good way to proceed for now. Maybe I'll run into another issue tomorrow... What do you guys think? =w=
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,884
Reaction score
2,054
First Language
English
Primarily Uses
RMMV
The thing with damage formulas is you can make them as simple as you want them to be. But you'd first want to have a baseline formula, which you can then re-use everywhere else and tweak depending on differences needed in a skill's damage.

For attack, I literally just use a.atk as a baseline (plus, optionally * additional multiplier, for situational cases).
For skills, I use a.atk * skill damage multiplier. Which would be a higher multiplier, the more MP a skill costs, in general cases.

The only thing that matters to players are the numbers they see on their screen, so if the most simple formula I can use to get the job done, it's good enough.
 

Latest Threads

Latest Posts

Latest Profile Posts

The OFFICIAL RPG Maker Discord Server is Here | RPG Maker News #116

And the time has come for me to enjoy a good cup of hot cocoa before I sleep... Strangely, that actually helps.
If I ever need to stay up late working on projects, I always get tired. Do you guys think I should try G-Fuel to keep me up and focused at night? And if so, what flavor is best?
I do tend to be quite a night owl.
"Same as it ever was. Same as it ever was. Same as it... EVER was."
Ugh. This update is taking so long that I'm starting to run out of topics for the weekly blogs that I was making to make up for the fact that it was taking so long to begin with!
"...I'll shut up and carry on
The scream becomes a yawn..."

Forum statistics

Threads
113,966
Messages
1,078,699
Members
148,071
Latest member
ClassicFrank
Top