Need a little math help with regards to enemy encounter rate.

TakumaGao

Veteran
Veteran
Joined
May 22, 2019
Messages
85
Reaction score
22
First Language
English
Primarily Uses
RMVXA
I'm back, and I'm still terrible at math! :p

So in this particular area of my game, there are 5 different enemy troops that can be encountered. I want three of those troops to have a 30% chance of being encountered each, totaling 90%. Then for the other two troops, I want them to only be encountered 5% of the time each.

So, on the Encounters tab of the map properties... how exactly would I achieve this? What value should I assign to each of these five troops in order to achieve that 30%/30%/30%/5%/5% split that I want?
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
644
Reaction score
888
First Language
German
Primarily Uses
RMMV
Assign the 30% troops the value 6 and the 5% troops the value 1.

so 30%/30%/30%/5%/5% -> 6/6/6/1/1



Here is brief explaination for what these numbers actually mean:

The probability for any given troop to appear equals " WEIGHT OF TROOP / TOTAL WEIGHT "
So in your case, 6+6+6+1+1 equals 20.

Then we can calculate:
6 / 20 = 0.3 -> 30%
1 / 20 = 0.05 -> 5%
 

TakumaGao

Veteran
Veteran
Joined
May 22, 2019
Messages
85
Reaction score
22
First Language
English
Primarily Uses
RMVXA
Assign the 30% troops the value 6 and the 5% troops the value 1.

so 30%/30%/30%/5%/5% -> 6/6/6/1/1



Here is brief explaination for what these numbers actually mean:

The probability for any given troop to appear equals " WEIGHT OF TROOP / TOTAL WEIGHT "
So in your case, 6+6+6+1+1 equals 20.

Then we can calculate:
6 / 20 = 0.3 -> 30%
1 / 20 = 0.05 -> 5%
Thank you! :D
 

Latest Threads

Latest Profile Posts

you know, some days you get resentful that game dev is even considered a "fun job" and other days it's like, welp, time to roll up my sleeves and code these molotov cocktails
If you suck at playing trumpets, that is probably why.
Been sick with a stomach virus for seven days now. Not going to work tomorrow because I'm still contagious according to my doctor.
Much as I love my job, I really hate playing "office politics". It would be nice if I didn't have to pretend to be someone else all day long.
I wanna get back into showing off Battlers and other assets I create again. But i'm always haunted by the "It's not good/realistic enough" voices that keep me from doing so.

Maybe I should get back to it, I did enjoy showing off whatever I came up with!

Forum statistics

Threads
115,958
Messages
1,094,385
Members
151,223
Latest member
leolotus
Top