Question says it all. I know vaguely what is going on, but want something specific.

Edit:

Here’s some “interesting” values in the GlobalDefines.xml file. No idea at this point what they mean.

- INITIAL_GOLD_PER_UNIT_TIMES_100

50- INITIAL_FREE_OUTSIDE_UNITS

3- INITIAL_OUTSIDE_UNIT_GOLD_PERCENT

0- UNIT_MAINTENANCE_GAME_MULTIPLIER

8- UNIT_MAINTENANCE_GAME_EXPONENT_DIVISOR

7

**Answer**

**Short answer:**

Maintenance is a function of the turn and the number of units. The function resembles a third degree polynomial for both variables.

**Advice for keeping maintenance low:**

Don’t keep a lot of units, as each new unit costs more than the last. If you are going to have a lot of units, have them early in the game, where the costs are still bearable.

**Analysis:**

I tried to edit the global settings as bwarner suggested. Here is what I found:

```
Turn Units MULTI DIVISOR Maintenance cost
46 10 0 0 0
46 10 1 1 6
46 10 20 0 0
46 10 20 1 18
46 10 20 2 16
46 10 20 3 15
46 10 20 20 14
46 10 100 1 73
46 10 10000 1 10005
46 10 100000 1 123533
46 10 1000000 1 1526640
46 10 1000 1 818
47 10 1000 1 847
48 10 1000 1 878
49 10 1000 1 909
50 10 1000 1 941
51 10 1000 1 973
52 10 1000 1 1007
53 10 1000 1 1041
54 10 1000 1 1076
46 10 10000 1 10005
47 10 10000 1 10417
48 10 10000 1 10842
49 10 10000 1 11280
50 10 10000 1 11731
51 10 10000 1 12195
52 10 10000 1 12674
53 10 10000 1 13167
54 10 10000 1 13675
55 10 10000 1 14198
56 10 10000 1 14737
```

It takes some time to reload the game between trials. Apparently setting either of these settings to zero reduces the cost to zero. We can also conclude that raising the multiplier increases cost, and raising the divisor lowers it.

While this is obviously not an answer, I posted it anyway as I don’t have enough reputation to add a comment. Maybe if we work together on solving this problem we might discover the answer. By the way I did some regression analysis on the numbers, but I wasn’t able to find anything useful.

EDIT: I tried to change the INITIAL_GOLD_PER_UNIT_TIMES_100 value as well, but that didn’t seem to have any effect on maintenance cost.

EDIT 14th of oct: I’ve updated with some more data that seems to shed a little more light on the issue. Increasing the multiplier to a large number has two advantages:

- It clears the shroud of rounding (maintenance can apparently only be an integer).
- It puts focus on the particular product of the equation that is supposedly multiplied

A couple of observations can be made about the formula:

- Each spin of the turn counter increases maintenance cost
- Increasing the multiplier increases the cost by more than a proportional amount
- Each spin of the turn counter increases maintenance cost more than the last, in absolute terms
- Each spin of the turn counter increases maintenance cost less than the last in relative terms
- Polynomials share those two last properties

Feel free to chime in with any considerations you might have.

Here is some more data:

- Two units, 1000 multiplier, 1 divisor, turn 6 – 100
- 2-20 units, 1000 multiplier, 1 divisor, turn 133-163

EDIT 22nd of October:

The patch that has come out changes the formula. I will take a further look and then report back. What is obvious already is that the only-every-second-unit-counts rule is gone. I have updated the advice in the top to reflect that.

**Attribution***Source : Link , Question Author : Damon , Answer Author :
9 revs*