"Screens" are
scenes in RMMV's code (rpg_scenes.js). I'm assuming that:
Windows are typically added to a scene when it is created, e.g.
Spoiler: Scene_Shop#create (rpg_scenes.js)
JavaScript:
Scene_Shop.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.createHelpWindow();
this.createGoldWindow();
this.createCommandWindow();
this.createDummyWindow();
this.createNumberWindow();
this.createStatusWindow();
this.createBuyWindow();
this.createCategoryWindow();
this.createSellWindow();
};
Instead of completely removing certain window(s), consider hiding them instead.
- If you remove a window, you also need to remove all references to that window;
- If you hide it, you only need to remove any remaining input handlers it might have.
Window_ShopStatus and
Window_ShopInfo are both non-interactive windows, i.e. just for display. Removing them (e.g. by overriding the corresponding
create_x_Window method with an empty function) might be simple in this case, and would reduce RAM usage slightly, but I hide them in the example below just to be safe.
😴
Untested example:
Spoiler: Suggested plugin code
JavaScript:
// Adjust shop windows after scene creation
(function(alias) {
Scene_Shop.prototype.create = function() {
alias.apply(this, arguments);
this.createCompareWindow();
this._statusWindow.hide();
this._infoWindow.hide();
};
})(Scene_Shop.prototype.create);
// Create, associate, and add a "stat compare window" to the shop scene
Scene_Shop.prototype.createCompareWindow = function() {
var x = this._statusWindow.x;
var y = this._statusWindow.y;
var w = this._statusWindow.width;
var h = this._statusWindow.height;
this._compareWindow = new Window_StatCompare(x, y, w, h);
this._buyWindow.setStatusWindow(this._compareWindow);
this._sellWindow.setStatusWindow(this._compareWindow);
this.addWindow(this._compareWindow);
};
Yes, thank you. I didn't post which plugins they were from originally as I didn't find it relevant.
I am commonly editing(trying to) Windows and such. But upon changing "Window_Help" which I wanted to change specifically for "Scene_Skill", it also changed the layout of "Window_Help" for everything else. So I realized that I am changing how every Scene interacts with the "Window_Help" and not just the one in "Scene_Skill".
The Windows in this post are for another reason, but I felt it'd apply as I figured I'll just "hide"(thanks) the Window_Help in the Scene_Skill and use another: Window_SkillDesc(Mine).
But thanks a lot for your help, I shall add what plugins are related to the Scenes, as the statcompare is not YEP, rather it is SRD. But both EquipCore and ShopMenuCore are included in my plugins and the Window_Shop is modified by YEP.
I shall play abit of Halo and then I'll be applying what you showed me. It was the prototype.create() I was looking for. Can't believe I didn't find it myself though, I was so stuck looking through the Windows
😛 Thank you again.