# How to determine the cost of new units

Suppose I design a game such as Battle of Wesnoth, where there are many races, each of which with many types of units. Is there any rule-of-thumb for determining how much each unit should cost?

One obvious rule is that weaker units should be cheaper, otherwise no-one would like to buy them. But how much cheaper should they be?

As an example from the above link, is there any formula by which I could decide that "vampire bat" (based on its HP and damage properties) should cost 13 while "blood bat" should cost 21? Or is it just a guess that is validated by extensive playtesting?

EDIT: To make the question more focused, let's assume for simplicity that the units in Wesnoth differ by only two stats: health points ($h$) and damage points ($d$), and all their other stats are equal. Is there a way to calculate a formula to determine the cost as a function of $h$ and $d$?

• This is basically my whole job as an economy designer, so it's difficult to boil it all down to a StackExchange answer. ;) Ian Schreiber gave a great lightning tour of his process for solving similar cost balancing problems in TCGs at GDC a few years back - that might suggest some starting points you can use to make inroads on the problem. Mar 22, 2020 at 3:08
• Regarding your edit: how do I resolve the outcome of a combat between two units with particular health and damage numbers? What about groups of units? There are multiple rules we might use to decide how much damage is dealt to which unit, in what order, and each of those rules will imply.a different valuation of effective power. Mar 22, 2020 at 11:46
• @DMGregory Great link, thanks! In the end he even gives an example with two stats and a cost, which is very similar to the simple question I had in mind. Mar 23, 2020 at 12:33
• Mar 23, 2020 at 13:49

Such a rule of thumb would aways be specific to your game.

Looking at the numbers and setting the cost linearly can be very misleading. Some stats might be more useful than others. Some stats might have synergetic effects between each other. The usefulness of stats might not always be linear.

And then there might be game mechanics in your game which affect whether few strong units are better or worse than many weak units.

So the only way to really figure this out is through playtesting. Nothing beats playtesting with real human players. But in order to save time and money, you can also cut down the time you need by automatizing your playtesting.

Create a framework which allows you to quickly run a large number of automatic battle simulations with different pairings and tell you which side wins how often.

The most primitive simulation is to simulate simple unit vs. unit combat. Just simulate two units taking turns attacking each other until one is dead. Run that a thousand times, and you can see which unit wins how often. This should tell you which of the two units is superior and thus should cost more.

One further step is to simulate group combat. Extend your previous simulation framework to allow 1 vs multiple or even multiple vs. multiple units. This allows you to answer questions like "are 100 points worth of vampire bats stronger or weaker than 100 points worth of blood bats". But now you need to think about how units should pick their targets. Simulating various strategies and looking at their success rates can also provide you with useful data about which tactics players should choose in different situations. This data can also be very useful for your AI development.

The most comprehensive form of simulation is to run complete matches AI vs. AI. This allows you to run lots and lots of simulation series with slightly tweaked unit attributes and compare win/lose ratios. But this of course requires that you already have an AI for your game which is able to play in a way which is comparable to humans.

Still, in the end, no simulation can replace real playtesting. You players might figure out strategies you never thought about when developing your AI. Such a strategy might completely revolutionize the meta-game and force you to rebalance various units to make the game interesting again. No complex strategy game has really solved this problem yet. Even the most popular AAA strategy games keep releasing balance patches again and again to address balance problems discovered by the player community.

• Simulation is a great idea for saving time in testing. Thanks! Mar 23, 2020 at 12:34
• A lot of strategy games give ten or more units to each faction, which makes it harder to evaluate which units are really underpowered or overpowered so you don't have to be quite so careful. Imbalances players don't know about don't exist yet :P Mar 23, 2020 at 17:42