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
378
Reaction score
350
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
378
Reaction score
350
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top