MV Changing Menu Background on different situations

Hello everyone, I hope you're doing great!

I'm using this plugin: Menu Backgrounds for my game, and I was wondering if there is a way to change the background images depending on different situations like the images change from one location to another.

Thanks in advance !
You can use the script call
Code:
_.backgrounds[scene name] = filename
i.e. _.backgrounds["Scene_Menu"] = "lotsOfClouds";[/code] Note that this change will not save when you quit and resume a game. You may also see glitches with loading times the first time you open that window.
You can use the script call
Code:
_.backgrounds[scene name] = filename
i.e. _.backgrounds["Scene_Menu"] = "lotsOfClouds";[/code]

Note that this change will not save when you quit and resume a game. You may also see glitches with loading times the first time you open that window.
Thanks a lot for the reply, is there anyway to keep the changes saved? Perhaps another plugin?
you could try storing the value in a variable.
and to set the value back when loading a game you could:
- have an autorun event that does it on every map
- use a plugin that runs a common event when loading a save file.

And here's how you can set the value if using a variable:
Code:
SRD.MenuBackgrounds.backgrounds["Scene_Menu"] = $gameVariables.value(1);

Very important, if you use this code make sure you check that your variable value isn't 0 otherwise you could get a crash.
And if you want to store a string in a variable make sure you write the string in the "script" field of that variable.

i noticed ATT_Turan uses a "_" instead of "SRD.MenuBackgrounds" which wouldn't work because that's incorrect, so i corrected his example for you.
Code:
SRD.MenuBackgrounds.backgrounds["Scene_Menu"] = "lotsOfClouds";
i noticed ATT_Turan uses a "_" instead of "SRD.MenuBackgrounds" which wouldn't work
You're right - I was going off the syntax in the functions, and I didn't realize it was inside an IIFE because of the improperly-indented code.
use a plugin that runs a common event when loading a save file.
Thanks a lot for the reply, you thought me a few new things I didn't know.
Do you know any good plugin for that?
I found this plugin by galv while googling, you could give it a try:
I found this plugin by galv while googling, you could give it a try:
Thanks a lot.
I noticed that this plugin allows you to select only one common event to run, can this be changed?
can this be changed?
The answer to "can this be done" in code is always yes. But then you're right back where you are right now, posting a thread to ask people to modify someone else's plugin.

I can't think of a necessary reason you couldn't do whatever you need to do for this in one event.
The answer to "can this be done" in code is always yes. But then you're right back where you are right now, posting a thread to ask people to modify someone else's plugin.

I can't think of a necessary reason you couldn't do whatever you need to do for this in one event.
It was a general question not for that one specific event. I didn't ask to modify Galv's code, but was asking if there was a way to add more common events IDs on plugin parameters that I am not seeing.

Anyways, all thanks to TobyYasha, I got what I needed, this thread can be closed.

Original thread: https://forums.rpgmakerweb.com/threads/changing-menu-background-on-different-situations.173047/