Help - Search - Members - Calendar
Full Version: [Sub] Random Encounter Change
RPG RPG Revolution Forums > Scripting > Event Emporium > Eventing Tutorials
Logan110
I know a lot of people don't like random encounters but I thought I might help make it a little better for those that dont use a different system. This is mainly intended for a world map but can be used anywhere. This simply eliminates the use of the original random encounter set up on the map and creates a new version that can do a lot more.

Initiation
1st off we will set up our switches and variables we will be using.

We need:
  • 1 switch to turn encounters on - Lets name it: Encounter On/Off
  • 1 variable for the groups of monsters to encounter - Lets name it: Encounter Group
  • 1 variable for the rate at which you encounter monsters - Lets name it: Encounter Rate
  • 2 variables to determine if the player is moving - Lets name it: Player Movement 1 / Player Movement 2



We need to make a new common event, I'll name it simply Encounters. This will be triggered by a parallel process activated by switch Encounter On/Off.

Movement Check
Now we will start the common event by setting variable Player Movement 1 = Other | Steps (This is players steps)
We need a conditional branch, Player Movement 1 does not equal Player Movement 2.
This finds out if the player has moved. The player moved so lets set Player Movement 2 = Player Movement 1
Now we have that figured out lets figure out if they get attacked.

Encounter Group
First we need to see what Encounter Group we are using.
Use a conditional branch using variable Encounter Group == 1
Now set variable Encounter Rate to a random number 1 to any number. For this tutorial I'll use 500.

(This part can be done multiple ways but it depends on the user. I'll be using the less repetitive way.)

Use a Conditional branch variable Encounter Rate >= 1 then Conditional branch variable Encounter Rate <=5
Inside of that Call a Battle Process - Monster
Repeat above step until you have all the monsters you want for this encounter group.

It should end up something like
1 to 5 Slime x 1
6 to 10 Slime x2
11 to 20 Ghost x 2
21 to 25 Bat x 2
26 to 30 Bat x 3
31 to 35 Beast

So what this means is if the random number that was chosen is 1 through 35 we get attacked. Depending on what the number is, is what we get attacked by. The random number is set 1 to 500 so you have a 35 / 500 chance to get attacked every step, aka 7% chance, roughly every 15 steps.

Repeat those steps for each encounter group.

Turning It On / Off
Thats the basics but now we have to turn this on. The easiest way to initiate this is to incorporate it into leaving town events. Before you Transfer Player outside of town turn Encounter On/Off - on. Using the event to make you enter town turn the same switch off.

We have turned on the encounter rate but now we need to know what group we are fighting so we need to change variable Encounter Group to the group we want to fight. The first place you change this is simply back at the exit town event. Next is the big customization part. On your map make new events activated by player touch. Simply have them change encounter group to a new group. You want to fight new monsters in that forest, put encounter group forest on when you step on the forest.


And that is the tutorial. As you can see this can be used to customize encounters to extreme degrees. How often you get attacked, where you get attacked, allows you to add "Rare Monsters" and can let you do anything you want to the normal battles as every single one is called by you.

Below is the event coding as well as a small example of using it on a world map tileset. It does use quite a few events, but it depends on how customized you want the encounters.

Any questions / comments?
Click to view attachment
Click to view attachment
nevious
well ill say this for it, looks rather complicated... tho looking at the screenshot im sure id be able to set it up in time. tho i realy do love your tileset you have... id love to get my hands on that for vx.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.