Page 1 of 1

Demographics report, population ranking question

Posted: Sat May 30, 2026 2:32 am
by Dino the Dinosore
I have 1 city size 6, and the Japanese (who have shared vision with me) have 4 cities sized 3,2,1,1 (total 7). When I do the demographics report it shows me as #1 in population, which seems wrong. Digging into the code, it's because of this code in common/city.c

Code: Select all

/**********************************************************************//**
 Returns how many thousand citizen live in this city.
**************************************************************************/
int city_population(const struct city *pcity)
{
  /*  Sum_{i=1}^{n} i  ==  n*(n+1)/2  */
  return city_size_get(pcity) * (city_size_get(pcity) + 1) * 5;
}
Why is it essentially squaring the size of the city? Is this a bug or am I missing something?

Re: Demographics report, population ranking question

Posted: Sat May 30, 2026 4:37 am
by cazfi
Each point of city size brings more population than the previous one.

Squaring the size for the score might be a bit extreme, but one big city is supposed to give more points than many small cities.