Changing Yields only affects new cities?

Eloque

Chieftain
Joined
Dec 13, 2010
Messages
18
I've been trying my hand at modding lately, but I run into a weird thing.

Take the following, I build a mod to have coastal tiles generate 2 food instead of one.
Simple enough, I load the mod, start mod game and found a city on the coast. The icon and numbers make sense, 2 food from the city tile, 2 food from the coastal tile. City has 4 food. Yay!

I save the game and then change the mod to give 3 food. Start Civ again, activate my mod and load my previous game. I can see in the city screen that the icons have changed, the coastal tile now correctly display 3 food icons. However, for some reason the numbers say otherwise. According to those, the city still has 4 food. Huh?

Trying to track down my mistake, I loaded an earlier save game without the city founded. I found the city, now the icons are correct and the number is correct. In this new founded city the food output is 5. Two from city tile, 3 from coastal tile.

Do changes to the xml only matter to new cities? Or I am doing something else wrong here?

For reference, this is my trial code

Code:
	<Terrain_Yields>
		<Update>
			<Set Yield="30"/>
			<Where TerrainType="TERRAIN_COAST" YieldType="YIELD_FOOD"/>
		</Update>
	</Terrain_Yields>
 
Sounds like a bit of a bug but things like this are why it's not a good idea to change things in the database and expect savegame compatibility ;)
 
It's not so much as compatibility as it is for ease of development.

I want to be able to change and tweak the mods and then see the effects in the game. Now I have to restart the game, spawn a city and then I can see the yields. (Even tough they are incorrect)

Is there any way to 'force reload' a mod while in the game? Via the tuner or such?
 
Back
Top Bottom