I was always wondering how is the city population (in thousands) computed basing on city's size. I looked in civ4 sources which are officially shipped with each civ4 copy and found that formula:
Basing in this I've made a simple php script that computes what are the possible combinations of cities sizes and count that fits given total population (taken from demography). My initial script was improved by my friend - sc0rp - and you can use both versions here:
http://forum.kac.org.pl/viewtopic.php?t=4251
Of course it's in Polish, so short translation:
First window contains simple version - it computes all possible cases:
Podaj pole 'populacja' z demografiii (podziel najpierw przez 1000, np. 27 a nie 27000):
means
Enter 'population' field from demography (first divide by 1000, ex. 27 not 27000):
simply enter number and click 'Przelicz' (Compute). If you enter 27, you'll get:
'Lista miast' means 'List of cities'.
The version below is more sophisticated (this one is my script improved by sc0rp). It lets you enter additional data which will let the program to get rid of those almost impossible cases of multiple small cities.
Miasta przeciwnika: (opponent cities)
Nie mniej niz [........] (not less than ...... cities)
Nie wiecej niz [........] (not more than ....... cities )
Ma nie wiecej niz [.......] miast o rozmiarze 1 (Has not more than ... cities of size 1)
Jakie miasta ma przeciwnik: [Dodaj] (What cities do opponent has [Add])
This section allows you to enter those cities which you surely know that opponent has (you see then either on map either in 'Top 5 cities' section of demography).
When you click Dodaj (Add), a new section will show up with following fields:
Rozmiar miasta: [...........] Ilosc miast: [..............]
City size: [...........] Cities count: [..............]
For example let's put '673' as the population, not less than 1 city, not more than 8 cities, not more than 2 cities of size 1, we know that opponent has 1 city of size 7.
Output of this program will be:
I hope you wil find it useful, anyway it was fun to write this small program
Population = [ Size ^ 2,8 ]
Basing in this I've made a simple php script that computes what are the possible combinations of cities sizes and count that fits given total population (taken from demography). My initial script was improved by my friend - sc0rp - and you can use both versions here:
http://forum.kac.org.pl/viewtopic.php?t=4251
Of course it's in Polish, so short translation:
First window contains simple version - it computes all possible cases:
Podaj pole 'populacja' z demografiii (podziel najpierw przez 1000, np. 27 a nie 27000):
means
Enter 'population' field from demography (first divide by 1000, ex. 27 not 27000):
simply enter number and click 'Przelicz' (Compute). If you enter 27, you'll get:
Lista miast: 3,2
Lista miast: 3,1,1,1,1,1,1
Lista miast: 2,2,2,2,1,1,1
Lista miast: 2,2,2,1,1,1,1,1,1,1,1,1
'Lista miast' means 'List of cities'.
The version below is more sophisticated (this one is my script improved by sc0rp). It lets you enter additional data which will let the program to get rid of those almost impossible cases of multiple small cities.
Miasta przeciwnika: (opponent cities)
Nie mniej niz [........] (not less than ...... cities)
Nie wiecej niz [........] (not more than ....... cities )
Ma nie wiecej niz [.......] miast o rozmiarze 1 (Has not more than ... cities of size 1)
Jakie miasta ma przeciwnik: [Dodaj] (What cities do opponent has [Add])
This section allows you to enter those cities which you surely know that opponent has (you see then either on map either in 'Top 5 cities' section of demography).
When you click Dodaj (Add), a new section will show up with following fields:
Rozmiar miasta: [...........] Ilosc miast: [..............]
City size: [...........] Cities count: [..............]
For example let's put '673' as the population, not less than 1 city, not more than 8 cities, not more than 2 cities of size 1, we know that opponent has 1 city of size 7.
Output of this program will be:
Miasta ktore podales sa oznaczone nawiasami kwadratowymi: (Cities which you provided are in brackets)
Lista miast: [7],8,5,2,2,1,1
Lista miast: [7],8,4,4,2,1,1
Lista miast: [7],7,5,5,3,2,1,1
Lista miast: [7],7,5,4,4,3,1,1
Lista miast: [7],6,5,5,5,3
Lista miast: [7],6,5,5,4,3,3,3
I hope you wil find it useful, anyway it was fun to write this small program
