Random Encounter Events MV

In RPG Maker, you can set up your maps so that the player will randomly encounter enemies. You can choose what enemies will be present on the map, what regions they will be available in, how often they will show up, and so on.

During the game, the player can then explore your maps and randomly encounter enemies.

However, what happens if you wanted to have some more control over the random encounters? What if you wanted to increment some variables depending on what you encountered? Or perhaps give the player a chance to skip the encounter by pressing a certain sequence of buttons in time!

This plugin gives you the tools to apply your eventing knowledge towards random encounters as well.

When the player runs into a random encounter, a common event of your choice will execute, before the battle begins.

Download

Installation

Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_RandomEncounterEvents plugin. Please do not rename this.

Once it is in your list of plugins, turn the plugin on.

Usage

Begin by reserving a variable in your game. This is a special variable that the game will use to determine which common event will run.

Next, go to the plugin manager, double-click on the RandomEncounterEvents entry, double-click on the “Variable ID” entry, and enter the ID of the variable that you’ve decided to use.

And now everything is ready.

Quick Tutorial

To test that it works, follow this example:

1. Let’s assume you have chosen variable 10 as your random encounter variable, and that your map has some random encounters set up.

2. Create a common event that will display a message “Encounter!” We’ll assume this is common event 1.

3. Start testplay, press F9, and change the value of variable 10 to the ID of the common event you set up in step 2. In this case, I will set it to 1.

4. Now, run around and wait for a random encounter. At some point, you should get a message that says “Encounter!”, and once you finish reading the message, the battle will occur.

If you see the encounter message, then your random encounter event has been set up successfully. You can choose which common event to run at anytime using events.

You may also like...

12 Responses

Is there a way to configure this plugin for ALL battles, regardless of “randomness”?
I see a particular use in my own game, where the main character will eventually gain the ability to rewind time in the battle.
However, the problem lies with storing all the variables correctly at the beginning of ALL battles.
Speaking of which, do you plan on updating your action history and time reversal script?

I have a list of random events that will occur, only some of them are actual encounters. What I’d like to do with this strip is that, at the start of the Common Event, Cancel the Encounter, and then go through the random-generated events, and when it comes to an event that is an encounter, set it up and run that. I hope I can do it with this plug-in.

Yes, you could use this plugin as a way to turn your random encounter into a “Random Chance event” where you roll some dice and depending on what you land on, you might run into an actual encounter, or you might win some gold or exp, or something else.

You could use the battle processing command to set up a different battle.

To create code blocks or other preformatted text, indent by four spaces:

This will be displayed in a monospaced font. The first four
spaces will be stripped off, but all other whitespace
will be preserved.
Markdown is turned off in code blocks:
[This is not a link](http://example.com)