Does anyone know how to add encounters?

Alright, so for a game I'm fiddling around with, I wanted to know if there was a way to add certain encounters to a map and their weight in comparison to other enemies?

Here's an example:
Party starts in room one, they go into room two

in room two, they flip a switch

when said switch is flipped, they can encounter 'Poison Slimes'

but if said switch is turned off, they can no longer encounter the poison slimes

Does this require a plug-in? or am I missing something?
you can turn encounters on or off with events. However I don't know if you can change the type of encounters available with just events.

On and Off with just events. Yes!

Adjusting Types of encounters...not sure.

Tab 3>System Settings>Change Encounter>Enable/DIsable.

Make the lever enable encounters. Have another event that maybe autoruns at start of map to disable encounters. Probably want to set a variable somewhere but that should get you going.
Just Adjust the troop weight to something where you will basically never encounter you can do this from a common event.
you can turn encounters on or off with events. However I don't know if you can change the type of encounters available with just events.

On and Off with just events. Yes!

Adjusting Types of encounters...not sure.

Tab 3>System Settings>Change Encounter>Enable/DIsable.

Make the lever enable encounters. Have another event that maybe autoruns at start of map to disable encounters. Probably want to set a variable somewhere but that should get you going.
I know how to turn on+off encounters as a whole, but I want to know how to turn on individual encounters.

Just Adjust the troop weight to something where you will basically never encounter you can do this from a common event.
How so?
In your event page go to the script button, type this in.

This will change encounter weight of encounter 2 to 5.

$dataMap.encounterList[1].weight = 5;

Note that encounter one would be

$dataMap.encounterList[0].weight = 5;

Just make one of them so rare that you basically won't encounter it. Or you can switch it back with the same script command.

So if you had two troops and they both had 5 weight then the chance would be 5/10 or 50%.
if you set one to 50 and the other to 1 the the chance to encounter troop one would be 1/51.

Or encounter weight/(total encounter weights). Someone correct me if I'm mistaken.
There is this stupid idea of mine that I've thought about doing a few times so you can change your encounters and encounter rates whenever you want. Try to bear with me, this is hard to explain >.<

Okay first what ya need to do is set a variable to random 1-10 for every step you make. IF you want it to be 1 in 10 you would do, if Variable is the same as 1 encounter enemy, IF it is not 1 then just leave it blank. So it would look similar to this

EVENT = Parallel Proccess {

Arrow Key is Pressed {

Variable[Random] 1-10}

IF Variable = 1 {Encounter Enemy}

ELSE{(nothing)}

}

Then use the conditional branches to decide depending on switches or variables of what enemy you want it to be, or if you want the encounter rate to be less or more then you'd have IF bigger than 1 and less than 3, would make it a 3/10 chance of encountering an enemy every step.

I suck at explaining this stuff sorry and my coding knowledge is next to none, so please do not make fun of my attempt to code, I only did it to make it simple to understand.

However that will let ya modify the probability of certain enemy's and allow you to change the enemy's depending on levels and so many more things. If ya have any questions feel free to ask, I love to help as long as you can forgive my terrible explaining.
In your event page go to the script button, type this in.

This will change encounter weight of encounter 2 to 5.

$dataMap.encounterList[1].weight = 5;

Note that encounter one would be

$dataMap.encounterList[0].weight = 5;

Just make one of them so rare that you basically won't encounter it. Or you can switch it back with the same script command.

So if you had two troops and they both had 5 weight then the chance would be 5/10 or 50%.

if you set one to 50 and the other to 1 the the chance to encounter troop one would be 1/51.

Or encounter weight/(total encounter weights). Someone correct me if I'm mistaken.
I just tested this, and E. Gadd, it worked!

There is this stupid idea of mine that I've thought about doing a few times so you can change your encounters and encounter rates whenever you want. Try to bear with me, this is hard to explain >.<

Okay first what ya need to do is set a variable to random 1-10 for every step you make. IF you want it to be 1 in 10 you would do, if Variable is the same as 1 encounter enemy, IF it is not 1 then just leave it blank. So it would look similar to this

EVENT = Parallel Proccess {

Arrow Key is Pressed {

Variable[Random] 1-10}

IF Variable = 1 {Encounter Enemy}

ELSE{(nothing)}

}

Then use the conditional branches to decide depending on switches or variables of what enemy you want it to be, or if you want the encounter rate to be less or more then you'd have IF bigger than 1 and less than 3, would make it a 3/10 chance of encountering an enemy every step.

I suck at explaining this stuff sorry and my coding knowledge is next to none, so please do not make fun of my attempt to code, I only did it to make it simple to understand.

However that will let ya modify the probability of certain enemy's and allow you to change the enemy's depending on levels and so many more things. If ya have any questions feel free to ask, I love to help as long as you can forgive my terrible explaining.
could you keep explaining this via private message? xD
@Kelphy

Please do not hijack someone else's thread with your own, different, question.

Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/does-anyone-know-how-to-add-encounters.48793/