Unit Maintenance Explained

As I didn’t see an article covering the unit maintenance and did see a few questions about this subject, I thought about researching it myself. I hope it will be useful to some people.

The first section of this article is about the in-game information of unit costs and how to read it correctly. The second part is about how the unit costs are calculated in Civ 4. In the third part some strategic consequences of the way Civ4 calculates unit maintenance are considered. The fourth part considers some of the differences for unit maintenance between the human and the AI. A fifth part contains some information for modders that want to change the way the game calculates the free unit support or want to change the basic costs of units whether they are inside or outside of your borders.

How to read the in-game information

Unit maintenance is divided in two sections, unit costs and unit supply. Both of these costs are mentioned in the financial adviser (F2). You can mouse over these sections and get some additional information.

The unit cost section has the following mouse over information (the numbers are just an example):

10: Unit cost for 10 units (free support for 14)
15: Military unit cost for 15 units (free support for 3)
-13: handicap cost

The first line means that your empire has 24 units. You only have to pay maintenance for 10 of them as you have a free support of 14 units. The second line shows that your empire has 18 military units (every unit except settlers, workers and missionaries). You only have to pay maintenance for 15 of them as you have a free support of 3 units. This military unit cost is usually 0 and will only have a positive number when you’re running the pacifism civic. The last line is a discount and is dependent on the difficulty level of the game (it is 0 for deity level).

The unit supply section has the following mouse over information (again the numbers are just an example):

3: away supply for 7 units (free support for 4)

This means that your empire has 11 units outside its cultural borders. You only have to pay supply costs for 7 of them as you have a free supply support for 4 units. These 7 units have a supply cost of 7/2=3 rounded down. Note that also non-military units like settlers, workers and missionaries have supply costs.

How does the game calculate the free unit support and the handicap cost?

Some of you might have noticed that the amount of free support increases as you play the game. This is true for the free support in the unit cost section, but not the free support in the unit supply section. The free support in the unit supply section is always 4.

However, the free support in the unit cost section is dependent on the total size of your population (the sum of all of your city sizes) and the difficulty level. If we name the size of your population N and the difficulty level bonus D then the free support for units is [0.24 * N] + D. This difficulty level bonus is 5 at Deity, 6 at Immortal, 7 at Emperor, 8 at Monarch, 10 at Prince, 12 at Noble, 16 at Warlord, 22 at Chieftain and finally 28 at Settler level.
The vassalage civic provides you with an additional free unit support which is again dependent on your population size: [0.1 * N] + 5.

The free support in the military unit section is also dependent on the size of your population: [0.12 * N] + 2.

All of these numbers are rounded down.

The handicap cost is a percentage of the total unit cost (unit cost + military unit cost) which is dependent on the difficulty level. The percentage is 0 at Deity, 10 at Immortal, 20 at Emperor, 30 at Monarch, 40 at Prince, 50 at Noble, 60 at Warlord, 70 at Chieftain and finally 80 at Settler level. This number is rounded up.

An example:

10: Unit cost for 10 units (free support for 14)
15: Military unit cost for 15 units (free support for 3)
-13: handicap cost

These are the unit costs from an empire with a size 5, 3 and 2 city. So the total population size is 10. It is a game at Noble difficulty level, so the difficulty level bonus is 12. In this game the vassalage civic that grants additional free support is not used. So the free support is 0.24 * 10 + 12 = 14 (rounded down).

In this game, the pacifism civic is used and we thus have to pay military unit costs. The free support is 0.12 * 10 + 2 = 3 (rounded down).

As this is a game at Noble difficulty level, the handicap costs are 50% of 25 = 13 (rounded up).

Strategic Consequences

The unit cost limits fast expansion.

The free unit support can take a large chunk out of your unit maintenance cost and should thus be maximized. There is only one real way to do that and that is to increase your population before you create a lot of units. To support all the units needed for a fast expansion a large population size is needed, but that is against the nature of fast expansion. If you neglect you defenses in order to save yourself from high unit maintenance costs, then you risk your cities being taken over by barbarians or your settlers eaten by lions.

Early exploration/attack with many units is very expensive.

The free support cost for unit supply is only 4. This means that if 6 or more units are not within your cultural borders (including workers, settlers and missionaries), then you will start to pay unit supply costs for those units. As money is scarce in the beginning of the game, this upkeep can be too much.

An empire with large cities can easily support a sizable army without any unit maintenance cost.

As a rule of thumb, you can say that 4 units of population supply 1 unit for free (not exact, but close enough). So if your cities are size 8 on average, then each city can support 2 units free of charge. If your cities are size 16 on average then each city can support 4 units free of charge.

This doesn’t mean that building farms to grow big cities is the way to go as there are other terrain improvements that are often worth more. It does mean that building many small cities close to each other is not as smart as a few larger cities, because the larger cities can be better defended or can supply an additional offensive army next to its own defensive units. (You also don’t want to have many small cities because of high city maintenance.)

In combination with the article on civic upkeep, one can see that the additional free unit support from the vassalage civic is less than the upkeep cost of this civic (except for very small empires). (The vassalage civic gives 0.1 N + 5 extra free unit support, but it costs more than 0.15 N as a civic.) This doesn’t make the civic useless as it also offers 2 experience to all units that are trained, but it is something to consider when choosing this civic. If your leader is organized, then the civic upkeep costs are halved and the additional free unit support offered by the vassalage civic is actually comparable to its upkeep cost.

Different unit maintenance cost between the human and the AI

The AI pays a different unit upkeep as the human player. It pays the same as a human with a similar empire would pay at noble level if you play the game at settler, chieftain, warlord or noble difficulty level. It pays 95% at prince level, 90% at monarch level, 85% at emperor level, 80% at immortal level and only 60% at deity level (all compared to a human player with a similar empire at noble difficulty level).

The human player pays 50% extra for units outside of its borders (see first section on unit supply). However, the AI only pays a percentage of this cost that is again dependent on difficulty level: 50% at settler, 45% at chieftain, 40% at warlord, 35% at noble, 30% at prince, 25% at monarch, 20% at emperor, 15% at immortal and finally 10% at deity level.

There are more differences between the AI and the humans at the various difficulty levels, but these are the only ones that have to do with this article. An important discount for the AI that is somewhat related to this article is the AI discount on unit upgrade costs. The AI pays much less for upgrading units at every difficulty level.

Some information for modders

I found the XML files that determine the free unit support and it might be interesting for some modders.

The modifiers that determine the amount of free support and the maintenance cost of units (inside or outside of your borders) can be found in the file GlobalDefines.xml and are named:


I think that the names of these modifiers speak for themselves if combined with the formulas for free unit support above.

For the civic Vassalage, the modifiers that determine free unit support can be found in the file CIV4CivicInfos.xml and are named iBaseFreeUnits and iFreeUnitsPopulationPercent.

The difficulty modifier that adds to the free unit support is of course found in the file Civ4HandicapInfo.xml and is named iFreeUnits. The modifier that determines the handicap cost is also in this file and is named iUnitCostPercent. Note that this modifier denotes the amount that you actually pay and not the amount of cost reduction.

Note that the basic number of free units named D in the formula above is the number denoted behind iFreeUnits in the file Civ4HandicapInfo.xml added to the number denoted behind INITIAL_BASE_FREE_UNITS in the file GlobalDefines.xml.

Discuss this article on the forum