City Pacification Time

Geomec

Chieftain
Joined
Oct 19, 2015
Messages
3
I was hoping someone could tell me what controls the amount of turns it takes to pacify a conquered city. U would like to be able to change the variables to increase or decrease it depending on the scenarios.
 
From the acquireCity function CvCity.cpp (edited for readability - without much success):
Code:
iTeamCulturePercent = pNewCity->calculateTeamCulturePercent(getTeam());
if (iTeamCulturePercent < GC.getDefineINT("OCCUPATION_CULTURE_PERCENT_THRESHOLD"))
{
    pNewCity->changeOccupationTimer(
     (
      (GC.getDefineINT("BASE_OCCUPATION_TURNS")
       + (pNewCity->getPopulation() * GC.getDefineINT("OCCUPATION_TURNS_POPULATION_PERCENT")) / 100)
     )
     * (100 - iTeamCulturePercent))
     / 100);
}
The city is named "pNewCity" because, technically, a new city object is created upon conquest. To be clear, this code can only be changed by recompiling the DLL. The constants referenced by getDefineINT are easy to change though in Assets\XML\GlobalDefines.xml. CvCity::changeOccupationTimer and CvCity::setOccupation timer are exposed to Python, and there are callbacks onCityAcquired and onCityAcquiredAndKept. So one could probably set the occupation timer arbitrarily through Python code.
 
Top Bottom