platyping
Sleeping Dragon
@Zlako
It is no longer done that way.
@isenchine
The script data will break the maininterface
It is no longer done that way.
@isenchine
The script data will break the maininterface
As in build stuff, heal units, grant culture etc? Nope
#Religion
iCapitol =gc.getInfoTypeForString("BUILDING_CAPITOL")
if iBuildingType != iCapitol: return
iPlay = pCity.getOwner()
pPlay = gc.getPlayer(iPlay)
# Perform string operation to get corresponding religion name, eg
# "TXT_KEY_CIV_HOPEVLLE_DESC" => "RELIGION_HOPEVILLE"
# For v11, fix bug found by Dresden, v10 feedback thread, post 5
# Was: sCivdesc = pPlay.getCivilizationDescriptionKey()
pCiv = gc.getCivilizationInfo(pPlay.getCivilizationType())
sCivdesc = pCiv.getTextKey()
sReldesc = sCivdesc.replace("TXT_KEY_CIV_", "RELIGION_")
sReldesc = str(sReldesc.replace("_DESC", ""))
iRel = gc.getInfoTypeForString(sReldesc)
if iRel != -1:
CyGame().setHolyCity(iRel, pCity, 1)
pPlay.convert(iRel)
Logger.writeLog(gc.getReligionInfo(iRel).getText() + " founded\n")
else:
Logger.writeLog("Unable to convert " + sCivdesc + " to religion\n")