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:

`// note: statAverage is weighted, heavily favoring VIT`

25 * 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:

`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.