As the title may indicate, I have never worked with python before and I am unable to get this script to work.
It modifies the file CvEventManager.py in the mods python directory, the dawn of man popup shows and the city is founded with the correct population, but no buildings are added there. So can you see whats wrong with it?
Code:
def onGameStart(self, argsList):
'Called at the start of the game'
if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if (player.isAlive() and player.isHuman()):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
popupInfo.setText(u"showDawnOfMan")
popupInfo.addPopup(iPlayer)
pStartPlot = player.getStartingPlot()
plotx = pPlot.getX()
ploty = pPlot.getY()
player.found(plotx, ploty)
pCity = player.getCity(0)
if player.hasTrait(gc.getInfoTypeForString('TRAIT_CITY_STATE')):
pCity.setPopulation(3)
pCity.setHasRealBuilding(gc.getInfoTypeForString('BUILDING_ORGANIZED_MANUFACTURE'), true)
pCity.setHasRealBuilding(gc.getInfoTypeForString('BUILDING_ADVANCED_ANCESTORS'), true)
It modifies the file CvEventManager.py in the mods python directory, the dawn of man popup shows and the city is founded with the correct population, but no buildings are added there. So can you see whats wrong with it?