my module has a tiny amount of python dealing with events included specifically for a civic. All it is really is an expanded version of SlaveRevolt in the randomeventsinterface file. So I could make a py file specifically for my new events?
The "events" in this discussion are not related to the "random events" added in BTS. Civ4 uses an event-based system to allow mods to perform actions when various things happen in the game: a player is met, war is declared, a city is founded, a unit is killed, etc. These are triggered by the SDK and sent to CvEventManager via CvEventInterface.onEvent().
I will check out the xml thing. . . . There are multiple changes by different parties in CvEventManager which did not use either the BUG method or the DrJiggles method.
Note that the BUG method is essentially the same as Jiggles's method. BUG has two differences. The first is that you no longer have to modify the event manager class itself; you hook up your events in XML. Doing it this way is
strongly recommended so you don't have to re-merge to upgrade BUG in your mod.
The second difference is that you can use module-level event handlers without the need of an "event manager" class yourself. This method is a little easier
if you don't mind being tied to BUG. If you want to release your mod without BUG, don't use this method. Stick with what that wiki page calls "old-style" event managers using the <events module="FooEventManager"/> XML element.
There are also multiple changes by different parties in CvGameUtils, including at least terraforming, inquisitor (GodsOfOld), and RevolutionDCM. To be honest, it's kind of a mess in there.
Okay, I'll take a look at that file (I have DuneWars installed) and see if I can get a sense of how I could make it more modular. It's always easier to have an example to go from. Am I correct that those individual mods each had their own CvGameUtils modules, and you merged them all into one file? Fairly easy as long as no two mods override the same callback. Did any do that?
The old mods may be unlikely to be revised to use it.
True, but if one modder does it, the others can use their version instead. My goal was to create a forum for modders to post updates of other people's mods they BUGified. Looks like it's time for that.
The other place in python where I see merged mods colliding is CvMainInterface.py.
This could certainly use a lot of work. The main issue is that because it's building a huge screen where each part works with the other parts, it's difficult to make it modular. I was tempted early on to split it apart into multiple modules; that would have helped. At this point, however, it's such a hodgepodge that it would be a lot of effort, though it would have been a lot back then too.
It's possible that we could build some hooks into it for a few things that get modded frequently, such as action buttons as you said. How exactly does that module get modified to handle a new action button? I thought that was done automatically by modifying the SDK.