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
647
Reaction score
898
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 Posts

Latest Profile Posts

I'm so annoyed with myself...I can't get this code to work so it looks like I'm going the plugin route for a problem I should be able to do myself :kaolivid:Great. Now I get to murder save file compatibility. Again.
Can't believe my code from four years ago is still working! Did some expansions, and...
1635194553179.png
In related news, I may have an update for my old Extra status window plugin ready. That is, once I manage to sit down and update the documentation... and the demo project... :kaoswt:
How does one pronounce Godot? I've heard it pronounced a couple of different ways, and I genuinely don't know the proper way.
March 2020 ...
1635188823939.jpeg
... vs October 2021
You look like you had a rough day...Here, have a Baby Panda!

Forum statistics

Threads
116,077
Messages
1,095,542
Members
151,441
Latest member
guertena_1
Top