How do Regions work in MV?

I saw this a few pages back in the screenshots thread in General Discussion. A cool idea someone brought up is using regions for maps for background sounds, adding them to Conditional Branches with a bit of scripting, allowing them to be louder or quieter depending on said Region. The only problem is the code they listed was for VX Ace, not MV. I tried entering said code into my event, and got an error, so that's clearly not working.


So... does anyone have an idea what Script I'd need to enter into my Event that's tied to Regions?


Said VX Ace script was: $game_player.region_id == 1 for example.
$gamePlayer.regionId() === 1


(that's 3 = signs, not 2 as in Ace)


There are also region plugins available, which might be better, because having events or common events set to parallel process to check what region the player is on might cause lag if you have several of them running at once and if they're designed poorly (ie - they don't have a mandatory wait to prevent lag)
Oh! So I wasn't far off then! Awesome! Thank you, Shaz!


Oh? I know about Region Battlebacks and Region Restrictions from Yanfly. What else do you recommend?
there should be some region events plugins around - I was going to port mine from Ace, but I'm pretty sure someone else was already working on (or had completed) one.  Check out some of Hudell's plugins for the Orange system - might be in there.  Along the lines of triggering common events when you step onto a certain region.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-regions-work-in-mv.61711/