Random encounters happen way too often?

I'm in the process of designing a new map and added a troop in the random encounters list. During testing I noticed that the encounters happen very frequently, I'm talking every 3-6 steps here. The chance was set at 15. I used the exact same troop with the same settings in another map before and it wasn't a problem at all (and still isn't!)

In the settings of the new map I changed the probability of the enemy encounter to 1 and it didn't do anything at all. What gives? I find it hard to believe that I hit that 1% chance this frequently.
The number you set in the map settings is not the probability of the enemy encounter
(Atleast not in the way you think)

The number dictates how many steps the player must take on average to have an encounter.
Setting the number to 1 would effectively make it so you have an encounter after every single step.
The number you set in the map settings is not the probability of the enemy encounter
(Atleast not in the way you think)

The number dictates how many steps the player must take on average to have an encounter.
Setting the number to 1 would effectively make it so you have an encounter after every single step.
Oh, right. I forgot about that. Actually, these are two seperate things. I changed around the chance of that particular troop appearing but completely overlooked the step-between-encounters count.
Also keep in mind the number you set for step rate the engine will roll a number between 0 and that number 2x, and add those up and add 1 to it. So really whatever you set for the step rate you will get anywhere from 1 step to 2x that number.

So for example if you set it at 30 you will get a fight between 1 and 60 steps.

You'd need a plug-in if you want to prevent the minimum from being 1.
Also keep in mind the number you set for step rate the engine will roll a number between 0 and that number 2x, and add those up and add 1 to it. So really whatever you set for the step rate you will get anywhere from 1 step to 2x that number.

So for example if you set it at 30 you will get a fight between 1 and 60 steps.

You'd need a plug-in if you want to prevent the minimum from being 1.
I see. That's good to know, thanks.
I changed around the chance of that particular troop appearing

Ah right, you mean the stuff on the right side of the map settings right?

Well the "Weight" value is also not based on pure %.

The way I understand it the weight work like this:

Let's say you have 3 Troops.

Troop 1 with a weight of 5
Troop 2 with a weight of 7
Troop 3 with a weight of 9
-> Total Weight of 21

The probability of encountering any given Troop equals "Troop Weight / Total Weight of all Troops"

So we would get these probabilities:

Encountering Troop 1 would be "5 / 21" ( ~ 24% )
Encountering Troop 2 would be "7 / 21" ( ~ 33% )
Encountering Troop 3 would be "9 / 21" ( ~ 43% )
Instead of depending on built in mechanism of random encounter you can make your own via common event, but it will require some changes in troop tab in your database:

1. Pick any game variable you want, set it to a random number, wich will store ID of troop ID from database:
2021-08-08 19_52_33-Database.png


then common event every Y of seconds of game will check percentage probability to start random battle with troop ID wich was randomly selected and stored in your game variable and by adjusting value of x variable shown in screenshot you can control how often those encounters will occur, if you set x to 1 wich will mean player will have 1% start encounter, 100 will set encounter to 100%.

Now if you have database of troop set like this:
2021-08-08 19_55_51-Database.png


Then you can also control how many opponents of one kind will be in battle, but if following id's contain mixed troops, then those mixed troops will occur in battle.

That's my suggestion to arrange troop database like that to keep things readable and easy to edit, but how you will do it is up to you.

Original thread: https://forums.rpgmakerweb.com/threads/random-encounters-happen-way-too-often.139377/