🎡 Rarity, Weights & Chances
About
Rewards and rarities uses Weights to define their probability (roll chance).
Weight can be any value and will affect the roll chances of all rewards/rarities.
You can see the roll chance for rewards in editor and also via Reward Placeholders.
If you're experiencing rewards with low weights to roll very often, make sure their roll chance is under your expectations.
Rarity
Rarities is a good way to split your rewards by "cateogories" where each rarity has it's own roll chance to make certain rewards even more rare or common.
When there are rewards with different rarities in a crate, a rarity is choosen first. Then, reward is choosen based on selected rarity.
To edit or create new rarity, go to config.yml
-> Rewards -> Rarities. You will see a few default rarities there. Feel free to remove or edit them.
If you don't like the rarity feature, simply keep all rewards in your crates with the same rarity (so it won't affect the roll chance in any way), or leave only one rarity.
Then you can remove all rarity related text from preview and messages configs.
You must have at least one rarity available for the plugin to load and work.
Roll Chance Calculation
Roll chance is determined: <weight> / <sum of weights> = <roll chance>%
Example. You have total 3 rewards in a crate:
Dirt. Weight: 50
Apple. Weight: 10
Gold Ingot. Weight: 2
Their sum of weights is 62 (50 + 10 + 2).
Roll chance for each reward is determined as stated above:
Dirt:
50 / 62 = ~0.8
(80%)Apple:
10 / 62 = ~0.17
(17%)Gold Ingot: =
2 / 62 ~0.03
(3%)
The sum of final values is 1.0 (100%). So you can use any value as a weight it will scale properly.
Roll chance can be modified by reward's rarity:
<reward weight> / <sum of reward weights> * (<rarity weight> / <sum of rarity weights>)
Direct Chance Values
If you want to use direct chance values for your rewards or rarities, the sum of weights of all rarities or crate's rewards must be exactly 100:
Dirt. Weight: 80
Apple. Weight: 15
Gold Ingot. Weight: 5
The sum of rewards above is 100, so their roll chances are the same as weight values.
If your rewards have diffirent rarities, roll chance may not be equal to the weight value.
Last updated