# Random Encounter Indicator

• ### No

• Total voters
3

#### GoodSelf

##### Zhu Li! Do the thing!
Random Encounter Indicator
Difficulty: Beginner

Those of you who have played the classic RPG Legend of Dragoon already know what's up, but for the rest of you, welcome! This is a tiny little event I whipped together, and I wanted to share it with you all to add some dynamic to your random encounters. This system is built with the in game random-encounter system in mind, and there is plenty of room to add additional clauses to customize it even more.

-~-O-~-~-O-~-~-O-~-
If you wanted to use your own graphics instead, we will be utilizing the User Defined Balloons 1, 2, and 3.
We will be creating 2 Variables, and 2 Switches for this system to work:

Var: Randomizer - This is used to create a random number which will be used to calculate how many steps the player needs to take.

Var: Current Steps - This is used to obtain the current amount of steps the player has taken throughout the entire game - used for math purposes.

Switch:
Random Encounter Link - This Switch will be assigned in each Troop tab as a Turn 0 event command, and serves to reset the Indicator after each encounter.

Switch:
Encounter Enable - This is simply the On/Off switch for the entire system. If you wanted to disable the system (for a cut scene, for example) simply turn this switch off.
Create a new event and set it up like in the picture below:

First, we disable the in-game encounters. Then, set Variable 1 to whatever you desire for the step count, but I decided to go with 30-60 steps for the first section. Next, set Variable 2 so that it is equal to Game Data -> Steps. Finally, we are going to add Variable 2 to Variable 1, therefore creating the limit we need to hit in order to reach the second stage of the encounter indicator. Simpy turn on Self Switch A, and move to the next step.
Add a second page to your event and set it up like in the picture below:
Create a Loop - all of our eventing will be inside of it, starting with the first stage of our indicator (green gem). This system utilizes Balloon Icons - if you downloaded the included image, set the Show Balloon Icon command to User-defined 1, followed by 60 frames of wait time. Next, we want to refresh the amount of steps that have been taken, and compare it to the limit we set earlier. So, set Variable 2 equal to Game Data -> Steps, then we will create a Conditional Branch to see if Variable 2 is greater than or equal to Variable 1.

If this is true, the player has hit the limit we set earlier. Once this happens, we will set a new limit for the second stage of our indicator (yellow gem). For this, I have chosen a random amount of steps between 15 and 30, half of the previous stage, to be assigned to Variable 1. I will once again set Variable 2 equal to Game Data -> Steps, then add that variable onto Variable 1 to create our new limit. Set the Self Switch B on, and move on to the next step!
If you got through Step 4, this is going to be a cake walk! We are setting up the same exact event, except this time, once we hit our limit, we will turn Self Switch C on.
All we are going to do now is Enable Encounters, and show the final stage of the indicator (red gem). We're going to let the engine handle random encounters from here!
To finish off our event, we will create one last event page. This page has another condition attached to it, Random Encounter Link, which when turned on, will erase itself and all the Self Switches attached to the Indicator event, resetting the system.
We're on the home stretch now - most of the eventing has already been done! Now, we will be tying in the encounters on the map, and the troops in our database. First, open the map in which you want to have encounters, and make sure to assign all of your troops accordingly! In the Encounter field, I wrote in 8 steps - you can place what you like, however I recommend a low number since the the player has already had anywhere from 45-90 steps without a battle thus far.
Next, we want to ensure that each of our troops have the clause to reset our Random Battle Indicator back to stage one. This can be done rather simply by creating a Battle Event on Turn 0 that turns our Random Encounter Link Switch on. Follow the image below, and repeat for each troop!
Pat yourself on the back, you did it! Have fun running around raking in those random battles! I encourage you to mess around with this system, as there are many ways to build and improve upon it! You could create a system where the time between encounters increases and deceases depending on what time of day it is, or perhaps you could change which image is used for the indicator mid game, it's yours to discover. Have fun, and happy game designing!
-~-O-~-~-O-~-~-O-~-

#### Attachments

• 99.8 KB Views: 6
• 105.6 KB Views: 5
• 104.1 KB Views: 4
• 93.1 KB Views: 2
• 89.5 KB Views: 3
• 89.5 KB Views: 3
Last edited:

#### Wavelength

##### Edge of Eternity
Interacting with the actual Random Encounter system using the Encounter On/Off event is a very creative and brilliant way to implement the logic for letting the player know when an encounter is imminent!

It's worth noting that this approach will disable the normal behavior that controls double encounter rates while in Bush tiles, and while wearing Encounter Half equips, during the time that your eventing (rather than MV's actual encounter system) is handling things. Designers who aren't willing to make those small sacrifices should look for a full-fledged plugin instead, but for everyone else, this looks like an easy way to take a lot of the frustration out of random encounters that come out of nowhere!

##### Veteran
I got 2 questions while its very nice idea though. (while a demo is handy when the
images dont work or not always)

1) if the indicator is red, you save the game, resboot the game, will the icon still be red?
and have the encounter closeby or will it be green or orange?

2) would this also be possible when you are close to a chest or entrance that can interact
with (sooner or later to go back too)?

#### GoodSelf

##### Zhu Li! Do the thing!
@ShadowDragon I can certainly take a look into both of these for you. I'll edit this post once I'm able to.

#### YoraeRasante

##### Veteran
1- it will still be red and have the encounter just the same as usual random encounters.
The level is set through self-switches and steps to next level is set through variables, meaning they are saved when you save the game. The encounter when red is the base random encounter but with a low steps number, so it will be calculated just the same as normal too.

2- This has a switch to keep it going. If you want to make an area not count, you just turn that switch off and, if the variable for level is on the red value, turn random encounters off. Don't forget to turn them both back on when you get out of it.
That said, the only way to know if it is in the red as it is is through the event itself's self-variables... So I suggest just adding a variable or normal switch and change them in the point when the level changes, and turn them back to 0/off in the reset page.

@Wavelength
I didn't know about bush tiles having double encounter rate!
But yeah, this is the base, for those things you'll need something more in-depth. I mean, he could use plugins for the image instead of balloons among other things.
But for beginners...

@GoodSelf
A very creative solution just turning random encounters on or off, as Wavelength said! I must admit I was thinking of making a brand new encounter system for this.
(I myself met it on SMT games the first time, then Etryan Odyssey and Persona Q)
Just one thing... If you turn the system off, walked around somewhere and later turn it on again, unless you used the Random Encounter Link switch, the way it is right now it'll kinda jump right to the next level right away.
If I may make a suggestion, to change steps 2, 3 and 4.
• On 2, add a new variable, "Level Steps".
• On 3, instead of adding current steps to the Randomizer value, keep it the same.
• On 4 and 5, instead of checking if the current steps are higher than the Randomizer value, check if the variable the steps are saved on is higher than the current steps, and if so add 1 to "Level Steps" and set the steps variable to the current steps to make them equal. Then check if "Level Steps" is higher than the Randomizer value, if it is turn "Level Steps" back to 0 but keep going to next level as usual.

### Latest Profile Posts

ESAMarathon on Twitch, now streaming "Eat Girl". Yep, that's the title of a game... Apparently it's a Pacman knockoff.... Which is of course the only logical conclusion one would get from a name like "Eat Girl". I can't believe anybody would think anything else!
Super stoked i just finished my first town in my project, by finished i mean i can always add more decorative aesthetics and the NPCs don't talk yet but the mapping is complete and all the important chess pieces are present!
My brain: Hey, I have an idea how to make the transition to the main story quest in The Wastes more natural!
Me: Good!
My brain: You need to remake the hotel you start out in, it's not realistic enough.
Me: Ok... This was unexpected, but I can do it.
My brain: Now make each hotel floor 5 times as large to match the main part. Oh, you also need to make a bunch of new npcs to fill in the space on these maps.
Me: Crap.
Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.