MV Randomizing World Map Random Encounter Battlebacks?

I recently came into possession of the Region Battlebacks plugin by Yanfly, and I mean to use it for my world map. Thing is, I actually have something of a surplus of background images to go with the various terrain types on the world map. As a result, I was wondering if it's at all possible to randomize it, somewhat.

For example, let us say that I have a collection of 'Grass Land' battlebacks, six of them, and I want the game to pick one of them at random at the start of a battle when on specific regions. Let's say, Region 5, 12, and 13 for example. The enemies encountered are different, of course, but all three regions would pull from the same list of 6 Grass land Battlebacks, and display one at random at the start of the fight. Is this doable with Yanfly's plugin, or is there some other

I recognize that this is kind of a superfluous and ultimately unneeded addition to my game, but I think it'd make encounters on the world map at least a little more interesting.

If it helps narrow this down at all, with the way I am handling battlebacks I am not using the 'Battlebacks 2' image slot. All of my battlebacks work just fine in just the first slot.

(Also, if I dropped this in the wrong forum, I apologize. Feel free to move it where it goes if I screwed up there.)
If I was attempting this with the knowledge I have now, I would have to create duplicate troops with different battebacks, referencing more troops (ones that are identical except for battleback) for the region. Not sure if that helps you, but that would be my attempt at it.

@Skijarama Please don't apologize because you are trying to do something different with your game or extra, I appreciate different ideas. I myself would not do this because I would want to match each region as closely as possible to the battlebacks, and would likely assign one grass region for one battleback and then another to a different one. I can see merit in what you are doing, and even if I did not, I would still take pleasure in trying to figure out how to do it. It's like a puzzle, and sometimes figuring these things out helps me in a totally different way.

Basically, I am working towards RPG Maker Master lol, seriously though, it's always a pleasure to help anyone who is passionate or takes pride in their games and wants to put forth the effort.
If I was attempting this with the knowledge I have now, I would have to create duplicate troops with different battebacks

The battleback specified in the Troops setting is only for Battle Test. It is not saved into the Troops.json file and does not affect the game when you do a Play Test, or when you deploy.

The battleback comes from the map settings, or for a world map, the tiles used. And of course there's the Change Battleback command, which affects future battles (so isn't much use inside a troop event).


OP, if you want to do this without plugins, you could have an event set to parallel process on each map, that does something like this:

Code:
Wait 300 Frames (5 seconds)
Control Variables RNG = Random number between 1 and 5 (or however many battlebacks you have for the area)
If RNG = 1
  Change Battleback to image 1
End
If RNG = 2
  Change Battleback to image 2
End
... etc

If you want a new plugin, or a mod to Yanfly's Region Restrictions plugin, please say so and I will move this to Plugin Requests or Support.
If you want a new plugin, or a mod to Yanfly's Region Restrictions plugin, please say so and I will move this to Plugin Requests or Support.
Ah, yeah, that would probably be a better place to drop this. Feel free to do so. I'll look into the non-plugin approach when I get a chance, but I'm not holding out hope for it to be elegant or particularly optimal, performance wise.
Moderator note: Moving to Plugin Requests
Thank you @Shaz for correcting me and helping.
One way would be to make a common event that assembles the random battlebacks, and then call that event at battle start. Of course - you might need a plugin for calling the common event, but that might be easier to find than a random battleback plugin...
One way would be to make a common event that assembles the random battlebacks, and then call that event at battle start. Of course - you might need a plugin for calling the common event, but that might be easier to find than a random battleback plugin...
That I could. There was also the above-mentioned parallel process event idea I could try, which would also work. I haven't gotten around to it yet, though, so I cannot confirm if it works in my circumstance.
call that event at battle start.

Calling it when the battle starts is already too late. The battleback is determined while still on the map, before the transition to battle.
Calling it when the battle starts is already too late. The battleback is determined while still on the map, before the transition to battle.
After the error I made there was hesitance to share, but consider this brainstorming from me...

Shaz has stated solutions, but also the key to what you need to do. Whatever you decide to do, you have to perform the events on the world map, and you have to event on the world map before battle. A plug-in that could perform an event before battle transition would help a lot, but I am not aware of one.

With what we have, if you are using region events, instead of making the grassland all one region make it two, you could make it like patchwork, calling a parallel process with each step (Diagonal movement you would have to get fancy) or the way Shaz wrote it where it redoes the event automatically in time intervals. Whatever you try, you have to do it on the world map.

Interested what you do and if it works, so please let me know!

Original thread: https://forums.rpgmakerweb.com/threads/randomizing-world-map-random-encounter-battlebacks.133352/