This script allows you to run a common event when you encounter an enemy through "random encounter".
When the common event finishes executing, the random encounter battle will begin.
In this common event, you have the opportunity to run some extra logic before the battle occurs. The enemy troop that you will battle is available, and you can use this information in your event. For example, you may choose to display a message if a certain troop is encountered.
This script provides a special command that allows you to "cancel" the encounter, allowing you to create mechanics that allow players to skip encounters if they do not wish to battle.
Thanks! I used this for making custom battle transitions and it's made things so much easier than having to figure out how to get the default transition to do what you want.
Also used it to allow players to implement time-based encounter skipping using a single common event, so there's a lot of potential.