MZ Change texture of the selectable items' background in a window?

Hello there, recently I've been teaching myself how JavaScript works in RPG Maker MZ, and I've been screwing around with the UI's code. I've been able to do a lot, but I have a question that I'm not sure if it's possible in an easy way.

You know how the items in any selection window have a black background behind it? I was wondering if that could be replaced with a texture of my own. I'm not talking about changing its colors in the ColorManager, and the WindowSkin only changes the cursor, not the background. I'm talking replacing the basic black gradient background with a picture.

To give you an idea, I've been looking up custom menus made in other RPG Makers for some inspiration, and I've come across one of Moonpearl's custom XP menus and Galv's custom VX Ace themes.
1000022338.jpg

1000022343.jpg

Notice how the menu options and the character stats on the right have their own backgrounds as opposed to using the default item selection theme? I was wondering how to do a similar thing in MZ
Don't know how to code that, but I think you can check how it's done from Hakuen Studio Background Manager or Moghunter Menu Background.
Technical:
  • Commands are drawn via the drawItem method inherited from Window_Command.
  • Item backgrounds are drawn via the drawItemBackground method inherited from Window_Selectable.
So you could use/write a plugin that overrides those methods for the applicable windows (Window_MenuCommand, Window_MenuStatus).

Note that, just like with Show Choices, setting a window's background type to 2 (Transparent) will also hide the window frame, like in your sample screenshots.
Technical:
  • Commands are drawn via the drawItem method inherited from Window_Command.
  • Item backgrounds are drawn via the drawItemBackground method inherited from Window_Selectable.
So you could use/write a plugin that overrides those methods for the applicable windows (Window_MenuCommand, Window_MenuStatus).

Note that, just like with Show Choices, setting a window's background type to 2 (Transparent) will also hide the window frame, like in your sample screenshots.
That helped a lot, thanks! I'll be sure to check it out ^^
Technical:
  • Commands are drawn via the drawItem method inherited from Window_Command.
  • Item backgrounds are drawn via the drawItemBackground method inherited from Window_Selectable.
So you could use/write a plugin that overrides those methods for the applicable windows (Window_MenuCommand, Window_MenuStatus).

Note that, just like with Show Choices, setting a window's background type to 2 (Transparent) will also hide the window frame, like in your sample screenshots.

Okay, slight update on that, I did find someone else who wondering about the same thing as me, and they got a reply from @Eliaquim on how to do what I was hoping to do, and they did indeed have a solution for it, which I'll reference right here:

But yeah, I tried their methods, and it worked... and did a bit of chaos lol
Spoiler: The end result of my tinkering
Screenshot 2025-01-01 135309.png

Screenshot 2025-01-01 140455.png

So yeah, I want to thank you two for helping me out ^^

Original thread: https://forums.rpgmakerweb.com/threads/change-texture-of-the-selectable-items-background-in-a-window.174231/