Assets\Python\CvGameUtils.py
Code:
def doCityCaptureGold(self, argsList):
"controls the gold result of capturing a city"
pOldCity = argsList[0]
iCaptureGold = 0
iCaptureGold += gc.getDefineINT("BASE_CAPTURE_GOLD")
iCaptureGold += (pOldCity.getPopulation() * gc.getDefineINT("CAPTURE_GOLD_PER_POPULATION"))
iCaptureGold += CyGame().getSorenRandNum(gc.getDefineINT("CAPTURE_GOLD_RAND1"), "Capture Gold 1")
iCaptureGold += CyGame().getSorenRandNum(gc.getDefineINT("CAPTURE_GOLD_RAND2"), "Capture Gold 2")
if (gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS") > 0):
iCaptureGold *= cyIntRange((CyGame().getGameTurn() - pOldCity.getGameTurnAcquired()), 0, gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS"))
iCaptureGold /= gc.getDefineINT("CAPTURE_GOLD_MAX_TURNS")
return iCaptureGold
Assets\XML\GlobalDefines.xml
Code:
BASE_CAPTURE_GOLD = 20
CAPTURE_GOLD_PER_POPULATION = 10
CAPTURE_GOLD_RAND1 = 50
CAPTURE_GOLD_RAND2 = 50
CAPTURE_GOLD_MAX_TURNS = 50
If I'm translating this correctly, the amount of gold you would get is scaled back by how long the city has been under the previous players control - when you recapture one of your cities on the same turn, for instance, you should get no gold. From what I can see, that 50 turn count is absolute (does not scale with game speed).
But otherwise: 20 + 10 * pop + two dice rolls.