Demographics/etc. modifications

Stoklomolvi

Chieftain
Joined
Mar 18, 2008
Messages
59
Is it possible in any way to modify the demographics screen, purely for aesthetic reasons? I find it rather unrealistic how a huge nation that encompasses the entire globe on a huge Pangaea map usually has a few hundred million people and no more, when in reality the world of today has over 6.6 billion and earth would be considered a "standard size map", most likely.
 
The population values on the demographics screen and in the occasional congratulatory pop-ups you get come from the SDK function CvCity::getRealPopulation() which is defined in CvCity.cpp:
Code:
long CvCity::getRealPopulation() const
{
	return (((long)(pow((float)getPopulation(), 2.8f))) * 1000);
}
In order to change that function, you'll have to recompile the DLL. If that's a bit more than you want to tackle, you could alternatively edit the Python file screens\CvInfoScreen.py which creates the demographics screen and look for the following section:
Code:
				iValue = pCurrPlayer.getRealPopulation()
				if iPlayerLoop == self.iActivePlayer:
					iPopulation = iValue
				else:
					iPopulationGameAverage += iValue
				aiGroupPopulation.append((iValue, iPlayerLoop))
You could then comment out the first line there and insert your own method for calculating the "real" population for each player instead.
 
Top Bottom