"Dawn of Man" and "Techsplash" screens no longer appear

Maniac

Apolyton Sage
Joined
Nov 27, 2004
Messages
5,603
Location
Gent, Belgium
After updating my mod to 3.17, these screens stopped appearing after starting a game or researching a tech.

I have no clue whatsoever what could be the cause of this.

Has anyone ever had this happening to them before? Do you what was the cause?? :confused:
 
Hey I thought of a new possibility for what might be wrong right after reading your post.

If I remove my custom CvEventManagerPlanetfall.py (which uses onGameStart and onTechAcquired for instance), the dawn of man and techsplash screen work correctly again. Alternatively, if I copy the python code responsible for creating DawnOfMan and TechSplash into my custom event manager, those screens also work again.

So I guess the way custom event managers interact with the standard event manager has been changed in 3.17 somehow. :confused:
On the other side, for instance Final Frontier, which like basically all Firaxis mods also uses a custom event manager, still has a functional DawnOfMan screen.

You can't copy everthing over though, or it causes python exceptions, eg with self.__BLAHBLAH or CvTopCivs.CvTopCivs().turnChecker(iGameTurn).

Which leaves me wondering if that code in the standard event manager still works correctly now. :hmm:
 
It all depends on how you create the event manager in CvEventInterface.py. Do you create a CvCustomEventManager and then hook up your EM to it, or do you create your specific EM?

First, there is only a single event manager in Civ, and you get to it using CvEventInterface.getEventManager(). Normally this is CvEventManager, and it can only be "extended" by directly modifying it's code.

Another method is to use Dr. Elmer Jiggle's CvCustomEventManager. This EM allows you to connect multiple other EMs to it, or really any other functions you want.
 
Another method is to use Dr. Elmer Jiggle's CvCustomEventManager. This EM allows you to connect multiple other EMs to it, or really any other functions you want.

I don't really understand the rest of your post :mischief: but yeah Planetfall v3.13 included ElmerJiggles. I didn't copy it over because I didn't really understand. In fact I don't even know where the code for it was. :hmm:

I though the point of ElmerJiggles was to have multiple custom event manager files, which I didn't the use of. One seemed just fine. I didn't know ElmerJiggles also affected the one.
Anyway, knowing this, I had another look at how Final Frontier did their custom event manager.

Adding self.parent.onBlahBlahed(self, argslist) to all functions mentioned in Planetfall's Event Manager solved the missing screen issues.

Thanks for the help. :goodjob:
 
Think of the regular CvEventManager as a single order taker. You call that person, and if you want a burger, they tell the burger maker. If you want fries, they tell the fry cook. If you want a drink, they tell the person who pours drinks. They (the event manager) dispatch your order (event) to the right person (event handler, e.g. onCityBuilt).

Planetfall changes how certain events are handled, so think of it as the drive-thru order taker. If you order something normal (e.g. onGameStart), they just pass your order along to the regular order taker. However, if you order something specific to the drive-thru window, e.g. an oil change or gas fillup, they dispatch it to some other handler.

This works fine for a single mod. However, as soon as you want to merge two mods, each with their own 2nd order taker (event manager), it's hard to merge them without knowing more than basic Python.

Dr. EJ's CvCustomEventManager is like an order taker for order takers. It doesn't care what the events are. It has a generic table of events and handlers, where each event can have 1 or more handlers, and it dispatches the events to each handler registered with it.

So instead of the drive-thru order taker passing regular orders on to the regular order taker, you put a master order taker in front that talks to all the other order takers as necessary. When you eventually add a fly-thru lane, you simply tell the master order taker about the fly-through order taker and the orders s/he can take.
 
Back
Top Bottom