RMMZ ConfigManager issues

Mewgles

Veteran
Veteran
Joined
Jul 24, 2020
Messages
85
Reaction score
89
First Language
German
Primarily Uses
RMMZ
I'm currently working on some sort of menu engine for MZ including extended player settings/options. Things are going decent so far, but I've run into an issue that when I'm adding more than like 2 or 3 extra values to ConfigManager to be saved in the player configs things go a bit out of hand.

ConfigManager.isLoaded() starts randomly throwing a true. Sometimes halfway through loading all values, sometines after 2/3 and on very rare occasions it actually loads everything like it should before telling Scene_Boot to continue setting up the game.

I could fix that issue by totally changing how the ConfigManager works, but that would most likely cause compatibility issues with other plugins. I could also go for an extra method excluding ConfigManager fully, but that feels wrong too.

Did anyone else run into similar issues aswell? If yes, did you manage to fix it without major changes to the processing?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
366
Reaction score
336
First Language
german
Primarily Uses
RMMZ
Maybe you can try to alias the isLoaded method like this:

Code:
(function () {
    var alias = ConfigManager.isLoaded;

    function yourCheckFunction() {
        // whatever
        return true / false;
    }

    ConfigManager.isLoaded = function() {
        return alias.call(this) && yourCheckFunction();
    }
})();
 

Mewgles

Veteran
Veteran
Joined
Jul 24, 2020
Messages
85
Reaction score
89
First Language
German
Primarily Uses
RMMZ
Maybe you can try to alias the isLoaded method like this:
Aliasing works, thank you. Should have been able to guess that myself x) But I guess I got too tangled up figuring out why it did that rather than trying to find a simple workaround.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

GOBBLE GOBBLE! Happy thanksgiving.
Oh no. That moment when you try to fix something you modified in your game, like, a year ago but didn't want to fix then, and you now have no idea what you even did. Me right now, trying to figure out why my gold window is over stretched?
LittlePIGGY wrote on atreyoray's profile.
Where are you TT^TT
We need ARP_InGameManual for MZ
Oh my gosh. Thank you, Macy's! Thank you so much! You have made me very happy!

Forum statistics

Threads
105,552
Messages
1,014,573
Members
137,225
Latest member
Eryndor
Top