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
372
Reaction score
344
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

People3_3 and People3_4 added!

does there exist a word for a state of being that is between "living" and (not "dead", but ...) "not living" .... does that make sense, or do I just sound like Im high for something :[ ?
Hope you are all fine today~
Moderators, you must have so much patience to be able to deal with everything. I mod in a server of sorts and today we just got a message, which, despite it's helpful constructive criticism, basically stated that all of the mods were jerks and that was the only reason our server was unlikeable. So, thank you, for having patience. You are appreciated! :kaoluv:

Forum statistics

Threads
105,743
Messages
1,016,058
Members
137,427
Latest member
olixproductions
Top