MZ Turn Switch On When In Certain Region or Terrain Tag

Hi all.

I have been using the Region Base plugin by triacontane to turn certain switches on when the player is in a certain region ID or terrain tag, and although this has been working perfectly, it seems be be causing some conflicts...specifically, collision conflicts. This is probably because the Region Base plugin is also able to edit the collision...which is something that I do not need.

Does anyone know of any plugins that can turn certain switches on once the player enters a certain region or terrain tag? I know there may already be some for regions, but I would also need it to work for terrain tags. Basically, the Region Base plugin minus the collision stuff.

Thanks in advance.
I would suggest you take a step back.

What exactly are the switches for? Any place in an event or code that you're checking the status of a switch, you could simply look at the current region ID directly.
I would suggest you take a step back.

What exactly are the switches for? Any place in an event or code that you're checking the status of a switch, you could simply look at the current region ID directly.
The two switches in question are:

1) A switch to determine if the player is on a water tile (via terrain tag). This would call 2 common events - if the switch is on then the player's shadow is removed, and if the switch is off, then the player's shadow will be restored.

2) A switch to determine if the player is within a certain region. If the switch is on, it will override a certain event. Basically with this, some background: the player can drink water from water tiles via the action button...but, with a fishing system I have, whenever the player is prompted "if they would like to to fish" and they select any answer, the player will drink water (because the player is facing water) and the event of "drinking water" is active because of this. So, I have added a few region ID's around this "fishing area" which will override the drinking water event.

I can add screenshots for context if needs be.
I'm a little confused by some of your terminology. A switch doesn't "call a common event" - how are you actually doing the shadow thing?

The other one sounds like exactly what I said in my first post - "override a certain event" sounds like you have a conditional branch in it, so you can just check the region ID instead of a switch.
I'm a little confused by some of your terminology. A switch doesn't "call a common event" - how are you actually doing the shadow thing?

The other one sounds like exactly what I said in my first post - "override a certain event" sounds like you have a conditional branch in it, so you can just check the region ID instead of a switch.
Following your advice with the second one, the check region ID in the conditional branch instead of a switch, I have successfully implemented this - thank you!

As for the first one, removing/replacing the shadow, I am adding some screenshots. In the Region Base plugin, I have assigned common events for when the player enters the water (removes shadow) and leaves the water (restores shadow). As far as I understand it, via the plugin parameters, the associated common events are called once the player is on terrain tag 3 (in my case) or not.

Screenshot (2567).png


Screenshot (2568).png


Screenshot (2569).png
As far as I understand it, via the plugin parameters, the associated common events are called once the player is on terrain tag 3
Okay, so it has nothing to do with a switch, the plugin is calling a common event when you step onto that region ID.

There are other ways to do that, but the fact from your first post remains that the plugin shouldn't be causing problems with collisions if you haven't chosen to use that functionality - unless you have other plugins also modifying collisions.
Okay, so it has nothing to do with a switch, the plugin is calling a common event when you step onto that region ID.

There are other ways to do that, but the fact from your first post remains that the plugin shouldn't be causing problems with collisions if you haven't chosen to use that functionality - unless you have other plugins also modifying collisions.
Ah alright, I understand. The plugin is calling the common events.

Oddly enough, that plugin isn't only causing problems with collisions. With the collision aspect, if I try to use the Rosedale Collision plugin, it crashes. I have corresponded with the creator, and it was determined that it is the Region Base plugin that has some incompatibilities. Ok, fine - but now, and the whole reason why I am looking to phase the Region Base plugin out, is that whenever I check if one of two switches are on in an event, it crashes again...with the Region Base plugin at the center of the crash. If there was a facepalm emoticon...it would be here right now.
With the collision aspect, if I try to use the Rosedale Collision plugin, it crashes.
Well, that's two plugins that are trying to modify the same thing which is literally what I mentioned in my previous post 😛

whenever I check if one of two switches are on in an event, it crashes again...with the Region Base plugin at the center of the crash.
If you need help with crashes, you need to press F8, go to the Console tab, and take a screenshot of the full error trace which you then post for help.

But it may not be worth trying to fix that part if you're also getting rid of the plugin because it conflicts with Rosedale. You may need to find something with a smaller scope to just do the common events by region, or use parallel events.
But it may not be worth trying to fix that part if you're also getting rid of the plugin because it conflicts with Rosedale. You may need to find something with a smaller scope to just do the common events by region, or use parallel events.
Thank you for your advice and input - it is always appreciated. I successfully phased out that plugin now, so that's sorted out then.

Original thread: https://forums.rpgmakerweb.com/threads/turn-switch-on-when-in-certain-region-or-terrain-tag.167633/