def onGameStart(self, argsList): 'Called at the start of the game' sd.setup() self.rnf.setup() self.aiw.setup() #self.pla.setup() self.dc.setup() self.rel.setup() self.barb.setup() sd.save() # update unit art styles of independents for iLoopPlayer in range(con.iIndependent, con.iNomad3): unitList = PyPlayer(iLoopPlayer).getUnitList() for pUnit in unitList: UnitArtStyler.updateUnitArt(pUnit) return 0
def onPreSave(self, argsList): 'called before a game is actually saved' sd.save() # edead: pickle & save script data