MZ Help with changing Menu Backgrounds

I'm trying to make a plugin to change the background of the default menu, based on a solution to a menu background problem from another thread:
Scene_MenuBase.prototype.createBackground = function() {

let pictureName = "Untitled";

if (!pictureName) {
// This is the fallback image when the code doesn't know which to show
pictureName = "ErrorPicture";
}

const bitmap = ImageManager.loadPicture(pictureName);
this._backgroundSprite = new Sprite(bitmap);

// stretch picture to screen size
bitmap.addLoadListener(() => {
this._backgroundSprite.scale.x = Graphics.width / bitmap.width;
this._backgroundSprite.scale.y = Graphics.height / bitmap.height;
});
this.addChild(this._backgroundSprite);
}
With "Untitled" being the name of the background a made.
However, when testing, it doesn't seem to work, and nothing changes. I made sure to add this plugins alongside the others, and the background is in the pictures folder, so I'm wondering if it's something wrong with the code or something else.

For context I want to create a simple menu similar to these:
View attachment 327379View attachment 327380
It would help if you linked to this "other thread" so we can see the context you got code from.

Also, however you made your attachments they don't display.

Even if it worked, this code would not do what you want it to, because several other scenes inherit from MenuBase, not just the main menu.

Since adding the plugin to your project, did you save your project and launch a new play test? Not loading a save game?

If you press F8 during the game and go to the Console tab, do you see any errors?
Ah sorry, the thread was here: Link
It was the closest I found in my search for menu customizing so I thought I might as well try to see if it would work.

I do save the project and launch a new playtest when testing, but nothing seems to change, as well as there being no noticeable errors when looking at Console.

Since the code wasn't going to work in the intended way anyway, would there be a better way to make it work?
Right off the bat, that was an MV support thread and you say you're using MZ - the code for windows is one of the biggest differences between the two engines.

Rather than troubleshoot through this, it might be easier to just use one of the existing plugins to customize your window backgrounds.



Those both cost a few bucks but have the advantage of you not needing to deal with any code, and they can be used to customize any windows in your game.

If you only specifically want the main menu and don't want to spend money, this plugin from Aerosys should be able to do it:
Not sure why it doesn't work. I tried your code and it worked just fine.
Maybe you have another menu related plugin that alter the same part.
Right off the bat, that was an MV support thread and you say you're using MZ - the code for windows is one of the biggest differences between the two engines.

Rather than troubleshoot through this, it might be easier to just use one of the existing plugins to customize your window backgrounds.



Those both cost a few bucks but have the advantage of you not needing to deal with any code, and they can be used to customize any windows in your game.

If you only specifically want the main menu and don't want to spend money, this plugin from Aerosys should be able to do it:
Ah, I see. Didn't notice the "V" there. I'll look into those plugins then, thanks.
You can try this

Original thread: https://forums.rpgmakerweb.com/threads/help-with-changing-menu-backgrounds.174283/