-
Notifications
You must be signed in to change notification settings - Fork 0
Drop System
okereke-dev edited this page Jun 30, 2026
·
2 revisions
RPGLoot hooks into mob death events to introduce rarity weapon drops into the world. No crafting — every rarity weapon is a loot find.
When a player kills a hostile mob, two rolls happen in sequence:
-
Drop roll — a random number is checked against
drop-chance(default 8%). If it fails, nothing drops and the process stops. - Rarity roll — a weighted random pick selects a rarity tier from the configured weights.
- A random weapon type and material are picked from the full pool.
- The weapon is generated with a random name, scaled stats, and rolled bonus stats, then added to the mob's loot.
ℹ️ Only hostile mobs (
Monster) killed by a player can trigger a drop. Passive mobs, animals, and environment deaths are ignored.
With drop-chance: 0.08 and default rarity weights:
| Rarity | Weight | Chance per kill | Avg kills for 1 drop |
|---|---|---|---|
| ⬜ Common | 50% | 4.00% | ~25 |
| 🟨 Uncommon | 30% | 2.40% | ~42 |
| 🟪 Rare | 13% | 1.04% | ~96 |
| 🟩 Hero | 5% | 0.40% | ~250 |
| 🟧 Legendary | 2% | 0.16% | ~625 |
Both drop-chance and rarity-weights are configurable in config.yml. See Configuration for the full reference.
Example — rare-focused server (harder to get anything, but better quality when it drops):
drop-chance: 0.04
rarity-weights:
common: 20
uncommon: 35
rare: 30
hero: 10
legendary: 5
⚠️ rarity-weightsvalues must add up to exactly 100. If they don't, a warning is printed to the server console on startup and drops will be skewed.