• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Modular Functions not working

Good job figuring that out. :goodjob: Python has two methods of doing classes: those that extend object (as you did) and those that do not. You cannot use the super() function with those that do not. :(

The other way to fix it in case you see this elsewhere (Civ4 doesn't use "object") is to call the superclass's construction (__init__) directly:

Code:
class CvCustomEventManager(CvEventManager):
    def __init__(self, *args, **kwargs):
        [B]CvEventManager.__init__(self[/B], *args, *kwargs)

Using this method you must pass in "self" manually.
 
Good job figuring that out. :goodjob: Python has two methods of doing classes: those that extend object (as you did) and those that do not. You cannot use the super() function with those that do not. :(

The other way to fix it in case you see this elsewhere (Civ4 doesn't use "object") is to call the superclass's construction (__init__) directly:

Code:
class CvCustomEventManager(CvEventManager):
    def __init__(self, *args, **kwargs):
        [B]CvEventManager.__init__(self[/B], *args, *kwargs)

Using this method you must pass in "self" manually.

I'll keep that in mind. Thanks. As I wake up this morning, the mod opens without any errors. :clap:

To merge the mod, changes to the existing python files are now reduced to only 4 files:

1. Inquisition.py

2. InquisitionEvents.py

3. InquisitionGameUtils.py

4. CvMainInterface.py

Only one file is not modular, the CvMainInterface.py. Maybe I should not push my luck, but has anyone ever attempted to make CvMainInterface.py modular? ...Just curious at this point.

Orion Veteran :cool:
 
Maybe I should not push my luck, but has anyone ever attempted to make CvMainInterface.py modular?

That module works so very different from the others that it would be quite difficult. Sure, you could make the plot list pluggable or the scoreboard, but that doesn't really buy you much.

Even if you rewrote the module to split it up into multiple modules to make it more modular, no one is using that new version. So you'd still have to extract everything from their custom CvMI and port it to your very different module layout.

And to top it all off, that module is already two screens crammed into one module. :(
 
Back
Top Bottom