Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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);
        }