OK, but this might get a bit long winded and I might not explain it in the easiest to understand method? Maaaaybe?
I have a design philosophy for battles where no normal enemy (if being fought at proper level and proper gear roughly) should take more than 3-4 Hits to kill (total), 3 for DPS classes, 4 for tank/healer classes. Bosses are expected to last around 5-6 hits per character in the party at the time of the battle... a bit more if you want to hit them with some status effects or need to heal.
I use a damage formula that some might consider to be a bit of overkill due to its nature, but my game like big numbers in the end, so I needed a formula that could scale over the course of a LOT of attribute gains, but would not quickly become so powerful you could one-shot everything or become some kind of infinite damage sponge because of enemy damage dropping off too fast. This fine balance I finally found took several, SEVERAL hours of trial and error, and I will explain what helped me the most in this endeavor.
First, lets look at the formula for a basic Melee attack:
Code:
Game_Battler.prototype.attack = function(a, b) {
if (a.isActor()) {
damage = (((a.atk+Math.pow((a.atk/10), 2)))*(100/(100.00+b.def))+((a.atk-b.def)/2))
fi = $gameVariables.value( 8)
wi = $gameVariables.value( 9)
wa = $gameVariables.value(10)
ea = $gameVariables.value(11)
damage *= ((fi+wi+wa+ea)*0.0025)+1.00
if (a.isStateAffected(40)) { damage *= 1.25 }
if (a.isStateAffected(47)) { damage *= 0.75 }
if (b.isStateAffected(46)) { damage *= 0.75 }
if (b.isStateAffected(54)) { damage *= 1.25 }
if (damage <= 0) { damage = 1 }
damage = parseInt(damage*a.pdr)
console.log(a._name+": Melee ("+(parseInt(damage*0.8))+"-"+(parseInt(damage*1.2)+")"))
return damage
}
else {
a._mp += a.mmp/10
damage = (((a.atk+Math.pow((a.atk/10), 2)))*(100/(100.00+b.def))+((a.atk-b.def)/2))*1.50
damage *= (b.level*0.05)+1.00
if (a.isStateAffected(40)) { damage *= 1.25 }
if (a.isStateAffected(47)) { damage *= 0.75 }
if (b.isStateAffected(46)) { damage *= 0.75 }
if (b.isStateAffected(54)) { damage *= 1.25 }
if (damage <= 0) { damage = 1 }
damage = parseInt(damage*a.pdr)
console.log(a.originalName()+": Melee ("+(parseInt(damage*0.8))+"-"+(parseInt(damage*1.2)+")"))
return damage
}
}
Second thing you should notice: this formula checks to see if it is a player or enemy that is calling the skill. This allows me to use the same attack, but have different damage values and other effects in the same attack, but allowed to be used by both player and enemies to reduce clutter in the database. (notice the first line of the enemy attack gives them back 10% MaxMP when they use a physical attack, sort of a natural regen, if you would.)
Now, lets go into the actual formula.
Code:
damage = (((a.atk+Math.pow((a.atk/10), 2)))*(100/(100.00+b.def))+((a.atk-b.def)/2))
Usually in my testing if you end up getting a game over, it is because you have ventured into an area you aren't quite ready for... as in you cannot kill the enemies before they manage to overpower any healing/items you may have, not like what you would find in FF2 if you accidently walked into a next difficulty zone and suddenly you are doing 0-10% damage and they are dealing +90-100% damage or more. I want the player to actually have at least SOME chance of beating battles in locations they should not be in yet and not just game over punished for wanting to explore.
Code:
fi = $gameVariables.value( 8)
wi = $gameVariables.value( 9)
wa = $gameVariables.value(10)
ea = $gameVariables.value(11)
damage *= ((fi+wi+wa+ea)*0.0025)+1.00
There are 100 levels for each element, so if you do the math that would eventually add up for +100% damage on physical attack.
Code:
if (a.isStateAffected(40)) { damage *= 1.25 }
if (a.isStateAffected(47)) { damage *= 0.75 }
if (b.isStateAffected(46)) { damage *= 0.75 }
if (b.isStateAffected(54)) { damage *= 1.25 }
Code:
if (damage <= 0) { damage = 1 }
damage = parseInt(damage*a.pdr)
console.log(a._name+": Melee ("+(parseInt(damage*0.8))+"-"+(parseInt(damage*1.2)+")"))
return damage
Line 1 of this part makes it so if the damage would be 0 or less, always deal 1 damage. I HATE HATE HATE games where you deal 0 damage. I don't care how buffed and chisseled a target is, if you poke them with a sword, they are at least going to feel it SOME.
Line 2 is where I use the repurposed .pdr I mentioned above. .pdr is now a possible weapon enchant that can randomly roll on weapons, making it so they can just deal extra or less damage(there are negative effect enchants that can roll) without no outside influence from buffs or skills.
Line 3 is where the majority of my balancing comes in. This is the beard and butter of making sure I keep all my damage balanced and at proper levels throughout the game. It sends data to the console for every single damage instance in battle, telling who the attacker is (player name or enemy name+letterID), What the attack was they used (in this case "Melee") and then it will give a damage range of what that attacker's Melee will give +/-20% (variation). This allows me to see the min and max the attack can do, period. Critical attacks are not part of what is when here, but since Critical is always Damage*=3, you can do that math yourself very easy.
Line 4 is pretty much self explained, it returns the final damage value so the attack can actually do some damage... otherwise it would return Null (aka 0) and never do anything.
Last thing to mention:
Enemy attacks are automatically set to be 50% stronger using the base formula, hence the "*1.50" at the end of the formula. They also gain 5% damage per player level for the character they are targeting, this helps them remain a mild threat a bit longer, but tapers off by the time you account for player DEF + MaxHP growth.
OK, now that all that is typed up and done, for the part you were wanting, the best method of balancing I found.
Using Line 3 from the final section in the spoiler, being able to see the damage range of every attack perfectly in the console, that will make it so you know instantly if "Hey, this enemy has too much attack/intellect." if they are having a damage range way too high.
I like to make normal enemies able to deal ~10% of a single players MaxHP per hit when you are first in the area for the initial visit.
So, if you know Actor 1 has 600 HP, that means the middle damage should be abut 60 damage, so the number you should be looking out for in the console is 48-72 damage... if the values are higher than that, lower the attackers attack/intellect as needed to get it to more or less that area.
The same goes for balancing enemy stats as well, if you know about what your character is doing at this point in the game (lets say 300 physical or would be shown as 240-360 in the console) and you know you want it to always take 3-4 hits per enemy, that would mean you would want the enemy to have a minimum HP value of about 720, and a max of 1440.
And for both players and enemies, never forget that Defense comes into account as well, if you don't want your players dealing so much damage when going into a new area, just jack up the enemy defense/spirit and it will help keep the damage under control much longer.
And with that, I feel like I have explained it enough, and gave a good example with my damage formula to show how the games balancing and whatnot can last good from early to mid to late game. Keep in mind I typed all this while dealing with a severe migraine that woke me up at 3:30am -.- so there may or may not be typos or confusing sections due to how my head feels.
Oh and yeah, ALL ~108 of my games attacks and spells formula's are this complicated... if not more for some of the special attacks. It was a crazy adventure to get there, but I was so happy once I finished it all!