<Nexus>
Traveler of the Multiverse
Maybe I should ask this here too, so...
I tried to change how Palace works: You don't start with one but has a tech requirement and you have to build it.
But once I (or the AI) settle the first city there is an error appearing on screen. Its not fatal but annoying.
I think I have found the source of the error. In RevEvents.py I've found this code:
When I tagged out this part of the code no error occurred when settling the first city.
I am a noob for python but I understand that this code is checking for the civ's capital which does not exist.
So how could it be changed without breaking the original purpose of the code but give no error message for settling first city?
I tried to change how Palace works: You don't start with one but has a tech requirement and you have to build it.
But once I (or the AI) settle the first city there is an error appearing on screen. Its not fatal but annoying.
I think I have found the source of the error. In RevEvents.py I've found this code:
Code:
def onCityBuilt( argsList ):
'City Built'
city = argsList[0]
RevData.initCity( city )
pPlayer = gc.getPlayer( city.getOwner() )
if( pPlayer.isBarbarian() ) :
city.setRevolutionIndex( int(.4*RevOpt.getAlwaysViolentThreshold()) )
city.setRevIndexAverage(city.getRevolutionIndex())
return
if( not city.area().getID() == pPlayer.getCapitalCity().area().getID() ) :
city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
else :
city.setRevolutionIndex( int(.25*RevOpt.getInstigateRevolutionThreshold()) )
city.setRevIndexAverage(city.getRevolutionIndex())
revTurn = RevData.revObjectGetVal( pPlayer, 'RevolutionTurn' )
if( not revTurn == None ) :
if( pPlayer.getNumCities() < 4 and game.getGameTurn() - revTurn < 25 ) :
relID = pPlayer.getStateReligion()
if( relID >= 0 ) :
if( LOG_DEBUG ) : CvUtil.pyPrint("Rev - New rebel city %s given rebel religion"%(city.getName()))
city.setHasReligion( relID, True, False, False )
When I tagged out this part of the code no error occurred when settling the first city.
I am a noob for python but I understand that this code is checking for the civ's capital which does not exist.
So how could it be changed without breaking the original purpose of the code but give no error message for settling first city?
