Any wishes for additional mod support?

As we move closer to a beta release for workshop support I want to take the opportunity to consider adding additional helpful modding events or methods. To all modders: Please let us know if you have any particular wishes.

Hook on before/after Conventions?

I moved 3 posts to a new topic: Changing the way topics are researched

There is a general GDT.eventKeys.ui.dialogOpen and GDT.eventKeys.ui.dialogClose that you can use for this purpose. I think the UltimateLib also allows fine-tuning the dialogs (@SirEverard?) - What’s your use case?

I am just doing a hook on General.runConference to expose what I need just a suggestion tho :slight_smile: The use case would be to fire off an event right before or directly following a convention. I am using it now in my mod to add fans after the convention.

1 Like

That’s a perfectly reasonable way to do it :slight_smile:

adding categories, like action, adventure, ETC.

if you mean adding genres that’s unfortunately well outside the scope of what we have time for.

Changing/adding ratings? Example add t rating changing y or removing y. Etc.

I will expose a Reviews.getGameReviews method which should make hijacking review code and making adjustments easier.

2 Likes

I would really like the ability to call events from the main game. Maybe it is possible, but I want to call the credit card event and trigger it multiple times.

DecisionNotifications.creditCard.getNotification(company) and then just push it to company.notifications.

1 Like

Oh! Thanks.

Anyway, so I’m still learning modding. This might be out of your range, but can you add a better error handler to the main game? The mod works, but if I get an error before the mod is loaded, then I dont get the report.

we’ll include an improved error handling into the game itself.

1 Like

I don’t know if that exists, but what about some method to “spawn” an blank, default window?

@Haxor You can do it this way: window.open();

@PatrickKlug Can you make the function that generates a review message public? It would be useful for my multiplayer mod.

A GDT.eventKeys.mod.allLoaded event, fired after the last mod is loaded, could help with interop or compatibility between mods. Similarly, it would be nice if the mod.loaded event passed the name of the mod that was loaded to the callback. That would allow us to do things like:

GDT.on(GDT.eventKeys.mod.loaded, function(m) { 
    // Only handle this if it's my mod that was loaded.
    if(m == "My Mod") { MyMod.init(); }
});

Ideally, each individual mod’s mod.loaded events would fire before the final mod.allLoaded event does.

@kane_t I’m pretty sure the ready callback when you load your mod already takes care of that.

(function()
{
    var ready = function()
    {
        mymod.init();
    };

    var error = function()
    {
        alert("Failed to initialize mymod");
    };
    
    var filestoload = ["mods/mymod/inside/mymod.js"];
    GDT.loadJs(filestoload, ready, error);
})();

Ah, that’s right, that could take care of my example. I didn’t think of that because I don’t use loadJs(), I just let GDT load my mod automatically from the definition in package.json. It still might be useful to somebody to be able to see when another, specific mod is loaded, but I can’t think of a use case for that, myself.

A mod.allLoaded event would still be useful, though, and I’m pretty sure there’s no workaround for that yet.