The Capo
godless Heathen
Hey guys, I really appreciate the help I got for my last python error but apparently I have another one that is related to it. It also involves the inquisitor unit. Anyway here is what the message said...
file "CvGameInterface", line 185, in AI_unitUpdate
file "CvGameUtils", line 313, in AI_unitUpdate
file "CvGameUtils", line 545, in doInquisitorCore_AI
RuntimeError: unidentifiable C++ exception
The last error I had was the AI deciding to build the Inquisitor, and it is confirmed that they do build them (there was a Zulu Inquisitor in Ulundi), the difference between this python error and the last one is that I don't really know what the error is referring to. So if someone could tell me what exactly this error is that would be helpful. Anyway, here is the code. Starting with CvGameInterface.py, which is the vanilla BtS file. These are lines 182 through 185:
And here lines 311 through 315 in the CvGameUtils.py, which is in the mod so I can edit this file:
And finally lines 539 through 551 of CvGameUtils.py:
Basically in the mod I have fourteen religions, although the extra seven are only available in the 'choose religion' game option. For each religion there is a different Inquisitor, and here is a list of the inquisitors in the python files (in this case CvGameUtils.py, lines 293 through 309):
Anyway there is the information, if anyone sees why this issue is arising, or at least what it is dealing with please let me know. Thank you for your time.
file "CvGameInterface", line 185, in AI_unitUpdate
file "CvGameUtils", line 313, in AI_unitUpdate
file "CvGameUtils", line 545, in doInquisitorCore_AI
RuntimeError: unidentifiable C++ exception
The last error I had was the AI deciding to build the Inquisitor, and it is confirmed that they do build them (there was a Zulu Inquisitor in Ulundi), the difference between this python error and the last one is that I don't really know what the error is referring to. So if someone could tell me what exactly this error is that would be helpful. Anyway, here is the code. Starting with CvGameInterface.py, which is the vanilla BtS file. These are lines 182 through 185:
Code:
def AI_unitUpdate(argsList):
'AI moves units - return 0 to let AI handle it, return 1 to say that the move is handled in python '
#CvUtil.pyPrint( "CvGameInterface.AI_unitUpdate" )
return gameUtils().AI_unitUpdate(argsList)
And here lines 311 through 315 in the CvGameUtils.py, which is in the mod so I can edit this file:
Code:
if not gc.getPlayer( iOwner ).isHuman( ):
if pUnit.getUnitType( ) == iTaoInq or pUnit.getUnitType( ) == iConInq or pUnit.getUnitType( ) == iBudInq or pUnit.getUnitType( ) == iHinInq or pUnit.getUnitType( ) == iJudInq or pUnit.getUnitType( ) == iIslInq or pUnit.getUnitType( ) == iChrInq or pUnit.getUnitType( ) == iOlyInq or pUnit.getUnitType( ) == iAseInq or pUnit.getUnitType( ) == iVooInq or pUnit.getUnitType( ) == iShiInq or pUnit.getUnitType( ) == iZorInq or pUnit.getUnitType( ) == iRaaInq or pUnit.getUnitType( ) == iTolInq:
self.doInquisitorCore_AI( pUnit )
return True
return False
And finally lines 539 through 551 of CvGameUtils.py:
Code:
#Checks religion percents
lReligions = [ ]
bestReligionPercent = 0
iBestReligion = -1
for iReligionLoop in range(gc.getNumReligionInfos( )):
iReligionLevel = gc.getGame().calculateReligionPercent(iReligionLoop)
if iReligionLevel > gc.getGame().calculateReligionPercent(iStateReligion):
lReligions.append( iReligionLoop )
if (iReligionLoop != iStateReligion):
religionPercent = gc.getGame().calculateReligionPercent(iReligionLoop)
if (religionPercent > bestReligionPercent):
bestReligionPercent = religionPercent
iBestReligion = iReligionLoop
Basically in the mod I have fourteen religions, although the extra seven are only available in the 'choose religion' game option. For each religion there is a different Inquisitor, and here is a list of the inquisitors in the python files (in this case CvGameUtils.py, lines 293 through 309):
Code:
def AI_unitUpdate(self,argsList):
pUnit = argsList[0]
iOwner = pUnit.getOwner( )
iTaoInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_TAOIST_INQUISITOR" )
iConInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_CONFUCIAN_INQUISITOR" )
iBudInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_BUDDHIST_INQUISITOR" )
iHinInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_HINDU_INQUISITOR" )
iJudInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_JEWISH_INQUISITOR" )
iChrInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_CHRISTIAN_INQUISITOR" )
iIslInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ISLAMIC_INQUISITOR" )
iOlyInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_OLYMP_INQUISITOR" )
iAseInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ASEN_INQUISITOR" )
iVooInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_VOODOO_INQUISITOR" )
iShiInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_SHINTO_INQUISITOR" )
iZorInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ZORO_INQUISITOR" )
iRaaInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_RA_INQUISITOR" )
iTolInq = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_TOLTEC_INQUISITOR" )
Anyway there is the information, if anyone sees why this issue is arising, or at least what it is dealing with please let me know. Thank you for your time.