No I get no error messages, the python code just doesn't seem to work or even particularly register in the game? at one point I tried to change it so the excavator couldn't found anywhere just to see if it works but that didn't do anything either.
that is the gameutil code. would you like me to send you the files? so I haven't done uploading files onto here yet so I don't know how it is done?
the 'excavator' is my unique settler and the ruins are referring to your ruined city features I know that normally you can't settle there but i disabled it for now its really just a place holder to get the code to work then I will replace it with a new piece of terrain. I also tried it with 'Forest' feature instead to see if it was a problem with the ruin, but it didn't work either, the excavator just founds anywhere?
Like I said if you need files I'll send it to you some how just let me know what to do and I'll get straight on it.
thanks a lot this is one of the two bits of python code that i need to really make my mod work the way I would like it to. Everything else I can think of so far is xml and i can do that without too much difficulty.
Code:
def cannotFoundCity(self,argsList):
iPlayer, iPlotX, iPlotY = argsList
pPlot = CyMap().plot(iPlotX, iPlotY)
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if pUnit.getUnitType() == gc.getInfoTypeForString('UNIT_SETTLER'): return False
elif pUnit.getUnitType() == gc.getInfoTypeForString('UNIT_EXCAVATOR'):
if pPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_RUIN'): return False
return True
that is the gameutil code. would you like me to send you the files? so I haven't done uploading files onto here yet so I don't know how it is done?
the 'excavator' is my unique settler and the ruins are referring to your ruined city features I know that normally you can't settle there but i disabled it for now its really just a place holder to get the code to work then I will replace it with a new piece of terrain. I also tried it with 'Forest' feature instead to see if it was a problem with the ruin, but it didn't work either, the excavator just founds anywhere?
Like I said if you need files I'll send it to you some how just let me know what to do and I'll get straight on it.
thanks a lot this is one of the two bits of python code that i need to really make my mod work the way I would like it to. Everything else I can think of so far is xml and i can do that without too much difficulty.