I figured I'd delurk briefly to add a bit about the number of cities maintenance.
It appears Civ4HandicapInfo.xml tells me the max for this is 7, not 6. This meshes with what I found in CvCity.cpp
I believe the full formula is
floor( floor( floor(100 * (pop + 17) / 18) * 90 / 100) * 20 / 100) * number of cities / 100
The 90 is the difficulty modifier, the 20 is the world size modifier.
This produces the correct answer for all 8 cities posted above. If it doesn't produce the correct answer for anything (I'm a little worried about my assumptions about rounding since all the test cases are with 20 cities), let me know and I'll take another look.
However, I notice I'm confused about the implications of this. Everything I've read about this refers to a conqueror's plateau. It's more of a conquerer's... slowly leveling off slope, unless my understanding of this is mistaken. For example, for Adventure One to hit the max of 7 maintenance given a size of 14, we would need 24 cities. Okay, so the 25th city doesn't add maintenance to Adventure One. Great. But it still adds maintenance to all the cities of size less than 14. If we add 10 cities in the war, the 30th city will add maintenance to all cities of size 8 or less. The nice thing is that it does drop off pretty quickly, but it's not a cliff like most reference materials seem to indicate.
Here's the number of cities that maxes number of city maintenance for different size cities
The important takeaway is that there isn't a magic number of cities, abusing this mechanic is a product of having an empire both wide and tall, and the dozen or so cities we're going to pick up in the next 15-20 turns is going to be really expensive as it pushes our entire core to the cap of 7, and the new cities will quickly reach the cap as well, but after that, it's all gravy.
The hilarious takeaway is that for these particular settings, due to rounding, size 10 and size 11 cities in the same empire will always have identical number of cities maintenance.
Fake edit:
I didn't see the part about City Rank in the code, if true, it looks like it would add 1 to approximately half the cities randomly, skewed toward the cities with higher City Rank. That makes sense because otherwise the rounding is in favor of the player, and we can't have that, but on the other hand, it didn't appear in any of the 8 examples, and some of those have a quite high City Rank...
Real Edit:
I still don't see anything in the code for the Maintenance that references City Rank. It also occurs to me that the City Rank adjustment would be a wild overcompensation for the rounding errors in the player's favor - the rounding errors save around .02 .2 gold per city on average, the City Rank thing would cost .5 per city on average. It further occurs to me that the City Rank adjustment entirely makes sense in the non-BTS days, when city maintenance was rounded off to whole numbers rather than hundredths, and that rounding really would have saved a full .5 gold per city. Unless an example city is found with 1 gold too much number of city maintenance, I'm thinking the City Rank adjustment is gone in BTS.
It appears Civ4HandicapInfo.xml tells me the max for this is 7, not 6. This meshes with what I found in CvCity.cpp
I believe the full formula is
floor( floor( floor(100 * (pop + 17) / 18) * 90 / 100) * 20 / 100) * number of cities / 100
The 90 is the difficulty modifier, the 20 is the world size modifier.
This produces the correct answer for all 8 cities posted above. If it doesn't produce the correct answer for anything (I'm a little worried about my assumptions about rounding since all the test cases are with 20 cities), let me know and I'll take another look.
However, I notice I'm confused about the implications of this. Everything I've read about this refers to a conqueror's plateau. It's more of a conquerer's... slowly leveling off slope, unless my understanding of this is mistaken. For example, for Adventure One to hit the max of 7 maintenance given a size of 14, we would need 24 cities. Okay, so the 25th city doesn't add maintenance to Adventure One. Great. But it still adds maintenance to all the cities of size less than 14. If we add 10 cities in the war, the 30th city will add maintenance to all cities of size 8 or less. The nice thing is that it does drop off pretty quickly, but it's not a cliff like most reference materials seem to indicate.
Here's the number of cities that maxes number of city maintenance for different size cities
Population | Number of Cities to max maintenance (7) |
---|---|
16 | 22 |
15 | 23 |
14 | 24 |
13 | 25 |
12 | 25 |
11 | 26 |
10 | 26 |
9 | 28 |
8 | 30 |
7 | 31 |
6 | 32 |
5 | 34 |
4 | 35 |
3 | 37 |
2 | 39 |
1 | 39 |
The important takeaway is that there isn't a magic number of cities, abusing this mechanic is a product of having an empire both wide and tall, and the dozen or so cities we're going to pick up in the next 15-20 turns is going to be really expensive as it pushes our entire core to the cap of 7, and the new cities will quickly reach the cap as well, but after that, it's all gravy.
The hilarious takeaway is that for these particular settings, due to rounding, size 10 and size 11 cities in the same empire will always have identical number of cities maintenance.
Fake edit:
I didn't see the part about City Rank in the code, if true, it looks like it would add 1 to approximately half the cities randomly, skewed toward the cities with higher City Rank. That makes sense because otherwise the rounding is in favor of the player, and we can't have that, but on the other hand, it didn't appear in any of the 8 examples, and some of those have a quite high City Rank...
Real Edit:
I still don't see anything in the code for the Maintenance that references City Rank. It also occurs to me that the City Rank adjustment would be a wild overcompensation for the rounding errors in the player's favor - the rounding errors save around .02 .2 gold per city on average, the City Rank thing would cost .5 per city on average. It further occurs to me that the City Rank adjustment entirely makes sense in the non-BTS days, when city maintenance was rounded off to whole numbers rather than hundredths, and that rounding really would have saved a full .5 gold per city. Unless an example city is found with 1 gold too much number of city maintenance, I'm thinking the City Rank adjustment is gone in BTS.