How to balance your faction

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderator: Forum Moderators

fog_of_gold
Posts: 637
Joined: December 20th, 2009, 5:59 pm
Location: Germany

How to balance your faction

Post by fog_of_gold »

As some of you already know, I have a formula to balance your UM units. Keep in mind that even if you know the formula already, it is a good idea to scan this since 1st, my formula changed nearly completely and 2nd, I've done enough calculations for now and I won't do that anymore for a long time. Before I get to the formula, there are two things you should know about it:
1st: Do not try to make me believe there's no way to get such a formula. There is a way: This is the way. Its core is very well reasoned, looking on fights. The standard deviation is at the moment at 22%. However,
2nd: do not believe this formula more than your own feels and your players. This formula has its flaws, it is partly guessed and there are missing things.

Before you are able to understand what I'm talking about, you need to learn my "vocabulary", my shortcuts:
[hits]: hitpoints
[MP]: movementpoints
[resis]: resistance to see an description of it, look farer below
[def]: defence the chance to be attacked there's no formula about it

The core statement of this formula is, if a unit is balanced, this is true:
[hits]*[dmg]*([MP]+1)²/[resis]/[def]/[cost]²=const
reasoning:

Now, there's the part of how to use the formula. However, it isn't that easy it looks like. There are very much parts just existing because of guessings together with too slight reasons. There are now the variables [hits], [dmg], [resis], [def] and [cost]
[hits] and [cost] are clear.
You are fighting in average 1vs1 battles. You are therefore able to attack two times, but only if you have the same ranges like your enemy - otherwise the enemy will try to attack you on the range you haven't. Therefore you add the damage of all ranges.
The damage of a range is, as far as I guessed, the strongest attack plus 10% of the other ones.

The [resis] are guessed as the average resistance.

You can't formerly include [def]. If you need to/want to, you need to guess.
I want to give you now some examples to make it clearer how to do that:
unit1
32 hitpoints
6-3 melee damage, impact
3-3 range damage, fire
6 movementpoints
20 cost

unit2
37 hitpoints
12-2 melee damage, pierce
4 movementpoints
12 cost

The power of the first unit is 32*(6*3+3*3)*(6+1)²/20³=~106
The power of the second unit is 37*(12*2)*(4+1)²/12²=~154
The second unit is therefore 46% stronger than the first unit.
To balance the second unit to the first unit, you need to balance the 46%. You could, for example, set the hitpoints to (1-46%)*37=~20. The damage can be set to (1-46%)*12=~9 together with setting the hitpoints to 106/((12*2)*(4+1)²/12²)=~34 and so on.


The last part is the developing of this formula. You properly nocticed my mother tongue isn't english. I have therefore problems to speak it and some points are very likely to be not clear. If you have questions, it would be very nice if you ask them. It helps me seeing what's unclear and need to be improved. Also, if you see a mistake or have an idea to get an easier, more correct or just better formulation, just tell me. As hinted before, this formula is even not complete. There are things are missing and I hope I'll correct them or you have ideas and first beginnings of how to include them. Here's a list of what need to be done:
Spoiler:
The last thing that need to be done, is my personally to-do-list that will be implied/are planned:
Spoiler:
Here's an excel file containing the lvl1 mainline units. 'good' means I only included what's includeable and 'bad' means every recruitable unit in default era.
Attachments
calculation.zip
(6.36 KiB) Downloaded 287 times
Last edited by fog_of_gold on October 19th, 2010, 3:15 pm, edited 8 times in total.
User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: How to balance your faction

Post by boru »

The part that confuses me most is this: why should units balance with other units? I thought it was factions that had to balance against other factions.

Maybe you ought to be adding all the units from the same faction together, and compare the total with units from a different faction.
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: How to balance your faction

Post by Max »

fog_of_gold wrote:1st: Do not try to make me believe there's no way to get such a formula. There is a way: This is the way. Its core is even prooved. The standart degression is at the moment at x%. However,
that's no prove, that's just an explanation of your theory.

and this hasn't got anything to do with balancing factions.

according to your formula a unit with 8MP is three times "stronger" than the same unit with 4MP.
User avatar
wesfreak
Posts: 1020
Joined: October 28th, 2007, 1:11 pm
Location: in a land far far away

Re: How to balance your faction

Post by wesfreak »

You should probably add something for abilities and weapon specials, if possible, since that seems to be missing.

Both unit vs. unit and faction vs. faction balance is important, because an extremely overpowered unit would overpower the faction. There is some leeway, however, like how the saurian augur and dark adept are very good magic units compared to the mage because the need to be for their faction to be balanced.

Why wouldn't a unit with 8mp be three times better than the same one with 4mp? Imagine a wose or heavy infantry you could use to scout: It could slaughter other scouts hands down because it has the other stats of a fighting unit, and be able to go around enemy lines much better, and even chase down fleeing units. I wouldn't want to face a unit like that.
User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: How to balance your faction

Post by boru »

wesfreak wrote:Both unit vs. unit and faction vs. faction balance is important, because an extremely overpowered unit would overpower the faction. There is some leeway, however, like how the saurian augur and dark adept are very good magic units compared to the mage because the need to be for their faction to be balanced.
If there is some leeway, then why should units balance at all? Of course, factions should balance, but shouldn't the faction work as a team, each using their strengths to cover the weaknesses of other units?
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: How to balance your faction

Post by Velensk »

There are so many ways to break this it would almost be funny.

I would ignore unit vs unit balancing entirely. If the factions are balanced against each other then obviously none of the units within the faction are unbalanced enough that it matters. Now it would be an odd era if there was a unit like a wose or a heavy infantry that moved like a scout and it was still balanced but it could be done. Example alright, your factions scout has 40 hitpoints, good resists, 8 mp, with a 10-2 melee attack for 17 gold. This is fine because the other teams has a unit with a 3-3 ranged berserk attack, that is balanced by the fact that most units in this era have ranged attacks and thus the ranged attack is actually a vulnerability in most cases but it does mean they have a hard counter to your scout available with relative ease.

On the flip side a unit with 1 hitpoint, 7 movement, costing 10 gold, and having only a 2-1 ranged berserk attack would probably be overpowered in mainline despite being about as much an utter wimp as you can get in terms of pure stats and not even having the speed to act as a reliable 8mp scout.

Berserk is particuarly easy to break things with so we could switch to units that are very fast and very hard to kill but do almost no damage(possibly combined with the skirmisher skill). You could balance their cost/damage so that they are equal to something else according to that formula but the tactical advantage these things would give would still make them very overpowered on certain factions.

Now keeping in mind how strong your unit is relative to other units can help you keep things in alignment however it is not failsafe nor inherently needed.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
wesfreak
Posts: 1020
Joined: October 28th, 2007, 1:11 pm
Location: in a land far far away

Re: How to balance your faction

Post by wesfreak »

Because this wouldn't work when the differences are large enough. For example: if you balance a faction and not the units in it, you could have a faction with units that have only one function: scouts with 100 moves and no attacks and 1 hp to act as very good scouts, archers and fighters that deal 1000 damage but only have 4 mp and 1 hp, units that exist to soak up damage that have 1000 hp and 1 mp and deal no damage. In theory it will all work out: the meatshields defend while the fighters and archers attack, the scouts scout, and so on. But in practice it won't work that way.

By some leeway I mean only some: dwarf fighters are tougher than spearmen, but not by so much. Celestials in eom are another great example: weak individually but if used together right are extremely strong.

Edit: Ninja'd but still kind of valid
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: How to balance your faction

Post by Velensk »

The problem I have with your answer is that you seem to be thinking that faction vs faction balance is determined by theory. It isn't, it is determined by repeated testing. In my experiance trying to balance things ahead of time through theory rarely works perfectly.

More on the origional topic: As a particuarly exadurated example of how to break this, let us theorise a unit with a movement of 2 and a 10000-100 melee attack no ranged attack, poor dodges, 90% resistance to everything and 1 hitpoint, and a cost of 15.

Unless the faction it is in excels at making numerous good walls this unit would be utterly useless against any faction that has a skirmisher with a ranged attack. The damage rating 10000-100 can essentially be equated to: if I hit you I will kill you and if you do not kill me I will have enough strikes to land a blow. However this is a quantitative effect that cannot fit into a mathmatic formula, we could keep pumping that damage rating until this unit is theoretically godlike however the fact that it would never get first strike and any enemy with a ranged unit can kill it easy without fear of retaliation (and any faction with first strike on melee can easilly make a wall against these things.

The units stats have more qualitative effects having 8 mp means that you have the movement that maps are designed with in mind for scouts. Having 40hp+good resists might mean you can hold the line against 3 standard attackers unless they bring your weakness in, having any damage rating higher than 30 per turn makes you a superior killer unless it comes with some hefty disadvantage (or is in a strange era).

EDIT: This thread in general has got me thinking to trying to write my own guide. I may do so in the future but not tonight.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
Dixie
Posts: 1757
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: How to balance your faction

Post by Dixie »

There is something unclear about your formula:

[hits]*[dmg]*([move]+1)²/[resis]/[def]/[cost]²=const

Should it be interpreted as:
[hits]*[dmg]*([move]+1)²/(([resis]/[def])/[cost]²)=const

or

(([hits]*[dmg]*([move]+1)²/[resis])/[def])/[cost]²=const

or

([hits]*[dmg]*([move]+1)²)/([resis]*[def]*[cost]²)=const

? (I am actually having some doubts about 2 and 3 being the same, but my maths are a bit far behind me and I haven't tested it out)


Apart from that: I agree that this will never replace lenghts of playtesting, but I think it can still be a general indicator. Also, the goal is not necessarily to always fall even. Maybe a unit will be pretty effective (like 120-140%), but will have some key weaknesses that the other, less effective units in the faction will be needed to cover for. Or maybe it is more effective than average, but doesn't have a level up (think lancer/knight/paladin, deathblade/revenant, swordsman/pikeman/javelineer, etc.)

In any event, I'd be curious to see the standard digression for mainline, possibly some example calcutions runned over some mainline units, and the average powerlevel by level (as is implied that lv2 and up are maybe over than 100% effective.

I would also be pretty interested in seeing Velensk's take on balance :)
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Re: How to balance your faction

Post by Golbeeze »

Making a faction is already enough trouble without trying to mathematically balance units. Just have fun with user made factions and play-test them until they are generally regarded as balanced (if ever).

There is no need to attempt to come up with some "scientific" balance mechanism or "proof" that a faction is balanced. Playing the game with the faction is more than adequate to determine the quality of the faction.
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: How to balance your faction

Post by thespaceinvader »

Cannot be done. You're eminently welcome to try, but balancing by formula WILL NOT WORK. There are too many variables, not least the assumption that everybody uses the same tactics and strategy. Your first assumption, for instance, is that a unit should always attack the weakest enemy. That is just plain wrong. I can think of plenty of cases where the strongest enemy is the best one to attack, and the weakest should be ignored until you have a hole in the enemy's defences that you can exploit. Or when you should attack with your most-damaged unit in order to damage an enemy, lose the damaged unit and leave the hex open for another attack.

You also don't seem to be taking into account attack types - a (new) faction with tonnes of fire damage and no arcane, cold or pierce, for instance, would be horribly unbalanced in mainline, because they'd be somewhat overpowered against the Undead, and hugely underpowered against the Drakes. In another era, they could be perfectly balanced. Similarly, you don't seem to be taking into account poison, magic, leadership, marksman, steadfast, healing... let alone any exotic UMC specials and abilities.

You're also COMPLETELY ignoring the balancing effects of maps, which are vital in making sure that eras are balanced.

Units are not balanced against units. Factions are balanced against factions. The same unit could have two different prices in two different factions, because it is differently useful in a different context.

Also, what the heck is a standard degression? DO you mean standard regression? Or standard deviation? Because AFAIK standard degression is not a mathematical term. The only definitions I can find of that word are 1: a progressive, stepwise downwards movement, and 2: a decrease in the rate of degressive taxation.

This sort of formula, on simple units without many specials, could give you a very vague idea which units were more powerful and less powerful. But you should be able to do that without a formula. It only takes common sense to realise that certain units are powerful and others are not. Or it should. It CANNOT tell you explicitly that a unit or faction is or is not balanced. It has been tried before, and it has failed before.

EDIT: http://www.wesnoth.org/forum/viewtopic. ... it=formula
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: How to balance your faction

Post by pauxlo »

It may work if you have an era in which each faction has only leader-units, and cannot recruit anything, so where we really have a one-vs-one game. Then still the balance depends heavily on the map.
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: How to balance your faction

Post by pauxlo »

It may work if you have an era in which each faction has only leader-units, and cannot recruit anything, so where we really have a one-vs-one game. Then still the balance depends heavily on the map.

Edit:
fog_of_gold wrote:As some of you already know, I have a formula to balance your UM units. Keep in mind that even if you know the formula already, it is a good idea to scan this since 1st, my formula changed nearly completly and 2nd, I've done enough calculations for now and I won't do that anymore for a long time. Before I get to the formula, there are two things you should know about it:
1st: Do not try to make me believe there's no way to get such a formula. There is a way: This is the way. Its core is even prooved. The standart degression is at the moment at x%. However,
About the proof, se below.
fog_of_gold wrote:2nd: do not believe this formula more than your own feels and your players. This formula has its flaws, it is partly guessed and there are missing things.
Yeah, like others said: other units in the factions, which enemies you face, etc.
I think this is really the most important part of your post.
fog_of_gold wrote: Before you are able to understand what I'm talking about, you need to learn my "vocabulary", my shortcuts:
[hits]: hitpoints
[MP]: movementpoints
[resis]: resistence to see an description of it, look farer below
[def]: defence the chance of dodge an enemy attack there's no formula about it
You forgot [dmg] (and in the formula you used [move], not [MP]).
fog_of_gold wrote: The core statement of this formula is, if a unit is balanced, this is true:
[hits]*[dmg]*([move]+1)²/[resis]/[def]/[cost]²=const
analysis of proof:
So, what you have is, as far as I can understand, some heuristics woven together.
And finally, there's an excel sheet containing the calculations. However, it's not complete already.
[/quote][/quote]
Ah, I thought you had tried your formula with the mainline units. This could be convincing, if the resulting values would be nearly constant. Now I see only one formula in this sheet.
ahyangyi
Posts: 34
Joined: February 9th, 2010, 1:00 pm

Re: How to balance your faction

Post by ahyangyi »

The first problem is you have set a wrong title. This post isn't about balancing the factions, but balancing the units.

However, I do feel that it's a solid base for balancing your basic combat units. Perhaps you should add discussion about berserk, firststrike, charge, magical, marksman, drains, steadfast etc

An important problem is that, the point of some units are not dealing damage nor absorbing damage. In this case, calculating the combat power is useless for balancing. Here's some examples:

1. a lv1 scout unit gets 10 movement points for 14 gold. No matter how weak it is, it is probably overpowered because you can expand rapidly early on.
2. a mostly lawful faction gets leadership, cures heals + 8, slows, illuminates, teleports, poison, etc at the same time, while its units are "balanced" against other factions using this formula.
3. if you make factions with wierd resistances (for example, undead and drakes), then you have to balance your factions more carefully. even if heavy infantrymen are not stronger than spearmen, and mages aren't stronger than bowmen, if you remove then both, you cannot fight undead at all.

So to balance a faction, you have to get a set of rules regarding these points.

Nevertheless, I'm glad to see people eventually turn their eyes on the balancing issue. I think this formula should be improved and then used as a basic guideline for creating new factions.
ahyangyi
Posts: 34
Joined: February 9th, 2010, 1:00 pm

Re: How to balance your faction

Post by ahyangyi »

Perhaps, we should split the unit balancing issue into some seperated topics:

1. Get a faction balanced in a fixed context. For example, you made an era of 7 factions and try balancing them, or you made a faction and try balancing it against all default factions.

In this case, you have to care about the units in other factions.

2. Get a faction roughly balanced against any other factions. For example, you just make a "MP faction" and you hope it's fun to play with, against any other roughly balanced faction.

In this case, you do not have to care about the units in other factions. All you might want to do is:
  • Make your faction get a roughly adequate combat strength, and an adequate scout, and an adequate way to deal with shallow water.
  • Make your faction get a pack of damage types & movement types, so that your faction will at least find some ways to fight against any other faction.
  • (implied from 2b) Avoid making factions with too few types of units.
3. Get a faction balanced when play MP campaigns.

In this case, in my opinion, in addition to basic balancing, make sure you enable most units to level up to lv. 3. The Kalifa in Extended Era seems to fail to achieve this point. (only 3 units in AE Kalifa can upgrade to lv3!)

4. Get a faction balanced when play MP survivals.

I don't often play survivals. And, unless you're making a survival-only era, you shouldn't care about balancing in survivals :)
Locked