I've never had a problem changing Python... it's not THAT scary. In fact, I've changed Python on more then one occasion in the Wolfshanze Mod to no ill effect... come-on... how hard is it to change two entries from "Horse_archer" to "Horseman". The world will not come to an end, I assure you!Yeah, python is really a pain in the butt. One tab or space too many or few, and your whole game interface can disappear, when editing MainInterface.py. And you get no information on where it went wrong.
I've never had a problem changing Python... it's not THAT scary. In fact, I've changed Python on more then one occasion in the Wolfshanze Mod to no ill effect... come-on... how hard is it to change two entries from "Horse_archer" to "Horseman". The world will not come to an end, I assure you!![]()
def AI_chooseProduction(self,argsList):
pCity = argsList[0]
iInquisitor = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_INQUISITOR" )
iOwner = pCity.getOwner( )
if gc.getPlayer( iOwner ).getStateReligion( ) >= 0:
if pCity.canTrain( iInquisitor, 0, 0 ):
[B]lUnits = PyPlayer( pPlayer.getID( ) ).getUnitList( )[/B]
for iUnit in range( len( lUnits) ):
# if there are any Inquisitors, don't Build one
if pPlayer.getUnit( lUnits[ iUnit ].getID( ) ).getUnitType( ) == iInquisitor:
return False
if self.getRandomNumber( 2 ) == 0:
gc.getMap( ).plot( pCity.getX( ), pCity.getY( ) ).getPlotCity( ).pushOrder( OrderTypes.ORDER_TRAIN, iInquisitor, -1, False, False, False, True )
return True
return False
Boy, that was lucky... Early Flyers really suck!Yes, yes, it's in!!It even shot down an early bomber during trials...
def AI_chooseProduction(self,argsList):
pCity = argsList[0]
pPlayer = gc.getPlayer( pCity.getOwner( ) )
iInquisitor = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_INQUISITOR" )
def AI_chooseProduction(self,argsList):
pCity = argsList[0]
iInquisitor = CvUtil.findInfoTypeNum( gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_INQUISITOR" )
iOwner = pCity.getOwner( )
Frekk is correct, just add the pPlayer line from the first code in his post to the code you have Ninja2.![]()