## Topic: RPG battle system balancing (Read 2375 times)previous topic - next topic

0 Members and 2 Guests are viewing this topic.
• Fat Cerberus
• Global Moderator
• Sphere Developer
RPG battle system balancing
##### March 19, 2017, 12:44:26 pm
So I had an insight the other day while struggling to balance the damage output in Spectacles.  For a while I'd been trying to balance things by changing multipliers, but no matter what I did, making one battle fair negatively impacted battles at other points in the story.  Then I realized: In a modern JRPG battle engine, input variables are normally multiplied in some fashion, not added.  Thus, the most important thing for balance is the number of variables in the formula, not the specific factors used.

It turned out that I had a fundamental imbalance due to a mismatch in the number of variables between the Max HP and damage formulas.  Max HP is a linear progression:
Code: (javascript) [Select]
`// note: statAverage is weighted, heavily favoring VIT25 * tier * statAverage`

All storyline bosses save for the final boss are defined as Tier 3, so that over the course of the game boss HP rises linearly, directly proportional to the stat average.  Damage on the other hand is calculated as:
Code: (javascript) [Select]
`2.5 * pow * weapon * str / def`

str / def, being on the same scale, cancel either other out on average.  So for this purpose we can treat the damage formula as having two variables: move power and weapon power.  Therefore, over the course of the game the damage increase is quadratic.  Depending on the factors used, that either means you do far too much damage to late-game enemies, or else not nearly enough to early ones.  In order to balance, HP also needs to be quadratic.  Without introducing a new variable in the HP formula, this can be accomplished by squaring the stat average.

Just thought I'd share this experience as it was kind of a big eureka moment for me after a long balancing struggle.  I think as amateur game developers we tend to take things like RPG battle formulas for granted, but there's actually a lot more nuance to it than it seems at first glance.
Sphere 5.5.2 - neoSphere engine - Cell compiler - SSj debugger

Re: RPG battle system balancing
##### Reply #1 – March 19, 2017, 01:34:29 pm
I personally like examining the forumlas for the weapons in Final Fantasy 12, like this formula for the greatsword:

A lot of the weapons in FF12 scale like this, with a straight (damage * random) - defense, then a multiplier from stats

• Fat Cerberus
• Global Moderator
• Sphere Developer
Re: RPG battle system balancing
##### Reply #2 – March 19, 2017, 01:56:41 pm
Wow, that's a lot simpler than the FFX formulas.  FFX actually uses a cubic factor on STR, but only a square factor on MAG for some reason.  And the Defense calculation in that game is damn near indecipherable.  I won't complain too much though, because the squaring and cubing means that small stat differences really matter.. Which does help cut down on the need for long grinding sessions.
Sphere 5.5.2 - neoSphere engine - Cell compiler - SSj debugger