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