Region Events trouble: Battle and skill

Hey, everyone! Ran into a bug while using Yanfly's Region Events plugin.

Using some help form a tutorial on this site (http://blog.rpgmakerweb.com/tutorials/tutorial-using-regionid-in-events/), I was able to construct something of an environmental battle system for my main character. The good news is I was able to make it do what I want. The bad news is that the second I log into the game, it immediately enters the battle screen and relaunches battle after the battle is over. I use the "$gamePlayer.updateEncounterCount()" script per Yanfly's warning instructions.

If I can get it to stop looping like this, the system is complete, but I've no idea what's causing it. It's on the world map. There's no other parallel event running. There is one auto-run event solely for traveling from point a to point b. The other events are to enter and exit a dungeon or read a sign. The Region ID Common Event matches exactly. I attached a screenshot of the event in question just in case it may help.

Thank you in advance!
Is it possible that you have the step number for random battles on that map set to one or zero?
Because that would cause default random battles every step...
Is it possible that you have the step number for random battles on that map set to one or zero?
Because that would cause default random battles every step...

That was one of the first things I checked and it's at 10. Would that have an effect since it's technically both?

EDIT: Nope. I changed it to 7 and it still does it.
The problem is the script call. You have to find a way to limit when it's called. Most maps have an encounter count of 25 or so and common events can run up to 60 times a second. Try putting the script call in a conditional branch and assigning a switch that you can control to test.
The problem is the script call. You have to find a way to limit when it's called. Most maps have an encounter count of 25 or so and common events can run up to 60 times a second. Try putting the script call in a conditional branch and assigning a switch that you can control to test.

Doesn't work. If I put any number in the (), it just errors out as undefined. At any rate, Yanfly stated the reason for the script call was to reset:
(http://yanfly.moe/2015/10/19/yep-17-region-events/)
WARNING: Keep in mind that if you apply this in areas with step encounters, it will not cause the encounter countdown value to go down. This is how RPG Maker MV handles it. The same way if you were to lay out your map with touch-events that trigger common events, the encounter countdown value would not go down either. To get around this, within the common event used, place a script call with $gamePlayer.updateEncounterCount().

What you said and what Yanfly created seem to conflict so I'm at a bit of a loss.
You misunderstood what I said.

I'll try to explain it better:

YanFly is right in that the encounter count won't go down.
The updateEncounter function does that for you.
The problem here is that the count goes down so fast that it causes random battles to happen right away.
In order to stop that, you have to call the updateEncounter function less frequently.
I suggested using a conditional branch but didn't give good instruction as what you should do.

So, to try and clarify:

At the bottom of the event you posted the screenshot of, make an if/else command.
Make the condition look for a variable set above 200.
If it is, set that variable to 0 and cut and paste the updateEncounter script call in.
If it's not, increase the variable by 1.

This should slow the random battles down enough that you can actually play the game.

Let me know if I need to explain further.
Thanks that helps clear up the misunderstanding some.

As far as making the Conditional Branch, the variable option just has me set a variable switch, like with the Region ID. There's no number input anywhere, except constant. Are you referring to something else? If not, then I'm not sure how to set the Region ID common event above 200.

I could be misreading the emphasis and should be reading it "variable set" as set, like a kit, and not set, like input as. English can make text crazy sometimes lol

I'll keep fiddling around with it, but if you can elaborate a bit more, I'd appreciate it. I definitely appreciate the help so far 🙂
So I found the problem. The event script was fine, but I discovered that the Region Event plugin specifically doesn't work with the common event script. After disabling it, the instant battles stopped.

Near as I can figure because the two were operating to do the same thing in different ways, they conflicted with each other causing the instant battle bug. If anyone else is trying to do the same thing, I recommend using only the common event script and use the Region Event plugin for something else entirely.

Thanks for your input and sorry to be a pain, everyone!

Original thread: https://forums.rpgmakerweb.com/threads/region-events-trouble-battle-and-skill.89712/