How to compute number and size of cities basing on demography?

LDeska

LDeska
Joined
Jan 22, 2003
Messages
415
Location
Poland
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:

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 :P
 
Just as a pointer - you can find out exactly how many cities an opponent has by opening the trade window (or using Civ Assist)
 
@RFHolloway - hmm I didn't know that - is it new feature in BtS or it was always like you wrote?
Can you post exactly how to check the count of cities?
 
I was wondering why he had read the Civ 4 manual, and not Civ 3.

Regardless, RFHolloway, I am pretty sure diplo only shows you cities you can see- if they are covered by fog, I do not think they will show up.
 
Regardless, RFHolloway, I am pretty sure diplo only shows you cities you can see- if they are covered by fog, I do not think they will show up.

This is certainly not true. If an AI will talk to you, then the diplo screen will give you the names of all of their cities, except for their capital.

The only time this doesn't work is if they refuse to talk.
 
Which is the normal situation in MP games for which I use this script :) That's why I bothered with writing of this stuff...
 
Back
Top Bottom