omegaflames
Warlord
- Joined
- Sep 21, 2012
- Messages
- 181
Downloaded and installed FallfromHeaven2041n, FfH2041o, and more_naval_ai__for_ffh2__v2_53_patch (and I'm running BTS 3.19). Made a copy of the entire FFH2 so I could add my modmod of it to it and after getting all the files updated (I used the compare plugin of notepad++ to see what was different since MNAI has been updated since I last played with FFH2). Now I'm not getting any python errors from Civ4 but BUG is tossing up an error in the ingame messages every time a unit moves.
in cveventmanager.py i have
I can't find anything wrong with my code and I can't figure out how to get BUG to actually log anything no matter what settings I give it under the logging tab in its options. Any help figuring out what I'm doing wrong or a pointer to how to decode that BUG error message would be appreciated.
edit: these are my settings (sry the pics are so big imgur blows them up sometimes)
Code:
Error in unitmove event handler <bound method cveventmanager.onunitmove of <BUGeventmanager.BUGeventmanager instanace at 0xe0971148>>
Code:
def onUnitMove(self, argsList):
'unit move'
pPlot,pUnit,pOldPlot = argsList
player = PyPlayer(pUnit.getOwner())
unitInfo = PyInfo.UnitInfo(pUnit.getUnitType())
if player.isHuman() == False:
if pUnit.getOwner() == pPlot.getOwner():
if pUnit.canCast(gc.getInfoTypeForString('SPELL_SPRING'), False):
pUnit.cast(gc.getInfoTypeForString('SPELL_SPRING'))
if pUnit.canCast(gc.getInfoTypeForString('SPELL_SCORCH'), False):
pUnit.cast(gc.getInfoTypeForString('SPELL_SCORCH'))
if pUnit.canCast(gc.getInfoTypeForString('SPELL_SNOWYDAY'), False):
pUnit.cast(gc.getInfoTypeForString('SPELL_SNOWYDAY'))
# if player and unitInfo:
# CvUtil.pyPrint('Player %d Civilization %s unit %s is moving to %d, %d'
# %(player.getID(), player.getCivilizationName(), unitInfo.getDescription(),
# pUnit.getX(), pUnit.getY()))
if (not self.__LOG_MOVEMENT):
return
edit: these are my settings (sry the pics are so big imgur blows them up sometimes)