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.
First of all, you can just sell them if you don't need them. Not only do you immediately get some gold, you also decrease the number of units you own, and units cost gold each turn.
Secondly, connecting a city to the capital by railroads greatly increases a city's production, so if you can afford it it's recommended.
Finally, you can replace improvements you don't need / want with other improvements. For instance, for cities that are big enough it's probably better to replace farms with mines or trading posts.
You can set your workers to "automate", and they will automatically build roads, replace them with railroads if available, and will replace improvements with other improvements the AI thinks you need more.
Best Answer
Regarding passing through another civ or city-states territory:
Trade routes can pass through other civs as long as you have open borders agreement from them. Trade routes do not work through a civ you're in war with, even though technically your units can pass within their borders.
Regarding city-states, it works of you are either friends or allied with them.
Regarding passing through an actual city:
I believe it's precisely the same as the above - your road passing through the actual city shouldn't make a difference, except for saving you money, since cities count as road tiles.