Hi there!
TL;DR - Just copy and paste this this into the bottom of the plugin code:
Spoiler
JavaScript:
var __Window_Message_createSubWindows = Window_Message.prototype.createSubWindows;
Window_Message.prototype.createSubWindows = function() {
__Window_Message_createSubWindows.call(this)
const scene = SceneManager._scene
if (this._itemWindow && scene.constructor.name === "Scene_Map") {
scene.createMiniWindow()
this._itemWindow._miniInfoWindow = scene._miniWindow
}
}
var __Window_EventItem_callUpdateHelp = Window_EventItem.prototype.callUpdateHelp;
Window_EventItem.prototype.callUpdateHelp = function() {
__Window_EventItem_callUpdateHelp.call(this)
if (this.active && this._miniInfoWindow) {
this.updateHelp()
}
}
Now for the explanation:
- Window_Message → The Message window of the Scene Map.
- Window_EventItem → The item window of the scene map, from the Select Item event command. Which is also a sub window of the message window.
- Window_MiniInfo → The mini info window created by the plugin.
The main problem is that the Window_MiniInfo is not created on the Scene_Map. The current plugin uses a method from Scene_Base to create the Mini Info Window and attach it to another window:
JavaScript:
Scene_Base.prototype.createMiniWindow = function() {
this._miniWindow = new Window_MiniInfo();
if (this._buyWindow) this._buyWindow._miniInfoWindow = this._miniWindow;
if (this._sellWindow) this._sellWindow._miniInfoWindow = this._miniWindow;
if (this._slotWindow) this._slotWindow._miniInfoWindow = this._miniWindow;
if (this._itemWindow) this._itemWindow._miniInfoWindow = this._miniWindow;
this.addChild(this._miniWindow);
};
On the other scenes, the plugin author call this method on the
.create method to put the Window_MiniInfo there:
JavaScript:
var __SEquip_create = Scene_Equip.prototype.create;
Scene_Equip.prototype.create = function() {
__SEquip_create.call(this);
if (useSceneEquip) this.createMiniWindow();
};
We would have to do the same for the scene map:
JavaScript:
var __Scene_Map_create = Scene_Map.prototype.create;
Scene_Map.prototype.create = function() {
__Scene_Map_create.call(this);
this.createMiniWindow()
}
But, the Window_EventItem is a sub window of the Window_Message. And the Window_Message is not created when we call the
.createMiniWindow().
We need to apply the Window_MiniInfo to the Window_EventItem. So instead of using the
.create method of the Scene Map above, I did it on the .createSubWindows() method of the Window_Message:
JavaScript:
var __Window_Message_createSubWindows = Window_Message.prototype.createSubWindows;
Window_Message.prototype.createSubWindows = function() {
__Window_Message_createSubWindows.call(this)
const scene = SceneManager._scene
if (this._itemWindow && scene.constructor.name === "Scene_Map") {
scene.createMiniWindow()
this._itemWindow._miniInfoWindow = scene._miniWindow
}
}
(We need to check if we are on the Scene Map, because this Window_Message method is also created on the battle scene, I guess)
With this, we make sure that the Window_MiniInfo is above the Window_EventItem
But, there is another problem. With only this approach we will not see the Window_MiniInfo because it is updated on the
.callUpdateHelp method from the Window_EventItem(inherited from Window_Selectable). And this method only works if the Window_EventItem has a Help Window. Which by default, it does not have:
JavaScript:
Window_Selectable.prototype.callUpdateHelp = function() {
if (this.active && this._helpWindow) {
this.updateHelp();
}
};
So we also need to add a check on this method to see if it is active, if it has the miniInfoWindow and if it does not have the help window. Because if it already has a help window, the .
updateHelp would be called twice.
JavaScript:
var __Window_EventItem_callUpdateHelp = Window_EventItem.prototype.callUpdateHelp;
Window_EventItem.prototype.callUpdateHelp = function() {
__Window_EventItem_callUpdateHelp.call(this)
if (this.active && this._miniInfoWindow && !this._helpWindow) {
this.updateHelp()
}
}
Of course, there are clean ways of doing that and also follow the plugin author code logic. But I just tried to make it work. And it does
🙂