primordial stew
Emperor
I've been playing civ under win7rc x64 recently and noticed that RoM generally works, but in particular Ranged Bombardment does not, Super Spies, and the building upgrade paths. I thought maybe I'd misconfiguration it somehow, but now I'm playtesting RFRE and am seeing exceptions on code that works fine in XP. So I'm suspecting that the PythonErr.log for RoM would be littered with faults.
I've try/except'ed the faulting parts in the elif, but not in the if part yet.
Faults are also generated regularly now deleting a civ's units too. For example when Teutonari falls to end the Cimbrian War a function kills off all of the their units (killall can't be used from some hooks due to the fault deleting the final unit, so each must be deleted separately).
I haven't installed the dll debug env in this os yet, but I'm disconcerted that my code is somehow not OS-independent!
Does anyone else see this?
I've try/except'ed the faulting parts in the elif, but not in the if part yet.
Code:
pAssimPlayer = gc.getPlayer(self.iItaliaID)
apCityList = PyPlayer(self.iRomanID).getCityList()
for pCity in apCityList:
cityName = pCity.getName()
CvUtil.pyPrint('check city: %s' %(cityName) )
if( cityName == 'Corfinium' ) :
pAssimPlayer.acquireCity( pCity.GetCy(), False, True )
rfreUtils.switchSides(self.iItaliaID,self.iRomanID,pCity.getX(),pCity.getY())
### make this the capital
pCity.GetCy().setHasRealBuilding(iBldgID, True)
# void (int PlayerTypes eIndex, int iNewValue, bool bPlots)
# pCity.GetCy().setCulture( 1, true )
pCity.setCulture(self.iItaliaID, 100 )
pAssimPlayer.initUnit(self.iMariusID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
pAssimPlayer.initUnit(self.iMilesSociiID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_COUNTER)
pAssimPlayer.initUnit(self.iVeliteID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
pAssimPlayer.initUnit(self.iEquesID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_COUNTER)
iRand = self.getRand(len(listOfItaliaIDs))
pAssimPlayer.initUnit(listOfItaliaIDs[iRand], pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
for [radius,pPlot] in RevUtils.plotGenerator( pCity.plot(), 1 ) :
pPlot.setCulture( self.iItaliaID, 100, True )
elif( cityName == 'Capua' or cityName == 'Pisae' or cityName == 'Neapolis' or cityName == 'Tarentum' ) :
rfreUtils.switchSides(self.iItaliaID,self.iRomanID,pCity.getX(),pCity.getY())
pAssimPlayer.acquireCity( pCity.GetCy(), False, True )
##### this worked fine on xp, but on win7 it faulted
try:
pCity.GetCy().setHasRealBuilding(iBldgID, False)
except:
CvUtil.pyPrint('setHasRealBuilding failed for city: %s' %(cityName) )
##### this worked fine on xp, but on win7 it faulted
try:
pCity.setCulture(self.iItaliaID, 100 )
except:
CvUtil.pyPrint('setCulture failed for city: %s' %(cityName) )
iRand = self.getRand(len(listOfItaliaIDs))
pAssimPlayer.initUnit(listOfItaliaIDs[iRand], pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
iRand = self.getRand(len(listOfItaliaIDs))
pAssimPlayer.initUnit(listOfItaliaIDs[iRand], pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_CITY_DEFENSE)
for [radius,pPlot] in RevUtils.plotGenerator( pCity.plot(), 1 ) :
pPlot.setCulture( self.iItaliaID, 50, True )
Faults are also generated regularly now deleting a civ's units too. For example when Teutonari falls to end the Cimbrian War a function kills off all of the their units (killall can't be used from some hooks due to the fault deleting the final unit, so each must be deleted separately).
I haven't installed the dll debug env in this os yet, but I'm disconcerted that my code is somehow not OS-independent!
Does anyone else see this?