Python Question - City Populations

Jeckel

Great Reverend
Joined
Nov 16, 2005
Messages
1,637
Location
Peoria, IL
Alright, I am working with setting up more specific religion info for cities's populations. I found the CyCity method 'getRealPopulation()' which returns the long population number that can be seen ingame by entering a city screen and putting your pointer over the name of the city at the top of the scrreen.

If anyone can help, I have a few questions about this value.

1) Is there a way to set and/or change this value?

2) Is it a real value or a side effect. In other words, does it change when the main pop value goes up or vise versa?

3) I've noticed that this value follows this form
pop - real Pop
1 - 1,000
2 - 6,000
3 - 21,000
4 - 48,000
5 - 90,000
ect... So does anyone know where this info is stored? Is it in an xml file somewhere or is it stuck away in the sdk?

Any help would be appriceated. :)
 
The population gets calculating using this line in the SDK

(((long)(pow((float)getPopulation(), 2.8f))) * 1000)
 
Bear with me here, its been a few years since I've taken any kind of math classes or done any cpp codeing. I get the multiplyed by 1000 part and I am guessing that pow() is taking getPopulation() to a power of 2.8, but what is the 'f' after 2.8?
 
Its marking the 2.8 as a float.

A float is a number with a decimal in it.
 
Top Bottom