One-time random encounter

Hi guys, so I tried searching for a method to accomplish this, I couldn't find anything. Perhaps I just wasn't using the right words in my search. But anyway, there are multiple things I want to accomplish here.

- I want a random encounter that will trigger dialogue once started

- If the random encounter is defeated I want one of the player characters to learn a new spell, and I want the random encounter to never appear again

- If it is NOT defeated, I want it to appear again until defeated

This battle would appear on the world map, I am using region-based random encounters. I would like to know of this is possible or if I should just create a designated place for the battle to occur.

Thank you for reading 🙂
So like the Legendary Dogs in Pokemon Gold and Silver? Or certain of the Djinn in the "Golden Sun" games? Except for the skill that is anyway.
Yes, exactly that kind of thing 🙂
Use an event set to parallel processing that acts the same way as random encounters.

Let's say your map has random encounters set to every 30 steps, and you want this special random enemy to appear only on region 5. Variable 1 is for "last steps" and variable 2 is for "working". You will have to assign your own variables, and replace the number of steps, region id and variable ids in the code below according to what you have available. Make sure you name your variables so you don't use them for something else. You'll also need a variable for the player's x and y location. I'll use 3 and 4.

Wait 4 FramesControl Variables: [002: Working] = Game Data > Other > StepsConditional Branch: Variable [002: Working] > Variable [001: Last Steps] Control Variables: [001: Last Steps] = Variable [002: Working] Control Variables: [003: Player X] = Game Data > Character > Player's > Map X Control Variables: [004: Player Y] = Game Data > Character > Player's > Map Y Get Location Info: [002: Working] = Region ID of Variables [003: Player X], [004: Player Y] Conditional Branch: Variable [002: Working] = 5 Control Variables: [002: Working] = Random 1 - 30 Conditional Branch: Variable [002: Working] = 30 Show Text (add your dialogue here) Battle Processing: add your enemy troop, specify continue even when losing When Win Change Actor Skills: [actor] learns [skill] Control Self Switches A = ON When Lose Branch End Branch End Branch EndBranch EndThen create a second page on that event conditioned by self switch A. Leave everything else on that page as it is. This will prevent the random encounter ever happening again once the enemy has been beaten.So what's happening here is that every time the player takes a step, it checks if they're on the correct region. If they are, it chooses a random number between 1 and 30. If the number is 30, it shows the text and launches the battle. If the battle is won, the actor gets the skill and the event turns itself off, to never run again. If the battle is lost, it goes into waiting until they take another step. On average, if the player stays on the specified region, they would have one battle every 30 steps.
I had trouble getting it to work but it turns out I just hit an arrow key after selecting something from a drop-down menu. It works perfectly now, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/one-time-random-encounter.54844/