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
456
Reaction score
436
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

I ended up needing to do a chapter 1 map remake. WIP, animated version to come later. ;)
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

1st iteration on castle interior in Tiled.
I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.

Forum statistics

Threads
107,744
Messages
1,031,816
Members
139,883
Latest member
DeAngelis
Top