1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Demographics/etc. modifications

Discussion in 'Civ4 - Creation & Customization' started by Stoklomolvi, Jul 6, 2008.

  1. Stoklomolvi

    Stoklomolvi Chieftain

    Joined:
    Mar 18, 2008
    Messages:
    58
    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.
     
  2. Stoklomolvi

    Stoklomolvi Chieftain

    Joined:
    Mar 18, 2008
    Messages:
    58
    Nobody knows?
     
  3. Dresden

    Dresden Emperor

    Joined:
    Jul 10, 2008
    Messages:
    1,081
    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.
     

Share This Page