Sto
Should i code today ...
Firstly, here how I integrate elements of the play in the map script :
I will like to know if that can cause problems with MODS or Game ? ( CvEventInterface.py specify that you may not import it !)
I will also like to add a button to reveal parts of map. But I do not understand how that goes. Which are the functions python which make it possible to reveal plots with the players or change fog of war attributes ? (Those which I tested until now do not give anything ) . Or where I could find an example ? (I did not find any in the forum .)
Thanks !
Code:
import CvEventInterface
if hasattr(CvEventInterface.getEventManager(),'EventHandlerMap'):
originalEventHandlerMap=getattr(CvEventInterface.getEventManager(),'EventHandlerMap')
try:
if 'GameStart' in originalEventHandlerMap.keys():
if originalEventHandlerMap['GameStart']==CvEventInterface.getEventManager().onGameStart:
def NewAttribFunc(b):
import Sto_Chess
Sto_Chess.StoAddGameElements()
originalEventHandlerMap=getattr(CvEventInterface.getEventManager(),'EventHandlerMap')
originalEventHandlerMap['GameStart']=CvEventInterface.getEventManager().onGameStart
return CvEventInterface.getEventManager().onGameStart(b)
originalEventHandlerMap['GameStart']=NewAttribFunc
except:
pass
I will like to know if that can cause problems with MODS or Game ? ( CvEventInterface.py specify that you may not import it !)
I will also like to add a button to reveal parts of map. But I do not understand how that goes. Which are the functions python which make it possible to reveal plots with the players or change fog of war attributes ? (Those which I tested until now do not give anything ) . Or where I could find an example ? (I did not find any in the forum .)
Thanks !