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
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>