Editing Encounters in Map Regions by Variable

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
What I'm trying to accomplish:

My map is split into 16 Regions using the RPG Maker MV Region system. Seperate variables in each region called "MonstersRemaining" are decremented by 1 after each battle, tracking how many monsters remain. If it becomes equal to zero, I would like encounters to disappear from that associated map region, but I cannot find a way to interact with the Map Properties Encounters by event or script. If anyone could offer advice or help me out with a plugin I would greatly appreciate it.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
364
Reaction score
335
First Language
german
Primarily Uses
RMMZ
Do it with Eventing. Parallel Process. You can get the Region Id the Player is standing on right now, I dont know the command by heart but you can.

Check if the Player moves by storing his coordinates and retrieving them and see if they changed in the last second. Set a random Variable and make an If Fork to determine if an encounter should happen. Get the Player's Region Id and make some If Forks to start the associated encounter.
When having 16 Regions, make 16 Variables that count how many are remaining.

Its a very rough explanation, so tell me if you need more assistance.
 

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
Thanks for the reply,
I had thought about going about it that way, but was put off of the idea by multiple threads online during my Google search saying that Parallel Process events that run functions tend to heavily lag the map unless they're turned off at some point. And this event chain would be running essentially forever, constantly checking a branching condition and pulling two variables. I already have world map events running and performance would be at a premium. I'll keep it in mind as a last resort, but is there a more efficient way to do this with JavaScript? I just have no idea how to modify anything internal to the engine like encounter tables and regionIDs.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
364
Reaction score
335
First Language
german
Primarily Uses
RMMZ
Just make a Wait (10) and the Event wont lag anymore
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Lately when I listen to 1970s songs, I always think that the "real world" is still at mid 70s. What we experience now is a futuristic dream. With this point of view, even 80s and 90s looks super futuristic. :D

The GIF of this seemed too cool to bury in replies. :LZSwink:
You may have slept with my aunt... but, given the circumstances, cheers.

- Professor Ian Duncan, 2013
Ami
--- Swimming ---

F.Knight: This Shrine always Flood. We don't have a choice,we have to Swimming in this place
F.Healer: That Insane!
F.Mage: We can use…Boat,rather than Swimming
F.Knight: You guys…Can't Swim?
F.Healer & F.Mage: (Shocked) Eehh??

Forum statistics

Threads
105,525
Messages
1,014,392
Members
137,209
Latest member
RowanWolf
Top