DarkC
Chieftain
- Joined
- May 8, 2012
- Messages
- 55
there are a few settler mods out there that i want to combine to my mod. so, in my mod's CvEventManager.py, i entered the command
which works and gives 2pop when the unit settler wagon builts a city. the problem is, i also want this unit to give free buildings when it builts a city. i tried to add
but not only it doesn't add anything, it also disables the above 2pop command. is there a way to connect/bridge these two commands?
edit: the smilies were placed there to adjust the command lines in correct place since space didn't seem to work
Spoiler :
def onCityBuilt(self, argsList):
'City Built'
city = argsList[0]
pUnit = CyInterface().getHeadSelectedUnit()
if pUnit.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SETTLER_WAGON"):
city.setPopulation(2)
'City Built'
city = argsList[0]
pUnit = CyInterface().getHeadSelectedUnit()
if pUnit.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SETTLER_WAGON"):
city.setPopulation(2)
which works and gives 2pop when the unit settler wagon builts a city. the problem is, i also want this unit to give free buildings when it builts a city. i tried to add
Spoiler :
def onCityBuilt(self, argsList):
'City Built'
city = argsList[0]
pUnit = CyInterface().getHeadSelectedUnit()
if pUnit.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SETTLER_WAGON"):
city.setPopulation(2)
_addBuilding(city, "BUILDINGCLASS_BARRACKS")
'City Built'
city = argsList[0]
pUnit = CyInterface().getHeadSelectedUnit()
if pUnit.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SETTLER_WAGON"):
city.setPopulation(2)
_addBuilding(city, "BUILDINGCLASS_BARRACKS")but not only it doesn't add anything, it also disables the above 2pop command. is there a way to connect/bridge these two commands?
edit: the smilies were placed there to adjust the command lines in correct place since space didn't seem to work

. any idea what is missing?