How much gold do you earn when capturing a city? What's the mechanic?

beestar

subdeity
Joined
Oct 18, 2005
Messages
1,603
Location
Pacific Standard Time
As the title says - how much gold is earned when a city is captured / razed?

I've observed anywhere from 10s to 100s of gold, and it seems to be a function of how developed the city is. But does "developed" mean population, or buildings, or culture, or something else?

My intuition is that every building that's destroyed in the conquest is converted to gold (multiplying through some factor) but I would have to bette rat (i.e. not incapable of) reading XML to prove it.
 
I think that it depends on not so much on the cities' development but the entire treasury of that nation. Then, maybe the citie's population affects the amount looted (say, if an entire civ's pop. is 20 and gold is 200, a city with size 5 would yield 50 gold, while a just-founded city would have 10 gold or so.)

Just a rough approximation. I may be wrong.
 
I'm not sure the hypothesis matches the observations. I could be wrong, but this would imply

- If I happen to have an empty treasury, then a captured city will earn zero gold for the captor

- Gold would actually be _removed_ from my treasury when a city is captured (and I don't think I've seen this)

- Most of the time the AI seems to have little cash on hand, yet I can capture >100 gold from its cities.
 
i dont think it has much (if anything) to do with treasury size. cause i have captured capitals in the BCs and got couple of hundred gold. AIs don't tend to have that much later on, let alone at 1000BC. i would bet that population is the main driving force.
 
cause i have captured capitals in the BCs and got couple of hundred gold

People already have great merchants by then, as well as failed wonders so there is bound to be hundreds of gold around.

Gold is a result of treasury, divided by number of cities and is dependant on the size of the city you take. Works similar for Steal Gold from your spy menu. Your optimum case is to steal, or capture from a civ that has a very large treasury, but a very small number of cities.
 
Does anyone know how capture-gold works?

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.
 
Thanks V.o.U, that's really useful! So cities with large populations will earn the most iCaptureGold (on average).

Now that I know what to look for, I had a quick search through the game files. The DoCityCaptureGold function is called by CvPlayer.cpp and it looks like that gold is magicked out of nowhere, and allocated to the captor. Nothing is subtracted from the victim, and my idea of building destruction being converted to gold is wrong.

I wonder if there's a way to exploit this - the only way seems to be to gift large, high-population cities to the AI, and then capture them back for the gold. You'd have to wait 50 turns to get maximum gold, which makes it a poor investment. Oh well ....
 
You would lose your culture buildings, and even without the 50 turn delay, you'd have to wait for your BIG city to come out of anarchy, as well, etc. Actually, if you had a BIG city, why not whip a lot of commerce producing stuff if you want/need it so bad anyhow?
 
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.

Isn't it the trade routes and money earned from import and export, captured city have no trade routes (the one before you razed the imp. and exp.) , so, you earn no gold?
 
I think that is so. But once it comes out of anarchy, you get back the imp/exp, and usually it isn't towards your advantage. Sometimes it's better to raze a city and build a new one.
 
But once it comes out of anarchy, you get back the imp/exp, and usually it isn't towards your advantage.

I'm not sure what you mean by this. Do you mean the trade-routes not to your advantage? If you get 4, but give 5 in return, I don't think it's that big a deal to let 1 slide. You also have the option to cut-borders.
 
Cities with Red Light Districts have the biggest pay out.
 
Back
Top Bottom