Is there any way using Python to check the population of a city?

wli4

Chieftain
Joined
Sep 15, 2023
Messages
8
Is there any way using Python to check the population of a city?

Furthermore, is it possible you make the civilization win when they reach a certain population in a city?
 
Is there any way using Python to check the population of a city?
CyCity::getPopulation() sounds like a good match for that.

Furthermore, is it possible you make the civilization win when they reach a certain population in a city?
It shouldn't be hard to do when modding the DLL. There is some code where it loops through all players (or teams?) to test each victory type each turn. It shouldn't be too hard to add a condition there where it loops all cities to see if one of them has a population more than X.

I have no idea how to do that in python through or if it's even possible.
 
CyCity::getPopulation()

is a py connector to the CvCity::getPopulation() .

you can create win condition if you know cpp and the source code for civ4bts.
it should not be that difficault to create such a code.

look for mods from platyping,
he wrote a bunch of special win conditions, i cant recall if there was a population or size win victory.
 
Top Bottom