As Mapsters we are presented with a unique challenge when balancing our maps. We need to create balanced games with very limited amounts of testing, unlike large stand alone games, us modders do not have countless numbers of alpha and beta testers standing in line to help us test our games, at best players on battle.net might play a game that still requires balance testing one time, and if they are not impressed, they will never play your game again... We need a way to start balancing our games without forcing beta testers to bear with us through trial and error.
I have worked quite a bit with the solution of using math to solve this balancing problem, using mathematical formulas. A while back I wrote a tutorial on a formula I came up with...
Since then I have been working on a more useful formula and I have come up with one that I would like to share with you that works a bit better than the old formula
Just as a disclaimer these formulas will not balance your map for you, Starcraft II is a very complex game and it is impossible to take in to account for EVERYTHING with a simple math formula, things like splash damage, and unit range, and player micro are hard to represent mathematically, but this formula WILL give you a good idea for a starting point that will eliminate a huge amount of player testing that you would need. Using these formulas makes it so you do not have to just "guess" with your map balance, they are an extremely valuable tool when you are creating a new map that need balancing.
Before I go any further I would like to take a second to review a few basic pieces of Starcraft game mechanics... because it is important that you know how to apply these formulas before you start using them... Most of the mechanics are pretty straight forward in Starcraft if you are familiar with the editor and the game itself, if you know how to change the damage and the attack speed of your units then you should be pretty good. But the thing that usually trips most people up is Armor…
it is a common misconception that in Starcraft, the amount of armor a unit has reduces the damage they take by a percentage, however this is untrue. Each point of armor reduces the incoming damage of each attack by 1… So for instance, Unit A attacks Unit B with an attack that does 10 damage, and unit B has 3 armor… Unit B will take 7 damage (10 – 3 = 7)… I actually do not like this mechanic, it makes it so that every attack is reduced by a different percent and it is really hard to balance, personally I make sure that none of the units in my game have any armor and I handle damage reduction in a different way… but that is just personal preference.
(Also on a side note, the minimum amount of damage a unit can do in Starcraft is by default .5 (half a point) of damage, if the target has armor that is greater than or equal to the attack damage, this is a rare occurrence though, in Starcraft II it really can only happen against fully upgraded Ultralisks, you can change the minimum amount of damage in the data editor)
Here is the formula
Let me define those variables for you
L_f = Life Final = The amount of life Unit 1 will have after killing all enemies
L_1 = Life of unit 1
D_1 = Damage per Second of Unit 1 (this can be calculated by the DamageAmount/Period of Weapon)
Note that you might need to be specific here, a unit like the marauder does more damage to armored units than light, and most every weapon period has a random + - variant defined in the weapon that shifts the attack speed… you can also factor in the armor of the defender here.
L_2 = Life of unit 2
D_2 = DPS of unit 2
n = Number of Enemy units (number of Unit 2)
What this formula does is calculate how much life a unit (unit 1) would have after fighting N number of unit 2
This formula is great because (unlike my first formula) it takes in to account that a unit, once dead no longer deals damage, in other words, as Unit 1 kills each unit 2, unit one will take less and less damage, (that’s why blink micro is so good!)
Also keep in mind that the rules of algebra still apply in Starcraft II, if you set L_f to 0 and solve for N you can find out how many “unit 2”s it takes to kill a “unit 1”.
Lets do an example
Ill use the same "Zealot vs Zerglings" example I did in my first tutorial, only this time we will achieve much more accurate results because of the new formula
Lets test a Zelot as unit 1 and 3 Zerglings as unit 2. Ill use the data that I calculated from my old tutorial, (quote shortened to save space…)
Zealots-
Hitpoints=150
Dps= (6.337x2) (multiply by 2 because Zealots have 2 attacks, one for each laser sword thingy) 12.674
so using the data above our variables will be defined as
L_1 = 150 (shields + max life)
D_1 = 12.674 (calculated with Zealot Damage/Attack speed (x2 because the zealot has 2 attacks)
L_2 = 35
D_2 = 6.592 (damage / attack speed) (It is also important to note that when I take my attack speed I also factor in the +.125 -.0625 random delay max/min values that most weapons contain)
n = 3
When we calculate it out our L_f comes out to around 41, I tested this and it is not completely accurate a zealot usually comes out to around 44-48 after killing 3 zerglings but this formula does not take in to account that Zealots have 1 armor, Zergling Regeneration and extra damage dealt as overkill when a unit dies, but for the most part the formula is pretty accurate
The disadvantage this formula has to my original is that my original formula gave a single number that you could use to compare any 2 units. But this formula takes in to account the diminishing amount of damage that the unit 2s will deal as they are eliminated.
A few Side notes:
I use this formulas like this more often than you would think, I keep a TI 84 on my desk with this formula plugged in to a program so I can make calculations quickly
Also realize that you can use this formula with a single unit too if you just want to compare 2 units to each other by using 1 in the place of N
Finally be sure to note if you get a negative number as a result in this formula it does not mean that there is a problem with the formula; this number gives you a representation of how much overkill damage your unit 1 WOULD take if his death was prevented and he was allowed to keep fighting until he eliminates all enemies. For example if we were to use the zealot/zergling example with 10 zerglings instead of 3 we would get a result of around L_f = -850, meaning that the zealot would have die before killing all the zerglings but if the zealot were allowed to live it would take 850 more damage before it would be able to kill all 10 zerglings.
I find that Math really can help us Custom game makers to quantify Starcraft, I encourage you to modify this formula as you need to in order to make it better fit your specific game, This formula is really only the tip of the iceberg when it comes to balance with formulas, You really can take it as far as you want too, in one of my games I used math to balance leveling Heros in a MOBA style game each with unique abilities and spells, almost anything can be made to fit in to math in the game of Starcraft.
I hope you find these formulas as useful as I do!
EDIT
I have done a little algebra and I have come up with an equation were instead of solving for a L_f value we solve for N, with L_1, L_2, D_1, and D_2. In other words, we come up with exactly how many of 'unit 2' it takes to kill a single 'unit 1'.
Lets do our Zealots vs Zerglings example one more time, we will solve for N, or in other words the number of Zerglings it takes to kill a zealot.
When we plug in everything we get N=3.59
So it takes approximately 3.59 zerglings to kill a zealot, does this number seem accurate? That sounds about right!
Man, that looks amazing. Being able to balance things without feedback is most needed by map makers. Too bad it can't take into account the diversity of abilities in this game and their possible synergy effects. I'm too lazy to go on using these formulas, unless you provide an "automated" way of doing it, like and Excel table maybe?
@SoulFilcher: Go
Actually SoulFilcher I am working on that sort of excel spread sheet right now, i should be posting a download link for it soon, also im making a link to a web page that will calculate it for you.
At 1st, wtf, but as I read the example...wow. Thanks alot, I have an RPG going and the creeps are a pain to get balanced to pretty much kill each other at the same time with no player or tower interferance, now, only 1-10 health remaining after the groups attack each other. Thanks a lot.
@Nebuli
Its not intended to balance your map for you, but more give you a reference point to begin with, like you said, starcraft is way to complected to be expressed with simple equations )=
@777iop: Go
Oh crap, thanks for pointing that out, that is supposed to be a D1, not a D2 in the numerator
Fixed it, Thank you
As Mapsters we are presented with a unique challenge when balancing our maps. We need to create balanced games with very limited amounts of testing, unlike large stand alone games, us modders do not have countless numbers of alpha and beta testers standing in line to help us test our games, at best players on battle.net might play a game that still requires balance testing one time, and if they are not impressed, they will never play your game again... We need a way to start balancing our games without forcing beta testers to bear with us through trial and error. I have worked quite a bit with the solution of using math to solve this balancing problem, using mathematical formulas. A while back I wrote a tutorial on a formula I came up with...
http://www.sc2mapster.com/forums/resources/tutorials/4614-data-trinity-map-balance-balancing-your-map-with-formulas/#p11
Since then I have been working on a more useful formula and I have come up with one that I would like to share with you that works a bit better than the old formula
Just as a disclaimer these formulas will not balance your map for you, Starcraft II is a very complex game and it is impossible to take in to account for EVERYTHING with a simple math formula, things like splash damage, and unit range, and player micro are hard to represent mathematically, but this formula WILL give you a good idea for a starting point that will eliminate a huge amount of player testing that you would need. Using these formulas makes it so you do not have to just "guess" with your map balance, they are an extremely valuable tool when you are creating a new map that need balancing.
Before I go any further I would like to take a second to review a few basic pieces of Starcraft game mechanics... because it is important that you know how to apply these formulas before you start using them... Most of the mechanics are pretty straight forward in Starcraft if you are familiar with the editor and the game itself, if you know how to change the damage and the attack speed of your units then you should be pretty good. But the thing that usually trips most people up is Armor… it is a common misconception that in Starcraft, the amount of armor a unit has reduces the damage they take by a percentage, however this is untrue. Each point of armor reduces the incoming damage of each attack by 1… So for instance, Unit A attacks Unit B with an attack that does 10 damage, and unit B has 3 armor… Unit B will take 7 damage (10 – 3 = 7)… I actually do not like this mechanic, it makes it so that every attack is reduced by a different percent and it is really hard to balance, personally I make sure that none of the units in my game have any armor and I handle damage reduction in a different way… but that is just personal preference. (Also on a side note, the minimum amount of damage a unit can do in Starcraft is by default .5 (half a point) of damage, if the target has armor that is greater than or equal to the attack damage, this is a rare occurrence though, in Starcraft II it really can only happen against fully upgraded Ultralisks, you can change the minimum amount of damage in the data editor)
Here is the formula
Let me define those variables for you
L_f = Life Final = The amount of life Unit 1 will have after killing all enemies
L_1 = Life of unit 1
D_1 = Damage per Second of Unit 1 (this can be calculated by the DamageAmount/Period of Weapon) Note that you might need to be specific here, a unit like the marauder does more damage to armored units than light, and most every weapon period has a random + - variant defined in the weapon that shifts the attack speed… you can also factor in the armor of the defender here.
L_2 = Life of unit 2
D_2 = DPS of unit 2
n = Number of Enemy units (number of Unit 2)
What this formula does is calculate how much life a unit (unit 1) would have after fighting N number of unit 2
This formula is great because (unlike my first formula) it takes in to account that a unit, once dead no longer deals damage, in other words, as Unit 1 kills each unit 2, unit one will take less and less damage, (that’s why blink micro is so good!)
Also keep in mind that the rules of algebra still apply in Starcraft II, if you set L_f to 0 and solve for N you can find out how many “unit 2”s it takes to kill a “unit 1”. Lets do an example Ill use the same "Zealot vs Zerglings" example I did in my first tutorial, only this time we will achieve much more accurate results because of the new formula
Lets test a Zelot as unit 1 and 3 Zerglings as unit 2. Ill use the data that I calculated from my old tutorial, (quote shortened to save space…)
so using the data above our variables will be defined as
L_1 = 150 (shields + max life)
D_1 = 12.674 (calculated with Zealot Damage/Attack speed (x2 because the zealot has 2 attacks)
L_2 = 35
D_2 = 6.592 (damage / attack speed) (It is also important to note that when I take my attack speed I also factor in the +.125 -.0625 random delay max/min values that most weapons contain)
n = 3
When we calculate it out our L_f comes out to around 41, I tested this and it is not completely accurate a zealot usually comes out to around 44-48 after killing 3 zerglings but this formula does not take in to account that Zealots have 1 armor, Zergling Regeneration and extra damage dealt as overkill when a unit dies, but for the most part the formula is pretty accurate
The disadvantage this formula has to my original is that my original formula gave a single number that you could use to compare any 2 units. But this formula takes in to account the diminishing amount of damage that the unit 2s will deal as they are eliminated.
A few Side notes:
I use this formulas like this more often than you would think, I keep a TI 84 on my desk with this formula plugged in to a program so I can make calculations quickly
Also realize that you can use this formula with a single unit too if you just want to compare 2 units to each other by using 1 in the place of N
Finally be sure to note if you get a negative number as a result in this formula it does not mean that there is a problem with the formula; this number gives you a representation of how much overkill damage your unit 1 WOULD take if his death was prevented and he was allowed to keep fighting until he eliminates all enemies. For example if we were to use the zealot/zergling example with 10 zerglings instead of 3 we would get a result of around L_f = -850, meaning that the zealot would have die before killing all the zerglings but if the zealot were allowed to live it would take 850 more damage before it would be able to kill all 10 zerglings. I find that Math really can help us Custom game makers to quantify Starcraft, I encourage you to modify this formula as you need to in order to make it better fit your specific game, This formula is really only the tip of the iceberg when it comes to balance with formulas, You really can take it as far as you want too, in one of my games I used math to balance leveling Heros in a MOBA style game each with unique abilities and spells, almost anything can be made to fit in to math in the game of Starcraft. I hope you find these formulas as useful as I do!
EDIT
I have done a little algebra and I have come up with an equation were instead of solving for a L_f value we solve for N, with L_1, L_2, D_1, and D_2. In other words, we come up with exactly how many of 'unit 2' it takes to kill a single 'unit 1'.
Lets do our Zealots vs Zerglings example one more time, we will solve for N, or in other words the number of Zerglings it takes to kill a zealot.
When we plug in everything we get N=3.59
So it takes approximately 3.59 zerglings to kill a zealot, does this number seem accurate? That sounds about right!
Hope this new formula helps out!
Reserved...
Man, that looks amazing. Being able to balance things without feedback is most needed by map makers. Too bad it can't take into account the diversity of abilities in this game and their possible synergy effects. I'm too lazy to go on using these formulas, unless you provide an "automated" way of doing it, like and Excel table maybe?
@SoulFilcher: Go Actually SoulFilcher I am working on that sort of excel spread sheet right now, i should be posting a download link for it soon, also im making a link to a web page that will calculate it for you.
At 1st, wtf, but as I read the example...wow. Thanks alot, I have an RPG going and the creeps are a pain to get balanced to pretty much kill each other at the same time with no player or tower interferance, now, only 1-10 health remaining after the groups attack each other. Thanks a lot.
Really, I don't think it's possible to get truly good balance no matter how complex the formula without actual testing.
By the way, in your second equation inside the radical you have
(8 * L_1 * D_2) / (L_2 * D_2)
The D_2 in the numerator cancels with the D_2 in the denominator, so it's pointless to put it there.
@Nebuli Its not intended to balance your map for you, but more give you a reference point to begin with, like you said, starcraft is way to complected to be expressed with simple equations )=
@777iop: Go Oh crap, thanks for pointing that out, that is supposed to be a D1, not a D2 in the numerator Fixed it, Thank you