Chances
Chances
Section titled “Chances”How is the drop chance calculated?
Section titled “How is the drop chance calculated?”First, we determine the mob type from the mob killed. This is done via a predetermined pool of mobs, you can find that pool in the following link: MobGroupUtil.
After the mob type is determined, we check the “general drop chance” in chances.yml :
hostile-chance: 20000neutral-chance: 5000passive-chance: 1000boss-chance: 100000all-chance: 5000We then generate a random number between 0-100,000 and check if that number is below the chance. If it is, a card is dropped.
For example:
Section titled “For example:”Cards Drops:
Player kills a zombie. Type determined is “hostile”. Hostile chance is 20,000. Generated number is 12,456.
12456 < 20000 = drop
No Drop:
Player kills a zombie. Type determined is “hostile”. Hostile chance is 20,000. Generated number is 40,000.
40000 > 20000 = no drop
How is the card chosen?
Section titled “How is the card chosen?”We choose the rarity to drop a card from through a “weight” system. The chances you define in chances.yml define the weight. The higher the weight is, the higher the chance that rarity will drop.
common: hostile: 100000 neutral: 100000 passive: 100000uncommon: hostile: 20000 neutral: 10000 passive: 5000rare: hostile: 1000 neutral: 500very-rare: hostile: 10 boss: 100000legendary: hostile: 1 boss: 50000We use a CollectionSampler using the weights of all rarities as a sampler. For example, taking the “hostile” drop, we will pass the values to our sampler and then randomly return the rarity id.
If a type is omitted from a rarity section, that rarity will not drop from that mob category.