// 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);
}KG2020
4
Posts
2
Following
A member registered May 07, 2021
Recent community posts
Plug₂in for RPG Maker MV and MZ comments · Replied to Qazm in Plug₂in for RPG Maker MV and MZ comments
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
KR Sun and Moon Palace Tileset for RPGs comments · Posted in KR Sun and Moon Palace Tileset for RPGs comments