MZ Show picture above the dialog box (MZ)

Hello! I made a frame for my game window and I want it to be displayed throughout the whole game on top of every other visual. I decided to use "show picture" event and it works fine, but the frame goes under the dialog box, which i want to fix. Is there any plugin for rpgmaker MZ that allows to bind a picture to the game's window permanently? I've already tried to do it with parallax mapping, but the frame still goes under the dialog box, and orangehud/ct_bolt imageoverlay is not supported by MZ.
I attached a picture with how it looks rn.
Don't know, but I googled you a script that will put picture 1 above the message box (use after the picture is on the screen). Just run the script every time you go to a new map LOL.

SceneManager._scene.addChild(SceneManager._scene._spriteset._pictureContainer.children[0])

Or maybe someone else has a plugin for you.
Don't know, but I googled you a script that will put picture 1 above the message box (use after the picture is on the screen). Just run the script every time you go to a new map LOL.

SceneManager._scene.addChild(SceneManager._scene._spriteset._pictureContainer.children[0])

Or maybe someone else has a plugin for you.

Thank you for your help! Good news - it does puts picture above the message box, bad news - after a second an "Cannot read property 'parent' of undefined" error appears. Since I suck at JS, I've tried to google it, but didn't find much
1751417926658.png
I found this thingy https://ct-bolt.itch.io/rmmv-mz-pictures-above-windows
Thank you! I've tried this before and it works, but it sets all the pictures above the dialog window, including character sprites. I haven't found the way to set only certain pictures above.
You might want to look for a "message busts" type plugin, e.g.

Alternatively, based loosely on my post over here (untested) (tested now, works for me):
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Picture IDs 95+ display above the window layer.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/178642/
 * @help Free to use and/or modify for any project, no credit required.
 */
;for (const C of [Scene_Map, Scene_Battle])
  void (alias => {
    C.prototype.createDisplayObjects = function() {
      alias.apply(this, arguments);
      const src  = this._spriteset._pictureContainer;  // from picture container
      const dest = this._windowLayer;                  // to window layer
      const max  = $gameScreen.maxPictures();
      const min  = 95;
      for (let id = max; id >= min; --id)  // iterate backwards
        dest.addChild(src.removeChildAt(id - 1));
    };
  })(C.prototype.createDisplayObjects);

[Edit: corrected n -> id in the for-loop break condition.]
[Edit 2: corrected loop logic so it doesn't skip stuff. 😴]
You might want to look for a "message busts" type plugin, e.g.

Alternatively, based loosely on my post over here (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Picture IDs 95+ display above the window layer.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/178642/
 * @help Free to use and/or modify for any project, no credit required.
 */
;for (const C of [Scene_Map, Scene_Battle])
  void (alias => {
    C.prototype.createDisplayObjects = function() {
      alias.apply(this, arguments);
      const src  = this._spriteset._pictureContainer;  // from picture container
      const dest = this._windowLayer;                  // to window layer
      const max  = $gameScreen.maxPictures();
      for (let id = 95; n <= max; ++id)
        dest.addChild(src.removeChildAt(id - 1));
    };
  })(C.prototype.createDisplayObjects);
Thank you for the help, I'll look into Galv's plugin! I've tried your plugin, but, unfortunately, an error appears:
1752000614631.png

I don't know much about js, so unfortunately i can't tell what went wrong :')
Thank you for the help, I'll look into Galv's plugin!
You're welcome! It seems ideal for what you're doing. If you have trouble setting it up, the master demo may be a useful reference:

I've tried your plugin, but, unfortunately, an error appears:
😴 Oh, whoops. This line:
JavaScript:
      for (let id = 95; n <= max; ++id)
...is supposed to be:
JavaScript:
      for (let id = 95; id <= max; ++id)
I'll correct the code in my previous post~
You're welcome! It seems ideal for what you're doing. If you have trouble setting it up, the master demo may be a useful reference:


😴 Oh, whoops. This line:
JavaScript:
      for (let id = 95; n <= max; ++id)
...is supposed to be:
JavaScript:
      for (let id = 95; id <= max; ++id)
I'll correct the code in my previous post~
Galv's plugin works, but there's a problem with the placement of the frame. I think it might be because of its size, since it's bigger than a typical bust.
1752073540945.png

1752073769857.png

Speaking of your plugin, there's another error😅😅
Oh, oops. I was focused on the bust images, but yea, Galv's plugin may not be suited for positioning a frame overlay. 😴

Speaking of your plugin, there's another error😅
Oh drat. Yep, I looped in the wrong direction.

I've edited my code again, and tested it this time. It seems to be working now? 🙏
Oh, oops. I was focused on the bust images, but yea, Galv's plugin may not be suited for positioning a frame overlay. 😴


Oh drat. Yep, I looped in the wrong direction.

I've edited my code again, and tested it this time. It seems to be working now? 🙏
Yes, it works perfectly now!! <😀
1752338315877.png


Thank you soo much for your help, i'm extremely grateful!! Have an amazing day<3

Original thread: https://forums.rpgmakerweb.com/threads/show-picture-above-the-dialog-box-mz.178642/