OrionVeteran
Deity
Hey Orion, I was wondering if you could help me with this bug:
In my mod, I've included this modcomp, and had no problems until now. The only changes I've made since I last had a working copy that could be relevant are:
1) I changed the position of the Holy Office Building in the XML so it's right after the monasteries
2) I deleted the Holy Offices of all religions except Judaism, Christianity, and Islam (Judaism=Protestantism in my mod)
3) I added a religion (Zoroastrianism)
So here's the bug:
Code:Traceback (most recent call last): File "CvScreensInterface", line 736, in forceScreenRedraw File "CvMainInterface", line 789, in redraw File "CvMainInterface", line 1712, in updateSelectionButtons File "OIM", line 799, in showInquisitionButton File "OIM", line 144, in getReligionInquisitor File "OIM", line 129, in getReligionHolyOffice AttributeError: 'NoneType' object has no attribute 'getPrereqReligion' ERR: Python function forceScreenRedraw failed, module CvScreensInterface
And the offending bit of code:
Code:def getReligionHolyOffice(iPlayer, iReligion): # Orion's Inquisition Mod # Returns the Holy Office Name for the specified Religion pPlayer = gc.getPlayer(iPlayer) pCivilization = gc.getCivilizationInfo(pPlayer.getCivilizationType()) for iBuildingClass in range(gc.getNumBuildingClassInfos()): kBuilding = gc.getBuildingInfo(pCivilization.getCivilizationBuildings(iBuildingClass)) if kBuilding.getPrereqReligion() == iReligion: iBuilding = pCivilization.getCivilizationBuildings(iBuildingClass) #CyInterface().addImmediateMessage("C", "") if gc.getBuildingInfo(iBuilding).getSpecialBuildingType() == gc.getInfoTypeForString("SPECIALBUILDING_HOLY_OFFICE"): MyHolyOfficeName = gc.getBuildingInfo(iBuilding).getType() #CyInterface().addImmediateMessage(str(MyHolyOfficeName), "") return MyHolyOfficeName break
Any ideas?
Yup. Put the Holy Offices back in. Failure to do so would require some Python changes.