UPDATE The formula has changed as of the March 2011 patch, it is now
(city population * 1.1) + (capital population * .15) - 1
for each city connected to the capital, not including the capital.
- The Machu Pichu wonder increases the modifier by 20%, to
(city population * 1.3) + (capital population * .15) - 1
.
- Arabia increases the constant by 1, to
(city population * 1.1) + (capital population * .15)
(thanks WillfulWizard).
The economic overview also gives a far better explanation of how it is calculated - in other words, this question is now trivially solved by simply looking at that economic overview :)
Original answer below.
Okay, I did a bit more testing, and bwarner's answer is almost accurate:
Each city, excluding the capital, provides (city's population * 1.25) + 0.01
gold per turn. Owning the Machu Pichu wonder increases the modifier by 20%, to (population * 1.5) + 0.01
, for all the cities.
The capital does not provide any gold.
The 1.25 and 0.01 can be seen in the Assets\Gameplay\XML\GlobalDefines.xml
file:
<Row Name="TRADE_ROUTE_BASE_GOLD">
<Value>1</Value>
</Row>
<Row Name="TRADE_ROUTE_CAPITAL_POP_GOLD_MULTIPLIER">
<Value>0</Value>
</Row>
<Row Name="TRADE_ROUTE_CITY_POP_GOLD_MULTIPLIER">
<Value>125</Value>
</Row>
The economic overview also demonstrates these values.
I couldn't find any other factor which affects these values, and I checked different difficulty levels, different distances between cities, different city route type (road vs railroad, road/railroad vs harbor), different city health and whether it is occupied. Looks like it's solely the population.
While technically you don't need to have a lot of cities, most victory conditions will get easier if you have a sizable empire. This doesn't mean you have to build as many cities as you can fit, but it does mean that you should try to have as many or more cities as your opponents.
The major exception is Cultural. Because the cost of social policies increases based on the number of cities you have, this victory actually gets harder if you control more than 3 or 4 cities. The key here is that puppeted cities do not increase social policy cost, but they do contribute to culture points, so you want to have as many puppeted cities as possible.
Best Answer
You'll want to check out the resources and happiness tab on the Economic Overview, since the exact formula varies depending on map size and culture bonuses. It also changes sometimes in patches.
The base formula as of this time is 3 per city, and one per population (Or 1.34 for occupied cities). You can also find/change these values in the GlobalDefines.XML file.
The modifiers for map size are found in CIV5Worlds.XML. As of this time, all levels use the values above except for Large (80% of the above values) and Huge (60% of the above values). This affects both population and city unhappiness equally.
In terms of evaluating Gandhi's ability, keep in mind that the maximum happiness you can gain from a city is equal to its population. So for anyone else, you can never do better than -3 happiness per city (without culture bonuses). For Gandhi, you start at -6, but at 12 population you could theoretically have a net 0 happiness from the city. So Gandhi can theoretically have MORE cities than others, even though the intent is to encourage you to have fewer.