Mod load order, could we get it?

This is what I had to do to get my mod to load:

$(document).ready(function () {
    Ember.run.later(this, function () {
        App.StonehearthTeamCrafterView.reopen({
            
        });
    }, 1000);
});

I can only assume that the loading process is multi-threaded and that all of the Stonehearth components are instructed to load before any mods, but the game doesn’t wait for them to finish loading before it starts loading mods. Thus, most views finish loading quickly as it goes along, but a large/complex view like StonehearthTeamCrafterView hasn’t finished loading by the time my mod is loaded, so it’s not defined when I go to reopen it.

Edit: And this strategy only works because I’m reopening a view that isn’t being displayed right from the start. Imagine trying to modify the “start menu” bar at the bottom or something.

1 Like