An Introduction to Basic Mod Balance

An Introduction to Basic Mod Balance

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

An Introduction to Basic Mod Balance

Post by Tired »

So you want to balance a mod?

To preempt some of our local gradeschool math failures, yes, you do need experience actually playing the game to do this. Duh.

On the bright side, math actually can help, and here's how.

First, you need to understand resources. In Spring (by default) there are three. If you're lost already, then odds are that you're not destined to be a balancer, and you should probably stick to scripting. =)

Spring's resources by default are those used by Total Annihilation, and subject to certain attributes. Resource income is contributed to an overall "storage pool" that theoretically exists in storage buildings and resource generators, but is all instantly accessible for any purpose, suggesting that it really either exists in some interdimensional transitional state, can be transported instantly by such means, or is simply a convenient RTS convention where common sense takes a back seat to "fun." It should be noted that resources do not have to be this way, and given some elaborate lua scripting, it should be possible to have any number of resources, some or all of which need to be carried to factories or build sites to be spent.

For those of you still here, the three resources in Spring (by default) are Metal, Energy, and SpaceTime, the latter being a combination of time and distance. Effectively, SpaceTime comes down to a relationship between the time to build a unit and the time it takes a given unit to travel from one point on a map to another. Since we're all dumb here, it's easiest to refer only to Build Time versus Worker Time as a resource (Time for short).

Since everything covered so far should fall into the category of "common sense," go ahead and forget about it and we'll get to the math.

In the course of normal observation, it quickly occurs to people playing with unit costs that certain overall archetypes can be applied, and we'll cover several of them in some detail.

Gunship/Ground Ratio

Air doesn't operate under quite the same costing formula that ground does. To begin with, you take all Metal costs for Gunships and divide them by 1.5, and multiply Energy and Build Time costs by 1.5 Don't argue - just du eet! Additionally, when balancing Tired Annihilation I doubly valued Speed, viewing it as both an advantage for reinforcement (and exploiting vulnerabilities), and a factor of range. More about that later, but I didn't calculate aircraft speed as a factor of range, given that air speeds and movement classes generally negate range to begin with.

Air/Ground Ratio

For all air other than Gunships (traditionally Bladewings, Banshees, Rapiers, Brawlers, Blades, Blackdawns and Krows), you divide Metal costs by 2 and multiple Energy and Build Time costs by 2. This includes Bombers, Fighters, Builders, etc.

Weapon Cost x for Air Only.

You don't have to do this, but it occured to me that TA (Tired Annihilation) anti-air weapon costs were unreasonable, given that they could not shoot ground as well (eliminating MT forests). As such, I divided all Weapon Values (defined as dps*Range*Speed*Rounded AoE) that were strictly anti-air by 3. The important note in this case is consistency - if you discount some weapons that only shoot air, then discount all weapons that only shoot air.

Conversion Ratios

In TA, I decided that the simplest costing method was a flat scale. If a unit costs so much Metal, then it will cost so much Energy and Build Time as well. I determined the specific amounts using a baseline unit, but we'll cover that later. The specific ratios that I established were: 1 Metal = 60 Energy (determined by the E/M conversion rates of metal makers, which I standardized), 1 Metal = 17.14 Time (Build Time or Worker Time), and by comparing the two, 1 Time = 3.5 Energy. Given this relationship, the three costs can be used interchangeably - if you want a unit to cost 10 less Metal, then increase its Energy cost by 600 or its Time cost by 171.4. Just make sure that you never increase one or more without decreasing another, and at this fixed rate.

Rates that you use can be whatever you like - I used a baseline unit (a theoretical unit that I pulled out of a hat and labelled "properly costed" to have default values for how much things should cost for given abilities), but you can use whatever feels appropriate. If you want, decrease the Metal/Time Ratio to something like 14. Effectively, it will cost more metal relatively to make a unit build faster, although you would save more metal by building more slowly. Also, you could adjust your baseline costs to have a higher relative Build Time to Metal ratio going in.

I'm skipping steps in here somewhere, but I haven't slept in awhile - probably come back to edit this section. ~~

Combat Duration

I used 13.5. That is to say, a fight between two nameless, average units will take 13.5 seconds. This is important for a number of reasons. First of all, it gives you an idea as to how dps and Health should relate. An average unit shooting another average unit should take roughly 13.5 seconds to kill it. In reality, unit specialties create a more dramatic range: Bulldogs, for example, with 4,200 health and 235 dps would take 17.9 seconds to kill each other, and Flash Tanks, with 600 health and 106.5 dps would take 5.6 seconds. Fractions matter. More on how unit specialties are defined later.

13.5 seconds also, coincidentally (or not so), is how long it takes an average bomber to complete its reload and pathing cycles after dropping a load to come around and drop another (the assumption being that most bombers won't survive to drop two loads). As such, all bomber dps can be divided by 13.5. Additionally, stunner weapons, for reasons too bizarre to contemplate, can also be divided by 13.5, as they generally remove a unit from a melee, "killing" it for the purposes of a single battle. As such, a Stilleto bomber's EMP dps is divided by 13.5 twice - once for being dropped from a bomber, and once for being an EMP weapon. (Don't worry - the BA Stilleto's weapon is still hideously underpriced.)

Because of the way that OTA-based mod bombing scripts run, this 13.5 second combat duration is more or less inviolate (added to the fact that OTA, and resultantly the better parts of its mods, were based around this core concept going in). If you don't want to base your mod off of TA, or want radically change the way that an OTA-based mod tends to operate, then feel free to try out other values and make adjustments accordingly.

Comparing Units - Costing in a Can

Earlier, when I mentioned a baseline unit, I was refering to an imaginary unit that I compared all others against to gain a relative cost for relative effectiveness. Tired Annihilation as a whole is based on relative values - the overall value of firepower is dependent on a unit's health, Line of Sight, etc. - as opposed to absolute values - +20 dps = +5 Metal, +300 Energy, +85.7 more Build Time. As such, increasing dps by 20 might cost +5 metal more or +50, dependent on the unit's other attributes.

Core Unit Attributes

Really, that's all of them, but I don't have the kind of time needed to deal with all of that crap, so I generalized some and prayed that OTA/AA/BA had left me reasonable slope tolerances, turning rates, E costs for cloaking, etc. In some cases, they didn't, and here I broke with math to a degree to make changes that "felt" right to make a unit fulfill its desired function. Yes, this wasn't the best approach - it was the lazy approach that worked, and AA/BA and even OTA have a long and respectable enough history of that.

What I did do was take rarified attributes and assign them a base (arbitrary) value. +20% to costs for cloaking, Kbot movement class, Flight, hovering, stealth, amphibiousness, etc. I started to assign arbitrary values for unit "class" (based upon function) too, but realized that to be happy with the results I'd have to break down and mathematicize all of the lesser constituent attributes. Even footprint size can be a relative attribute, as larger size messes with pathing, but also decreases the effects of AoE on units that stupidly cluster together while pathing (although these two effects to a degree cancel each other out).

Screw that. Someone else feel free to improve upon me.

What I did create percentages for to apply to overall Unit Value were: Speed, Health, Weapon Value (Speed*dps*Range*Rounded AoE for ground, dps*Range*Rounded AoE for air and statics), and Line of Sight for combat units, Radar Area, Jamming Area, Sonar Area, and Worker Time for non-combat units. To establish a baseline cost for these values, select a value that seems reasonable, and compare the units with said attribute to that baseline for a percentage. If you want to get fancy, use Pi*R^2 to determine areas for radar, jamming, and sonar, and divide the results for a unit by the baseline. I didn't, but probably should've.

The important part remains consistency. Once you have your formulas in place, when you find a part in need of changing, then change the formula itself to better reflect the realities of a situation instead of a given unit affected by it at a time (even though this is tempting, as changing the formula will mean changing every single unit it touches).

Putting it all Together

So here's a sample baseline for a combat unit (happens to be the one I used in TA).

Metal Cost: 150
Energy Cost: 1,200
Build Time: 2,227.5

Speed: 1.5
Health: 1,000
Weapon Value (Speed*dps*Range*Rounded AoE): 56,430
Line of Sight: 380
Special Abilities: Kbot (+20% to Costs)

Now we'll cost a Krow.

Speed: 3.83
(3.83+1)/(1.5+1) = 1.932 The +1 is added to account for statics, which have no speed, and for sub-one speed units, which would end up being stronger than statics if speed was simply removed as a factor for statics altogether.

Health: 7,200
7,200/1,000 = 7.2 (Whee! It's easy!^^)

Weapon Value: (Don't count Speed, as it's an aircraft)*130.8 dps*525 Range*1.00 Rounded AoE = 68,670 for a KROWLASER2. There are two of these. 138.5 dps*575 Range*1.00 Rounded AoE = 79,637.5 for a KROWLASER. Next, sum the weapon values. 68,670*2+79,637.5 = 216,977.5/56,430 = 4.039

Line of Sight: 710/380 = 1.87

Special Abilities: Flight (+20% to costs - no higher than Kbot movement class costs, but remember that aircraft follow special costing rules.)

Now apply the results to your selected formula. Mine was:

Speed%*((Weapon Value% + Health%)/2)*LoS%*Special Value%

1.932*((7.2+4.039)/2)*1.87*1 (Special Ability costs counter each other out here) = 20.302

This gives us:

Metal Cost: 2,030 (150*20.302/1.5 [it's a Gunship, remember])
Energy Cost: 36,544 (1,200*20.302*1.5)
Build Time: 67,834 (2,227.5*20.302*1.5)

Now, some might argue that I've undervalued health or overvalued Speed or Line of Sight. I would respond that they might be right, and that they should feel free to offer an improved formula, as this one was cranked out in about two minutes. The application of experience and a modicrum of rationality are the counterweight to any such possibilities. Make sure units pass the common sense test.

This costing method is a helper more than a definitive system, but only because I've neither the time nor the math skills at hand to make it perfect. More complex relationships are easy to postulate and difficult to realize, but if people are willing to waste years on unpopular mods, then such a quixotic quest might seem appealing. If you're up for it, then go for it. If not, then this application of the system still works well.

More on unit roles as determined by stats when I'm bored again.
Last edited by Tired on 26 Sep 2007, 19:49, edited 1 time in total.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

A tip straight from Sid Meier:
When fiddling around with the balance (or other things) just double or cut by half the values you actually are using. Sounds huge but it really let's you feel what happens when you make something more expensive / cheaper or stringer / weaker...

The surprise is that is astonishingly works great and maybe you'll just keep those doubled or halfed values in the end...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

[Krogoth86] wrote:A tip straight from Sid Meier:
When fiddling around with the balance (or other things) just double or cut by half the values you actually are using. Sounds huge but it really let's you feel what happens when you make something more expensive / cheaper or stringer / weaker...

The surprise is that is astonishingly works great and maybe you'll just keep those doubled or halfed values in the end...
Actually in private testing (meaning me, myself, and I) I use this method a lot. Reason being, it gives you your maximum means and your minimum means so that you can accurately balanced said values.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

That's also called 'binary search'.
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

That doesnt take into account alot of factors.. you cant come up with a "formula" to balance something. Its guess work, fiddling and play testing. There is no magic bullet that will allow you to easily with little effort balance something. Stop trying to make it out that it is even possible..
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

He isn't, Fang. Mathematics is the basic tool, the rest is required to deliver a useful product.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

Ohoh, neddie! Someone who actually made it to the second and third lines!

I'm sure that Fangers tried, but his brain must've exploded at the concept of a balanced mod. =P
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Out of that explosion came a fairly balanced game, what can I say? It was hard, wiping the grey matter off the forums, but as you can see, he put it all back in and is ready for more.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

You mean this balanced mod? ~~

"Location: DELETE YOUR EE COPIES!!!"

Hey, for a mod that had a small fraction of the unit variety and complexity of OTA and, consequently, not enough players for a definitive stress test of its balance, he did well enough. =)

I'm just telling him how he can do it better.^^
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Yes, next to that mod that tried ripping people off to the point it got turfed off UF, EE falls flat it comparison!
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

Oh, that's smart, Guess. Attacking the person isn't a logical fallacy or anything, so your irrelevant post must hold some merit. =)

Hate to be the one to update you (since apparently no one else likes you well enough to keep you in on the latest gossip 0o), but TRO has given permission for use of the model so long as proper credit is given. Also, beyond being back on UF, Cup has offered Tired Annihilation its own UF domain.

You could redeem yourself to some degree, however, by enlightening everyone as to the meaning of the phrase "turfed off." ~~
User avatar
overkill
Posts: 500
Joined: 02 Sep 2006, 01:15

Post by overkill »

Why must you bash most, content developers/modders and their games that arent tired and TiA?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Unit variety is meaningless if the units are useless. I think you'll agree with that.

Thus we must speak in terms of functional variety.

At Tech Level 1, URC has;
1 Direct Fire Mech
1 Indirect Fire Mech
1 Mortar Mech
1 Anti-Air Mech
1 Intelligence/Intelligence Denial Mech
1 Minelayer/Scout Spider
1 Constructor Mech
1 Direct Fire Cloakable Mech

These each fill different roles.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

It was interesting, but useless.

Since my mod is supposed vapor-ware, I won't explain why.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Using a formula as a starting point for balance is a great way to start off a new mod project or rebalance an existing mod that has somehow screwed up beyond testable repair.

That being said, ya, some things just won't feel perfect after you're done, some unit roles will have been obfusticated and some micromanagement and tricks will have been missed by the formula that must be countered by testing and analysis after the fact.

Basicly, it's the reason why BA T1 is so nice in so many ways while TiA tends to be slightly weaker, however, TiA has a much stronger T2 and late game, because it acctually has a strong starting point that the late game is based off of.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Post by Saktoth »

This isnt really mod balancing 101 is it? Its 'How i did Tired Annihilation'.

Firstly, the air thing. This only to how TA based mods are currently done. There is no reason why air should be costed in such a fashion (even in a TA based mod) other than the fact that that is how OTA did it.

While Math is Truth, and some of yours is Good Math, the application is a little arbitrary. I dont think this would even work for XTA, let alone be something applicable to any mod.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

Well Sak, I'm comparing this to +60% to all naval units because "naval sucks" and "math is stoopid so balance things with arbitrary, seemingly emotionally attached decisions." Obviously, all declarations of how things must be or will be are arbitrary. If you think that you can do better than OTA, and essentially all OTA-based mods, manged, then I'd love to see it.

Snipa, meaningless statements are meaningless.

A lot of you can gripe about my methods, but I only bothered to come up with them in the first place because no one else seemed capable or willing. You think I like having to do my own work? BA could've made the necessary balance decisions to make itself fully functional, or AA could've come back sooner (with some method of addressing the perpetual OPness of at least one of its units each revision), and I'd've been happy as a clam, playing without all this time wasted on silly "content creation" that so many here use to buoy the scraps of their self-esteem. Still would be.

Consider this a challenge - prove that I'm wrong with evidence from my own product, or prove that you're right with evidence from yours (if you have a product - Snipa, you're excused here). You can say things like, "those methods never work" as you please - it's a somewhat free forum. Christopher Columbus was, of course, a fool for thinking that the world was round (that, and he thought that American was India - what a f00b). Little children are, of course, fools for thinking that the world won't end tomorrow. Everyone knows that it will, so no one needs bother even comment on it beyond a smug, and obvious, "You kids are stoopid."

As a lot of mathematicians and physicists have spent some few centuries proving, everything in nature is predictable by mathematical means down to the level of quanta, at which point everything is still statistically measurable. How much less for some half-assed piece of software that 2,000 people in a given month use to blow up digital images of tiny, unrealistic robots?

Swift, the "weak" tier 1 game you refer to is purely intentional. In my opinion, tier 1 is primarily intended for expansion, tier 2 is for meat and potatoes combat and preparation, and tier 3, if things get that far, is for game ending. The "stronger" tier 1 games that you describe tend to negate the purpose of any tiers beyond that, and I'd rather have a mod with empires and lots of varied units to control than a mod focused primarily on micro and homogenous units to control. If micro's your thing, hey, cool - I liked Duke Nukem as much as the next armchair hero. Maybe NOiZE can finally balance out ALL of tier 1 in Flashspam and call it a day.

For the rest of you, put up, or shut up. =)
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

Good job tired.. hey no one plays EE.. wow good job captain obvious..

The fact that my simple little idiot mod had trouble being balanced should be testiment enough to the uselessness of cost/effectiveness formulas..

Why do we need to work around some sort of TA standard anywho..
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

You don't, Fang, but even with the comparison, E&E measures up.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Tired's suggestions are sound when you consider basic balance. TA does have it's own balance and tired is working from there. It is true also that a fudge factor has to be included. I do not agree with the entirety of his post as he omits things like weapon speed ups, inaccuracy, units being pushed out of place, units taking damage from blast impact and several other factors but he isn't stating this as the ultimate in balance guides. I personally think fang has done well with ee considering he had to work from scratch and it would be interesting for him to give some details into his perspective on unit balance and balance tests.
Post Reply

Return to “Game Development”