Introduction
Imagine you have a lootbox with possible item tiers. For example:
- Common
- Uncommon
- Rare
- Legendary
Now let's say we would like to have the probability of rarer items to be exponentially less likely to be drawn from a lootbox than the tier above. What are the assigned probabilities to each tier?
Math
My initial solution was formulated as:
Let's try a concrete example with 4 tiers
So the tier drop chances would be
| Tier | Expression | Probability |
|---|---|---|
| Common | ||
| Uncommon | ||
| Rare | ||
| Legendary |
Generalization (it's more math)
My formulation is okay but it's not generalizeable. What if we want to use another base besides ? What if we would like to have a specific lowest/highest probability? A friend of mine helped me come up with a generalized formula to answer these questions
Here, is essentially the scaling factor for the chosen set probability. If we choose the common tier to have the probability of , and , we get
Solving for yields
Plugging it back into the equation gives us the following probabilities
| Tier | Expression | Probability |
|---|---|---|
| Common | ||
| Uncommon | ||
| Rare | ||
| Legendary |
We can actually choose any one tier to have a specific probability to calculate the rest off of. Let's say we want the rarest tier to have the probability of 1%. What we need to do is to "isolate" it in our equation
To do that we divide the probabilities of the other elements by the prefix of the probability we want to keep constant
Solving for yieldsAnd one more time plugging the values...
| Tier | Expression | Probability |
|---|---|---|
| Common | ||
| Uncommon | ||
| Rare | ||
| Legendary |
Notes
- My original formulation is a special case of the generalized formula where and