Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hello, 

Thanks again for making this plug in compatible with MZ. I was working on my game and found that Plug2In has a minor incompatibility issue with the Visustella MZ options core plug in. The conflict was related to how it was drawing a rectangle for the Plug2In options menu. I was able to modify the function to make it compatible. I would be happy to send the modified code to you for testing or for a future version update. If you would like it, how should I send it to you?

Thanks,

KG

You can just put the modified function in the comments here, ideally in a markdown code block.

I may not get around to updating this entirely quickly, and this way anyone else can use it too until then. (I’ll add a reply if/when I integrate it directly.)

// Added function to help with Options Core MZ compatability:
        createOptionsWindow() {
            // Ensure _optionsWindow is initialized
            this._optionsWindow = this._optionsWindow || new Window_PlugPlugOptions(this.optionsWindowRect());
            this._optionsWindow.setHandler('cancel', () => this.popScene());
            this.addWindow(this._optionsWindow);
        }
// Modified original function here for Options Core MZ compatability:
        optionsWindowRect() {
            if (typeof Scene_Options.prototype.optionsWindowRect === "function") {
                try {
                    const rect = Scene_Options.prototype.optionsWindowRect.call(this);
                    // Ensure the rect object has valid width and height properties
                    if (rect && typeof rect.width === "number" && typeof rect.height === "number") {
                        return rect;
                    }
                } catch (error) {
                    console.warn("Failed to call optionsWindowRect from VisuMZ_1_OptionsCore:", error);
                }
            }
            // Fallback rectangle if the above fails
            return new Rectangle(0, 0, Graphics.boxWidth, Graphics.boxHeight - 100);
        }