RPG Maker MV has hard-coded the Battle Background based on the autotile used on the World Map.
Nope.
That code only gets run if you don't have a battleback set some other way. It is the default 'fallback', and is based on the current map, not on the world map. If you set a battleback in the map properties, that will be used, unless you have used the Change Battle Back command, which overrides it.
@Krakaz you do not need a plugin. You can do this with events, but, sorry to say, your events are a bit of a mess. The use of variables and conditions is all wrong, as is your understanding of how common events, parallel processes and switches run.
Here's what's going to happen with your common event ...
The variable will be set to a completely random number, and then it will be set to the region id based on <some other variables that do not get set here and may not get set anywhere>.
Then it checks if the region is 1 and sets the battleback to grassland.
If the region is not 1, the battleback will be set to grassland, then grassland & forest, then meadow & forest, then desert, then swamp & wasteland, then snow, then lava, then sand, then space, then sky.
So my guess is that you will always get either grassland or sky as your battleback.
First line ... why are you setting the region id to a random variable? The region id is NOT a random number.
Second line ... you've got this right, but where are you setting the Region X and Region Y variables? You should set them right before the Get Location Info command, so you know that they are up to date.
If tests ... you've put each test within the previous one. If the region is 1, the first test will be true, but the next one will be false (the region can be 1 OR 2, not both). If the region is 2, the "if region = 1" test will be false so it won't even get to check. And so on through the rest of the tests.
The Else section. You are setting the region to be each number, which does nothing, and then changing the background accordingly. So if the region is not 1 and you drop through to the Else, it's going to run every single one of those commands.
Now, about how you're calling it ... you have the common event set to parallel process, and conditioned by a switch. So as soon as that switch is turned on, it's going to start running. Then you have a map event that's conditioned by the same switch, set to parallel process, that's calling the common event again. So you're going to have the common event running twice, at the same time, which is crazy.
Here's what you need to do ...
Common event:
Code:
Control Variables {Region X} = Game Data > Player's X
Control Variables {Region Y} = Game Data > Player's Y
Get Location Info {Region ID} = Region ID {Region X} {Region Y}
If {Region ID} = 1
Change Battleback Grassland, Grassland
Else
If {Region ID} = 2
Change Battleback Grassland & Forest
Else
If {Region ID} = 3
Change Battleback Meadow & Forest
Else
If {Region ID} = 4
Change Battleback Dirt2 & Forest
Else
... and so on
End
End
End
End
WAIT 10 FRAMES!!!
So you are setting up the X and Y position you want to look at, then getting the region id from that location.
Then you are testing the region id's value - if you find a match, you are changing the battleback; if you don't find a match you are moving on to the next test
Finally you are going to add a WAIT in there. The player is not going to move 60 tiles in a second, so you do not need this whole thing running 60 times a second. And with two of them going, like you had, it won't be long before you have major lag on your map!
I notice you have a Player X and Player Y common event, which I assume is going to put the player's X and Y position into variables - probably 60 times a second. I'd just get rid of those common events and the one for map id as well, and only execute those commands when you need to.
And ditch the map event that calls the common event. If you have a common event that's set to autorun or parallel, then it will run when the switch is on. You don't call it via a map event.
Hope this gives you better success.