def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
###from here
pPlayer = gc.getPlayer(iOwner)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_WHATEVER"))>0:
iStateReligion = pPlayer.getStateReligion ()
if iStateReligion>=0:
if not pCity.isHasReligion(iStateReligion):
pCity.setHasReligion(iStateReligion,True,True,True)
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
But you told me that it should look like this:
Code:def onCityAcquiredAndKept(self, argsList): 'City Acquired and Kept' iOwner,pCity = argsList ###from here pPlayer = gc.getPlayer(iOwner) if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_WHATEVER"))>0: iStateReligion = pPlayer.getStateReligion () if iStateReligion>=0: if not pCity.isHasReligion(iStateReligion): pCity.setHasReligion(iStateReligion,True,True,True)
Does that mean I am leaving this line, from the first set of code, out?
Code:CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
Sorry if this is an obvious thing, but I basically have no idea what I am doing.
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
###from here
pPlayer = gc.getPlayer(iOwner)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_WHATEVER"))>0:
iStateReligion = pPlayer.getStateReligion ()
if iStateReligion>=0:
if not pCity.isHasReligion(iStateReligion):
pCity.setHasReligion(iStateReligion,True,True,True)
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
###from here
pPlayer = gc.getPlayer(iOwner)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_WHATEVER"))>0:
iStateReligion = pPlayer.getStateReligion ()
if iStateReligion>=0:
if not pCity.isHasReligion(iStateReligion):
pCity.setHasReligion(iStateReligion,True,True,True)
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
Alright, and I have another question. For the Help line I want the text to say.
Spreads [state religion icon] to conquered cities.
How do I accomplish that? Obviously I want the [state religion icon] bit to show the religious symbol. So if you are Christian it would be a cross.
Spreads %F2_Religion to conquered cities.
Spreads your state [RELIGION_ICON] to conquered cities.
def onCityAcquired(self, argsList):
'City Acquired'
iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList
CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName()))
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
###from here
pPlayer = gc.getPlayer(iOwner)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CRUSADE"))>0:
iStateReligion = pPlayer.getStateReligion ()
if iStateReligion>=0:
if not pCity.isHasReligion(iStateReligion):
pCity.setHasReligion(iStateReligion,True,True,True)
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
def onCityLost(self, argsList):
'City Lost'
city = argsList[0]
player = PyPlayer(city.getOwner())
its part of a mod im workin on - the full names are too long. If it would be too dificult i wont bother. I just thought itd be fairly straightforward
You see, that you have 2 times def onCityAcquiredAndKept(self, argsList): there, right?
Remove this and the 2 following lines, and then it should work.
Code:def onCityAcquired(self, argsList): 'City Acquired' iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName())) [COLOR="Red"]def onCityAcquiredAndKept(self, argsList):[/COLOR] 'City Acquired and Kept' iOwner,pCity = argsList ###from here pPlayer = gc.getPlayer(iOwner) if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CRUSADE"))>0: iStateReligion = pPlayer.getStateReligion () if iStateReligion>=0: if not pCity.isHasReligion(iStateReligion): pCity.setHasReligion(iStateReligion,True,True,True) CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName())) def onCityLost(self, argsList): 'City Lost' city = argsList[0] player = PyPlayer(city.getOwner())
Could this have anything to do with having BUG as part of my mod?
def onCityAcquired(self, argsList):
'City Acquired'
iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList
CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName()))
[COLOR="Red"]def onCityAcquiredAndKept(self, argsList):[/COLOR]
'City Acquired and Kept'
iOwner,pCity = argsList
###from here
pPlayer = gc.getPlayer(iOwner)
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CRUSADE"))>0:
iStateReligion = pPlayer.getStateReligion ()
if iStateReligion>=0:
if not pCity.isHasReligion(iStateReligion):
pCity.setHasReligion(iStateReligion,True,True,True)
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
def onCityLost(self, argsList):
'City Lost'
city = argsList[0]
player = PyPlayer(city.getOwner())
Flavian Amphitheatre: Use tsentom's Flavian Amphitheatre as base, and change the things related to buildings to units.
For Petra, use tsentom's Great Mosque Of Djenne or the Ice Hotel, and change the values.
Sydney Opera House: That's just XML .
Trafalgar Square: Should also be just XML .