adding aiautoplay to cveventmanager

keldath

LivE LonG AnD PrOsPeR
Joined
Dec 20, 2005
Messages
7,578
Location
israel
hey all,

in my mod i use auto ai py,
and currently - its being called from the cvcustomeventmanager,
since the customeventmanger manager conflicts with another mod,


i need to call the ai auto play from the event manager it self.

i ask for your help how to activate the aiautoplay.py,

in the customeventmanager - it does this:
aiautoplay.aiautoplay (self) under event handler.
+ import autoai.

what do i need to add to the regular evntmanager ?

thank you all for any help.
 
Just add autoai into the list of imports at the top of the file and shift all other codes to their respective sections?
 
Whatever is onUnitBuilt, shift to onUnitBuilt of the real eventmanager.
Whatever is onEndTurn, shift to blah blah blah as well?
 
theres nothing to be shifted - this is whats on the cvcustomevent manager:
def __init__(self, *args, **kwargs):
super(CvCustomEventManager, self).__init__(*args, **kwargs)
# map the initial EventHandlerMap values into the new data structure
for eventType, eventHandler in self.EventHandlerMap.iteritems():
self.setEventHandler(eventType, eventHandler)
# --> INSERT EVENT HANDLER INITIALIZATION HERE <--

# --------- Better BTS AI (2/2) -------------
AIAutoPlay.AIAutoPlay(self)

all the rest is in the autoaiplay.py
 
hey bro,

no need - just try to merge :

http://forums.civfanatics.com/downloads.php?do=file&id=21841

to my mod :
http://www.atomicgamer.com/files/105485/beta-version-of-eol-for-civ4 90md only

its a simple merge - 1 python file 4 parts - the eventmanger - from the mod to my mod.

i discovered that the auto ai omported from the cvcustomeventmanager is conflicting with the mod - preventing it from activating.

(you need to set in the mod xml 2 nations from my mod to declare war on each other - say england and the 13colonies, or england on all.

its like 5 min of work to put the two together,

its the making it active thats im stuck on,
so i thought maybe the solution would be to load the aiauto play from the regular event manager -but now - im starting to belive that something in kmods aiautoplay - stops it from working...
 
Back
Top Bottom