City revolt (anarchy) after capture

sp00n

Prince
Joined
Jan 4, 2007
Messages
371
Yeah, I know that there a certain buildings (and wonders? not sure about that right now) that increase the time until a city is pacified after being captured. But isn't this a bit ... extreme?
83 turns for their former capital (admittetly with a ton of wonders), and a whooping 96 turns for another city that was currently revolting itself as I took it over (and which doesn't have any wonders)?

I'm playing on "normal" game speed, and according to the counter I've had just over 400 turns for the whole game so far. There're some serious issues with that, even on the slowest game speed 96 turns would be way too much.

// Edit
Game version was r4657.
 

Attachments

  • revolt.83.jpg
    revolt.83.jpg
    472.8 KB · Views: 119
  • revolt.96.jpg
    revolt.96.jpg
    458 KB · Views: 161
  • !!sp00n REVOLT - YES PLEASE!!.7z
    !!sp00n REVOLT - YES PLEASE!!.7z
    1.5 MB · Views: 38
The time for the anarchy seems to be defined in CvPlayer.cpp, although not being familiar with the internal structure, I don't see any immediate problems in these pieces of code.
It may be that iOccupationTimeModifier is being assigned some really high number, or that iTeamCulturePercent has some unexpected value (i.e. it becomes negative).
Of course there also may be other locations where the turns are defined. I simply searched for a few possible combinations in the /Sources directory and those looked like the best candidates.

Spoiler :
PHP:
void CvPlayer::acquireCity(CvCity* pOldCity, bool bConquest, bool bTrade, bool bUpdatePlotGroups)
{
	[...]

/************************************************************************************************/
/* Afforess	                  Start		 06/14/10                                               */
/*                                                                                              */
/*                                                                                              */
/************************************************************************************************/
	int iOccupationTimeModifier = 100;
	for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
	{
		if (pOldCity->getNumRealBuilding((BuildingTypes)iI) > 0)
		{
			if (GC.getBuildingInfo((BuildingTypes)iI).getOccupationTimeModifier() != 0)
			{
				iOccupationTimeModifier += GC.getBuildingInfo((BuildingTypes)iI).getOccupationTimeModifier();
			}
		}
	}
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/

	[...]


/************************************************************************************************/
/* Afforess	                  Start		 07/14/10                                               */
/*                                                                                              */
/*                                                                                              */
/************************************************************************************************/
/*
			pNewCity->changeOccupationTimer(((GC.getDefineINT("BASE_OCCUPATION_TURNS") + ((pNewCity->getPopulation() * GC.getDefineINT("OCCUPATION_TURNS_POPULATION_PERCENT")) / 100)) * (100 - iTeamCulturePercent)) / 100);
*/
			int iOccupationTime = GC.getDefineINT("BASE_OCCUPATION_TURNS");
			iOccupationTime += pNewCity->getPopulation() * GC.getDefineINT("OCCUPATION_TURNS_POPULATION_PERCENT") / 100;
			iOccupationTime *= (100 - iTeamCulturePercent) / 100;
			
			iOccupationTime *= std::max(0,iOccupationTimeModifier);
			iOccupationTime /= 100;
			
			pNewCity->changeOccupationTimer(iOccupationTime);
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/

Which is called by
CvUnit::setXY(...)
GET_PLAYER(eNewOwner).acquireCity(pNewCity, true, false, true); // will delete the pointer
in CvUnit.cpp?



And by the way, the two cities I captured earlier from the same AI only had around 11-13 turns of anarchy, which is much more in line.
 
Yeah, I know that there a certain buildings (and wonders? not sure about that right now) that increase the time until a city is pacified after being captured. But isn't this a bit ... extreme?
83 turns for their former capital (admittetly with a ton of wonders), and a whooping 96 turns for another city that was currently revolting itself as I took it over (and which doesn't have any wonders)?

I'm playing on "normal" game speed, and according to the counter I've had just over 400 turns for the whole game so far. There're some serious issues with that, even on the slowest game speed 96 turns would be way too much.

// Edit
Game version was r4657.

One thing in your screenies, you didn't show the Properties tab where Crime and Disease live on the right side of the screen. Nor on the left side, the right most tab, for the "hidden" bldgs that you get from increased Crime, Pollution, disease, etc.. That would've been some good info too.

JosEPh
 
Not much to see there.
According to the save game I've attached above:
Crime is around 200 in Mayapan (83 turns, former capital), the highest value is 361 for water pollution. The special buildings are also pretty standard.
For Cayuga (96 turns) it doesn't even show a crime rate yet, only flammability (which I believe is always the case right after capturing a city). Special buildings are even less than in in Mayapan.

Also, the revolt time seems to fluctuate a bit more than I originally thought (all turn values are from the attached save game as well, so all except for #5 have been slightly higher after directly capturing the city):
Captured city #1: 11 turns
Captured city #2: 13 turns
Captured city #3: 81 turns
Captured city #4: 32 turns
Captured city #5: 96 turns

I can't remember having such high values before.
 
I'd love to see that code block stopped under a debug run on your savegame as the city is captured so the values coming up there can be analyzed. That'd at least point to where the modifier causing the trouble is coming from. I had suspected it might be something to do with the higher populations in C2C but not at those numbers in those screenshots and a quick read of the posted code (thanks spoon!)

One thing that's interesting... isn't there supposed to be a game speed modifier in that equation somewhere?
 
I'd love to see that code block stopped under a debug run on your savegame as the city is captured so the values coming up there can be analyzed. That'd at least point to where the modifier causing the trouble is coming from. I had suspected it might be something to do with the higher populations in C2C but not at those numbers in those screenshots and a quick read of the posted code (thanks spoon!)

One thing that's interesting... isn't there supposed to be a game speed modifier in that equation somewhere?

I just assumed that the BASE_OCCUPATION_TURNS constant was already modified to the game speed, but admittedly I didn't check for that.

And I've now attached a save game immediatly before capturing Cayuga with its 96 turns (yeah, it happened again). You'll just have to destroy one damaged unit to capture it.
 

Attachments

And if we still had Story Tellers in the game you would have been able to quell the anarchy in one turn.:mischief:

Actually I was able to do that in one city with a treasure wagon I captured in another one. :crazyeye:

But yeah, after noticing those turns I did take a good look if I could still build Story Tellers...
 
Story Tellers will be back with a full upgrade line, but one by itself will not get rid of all the anarchy. Great Artists do and will continue to do so.
 
Worst case work around...
Wait 10-15 turns (whatever you think it should be) then WB (edit) in a Great Artist to get rid of the rest.
 
Back
Top Bottom