Skip to content

Drop System

okereke-dev edited this page Jun 30, 2026 · 2 revisions

🎲 Drop System

RPGLoot hooks into mob death events to introduce rarity weapon drops into the world. No crafting — every rarity weapon is a loot find.


⚙️ How it works

When a player kills a hostile mob, two rolls happen in sequence:

  1. Drop roll — a random number is checked against drop-chance (default 8%). If it fails, nothing drops and the process stops.
  2. Rarity roll — a weighted random pick selects a rarity tier from the configured weights.
  3. A random weapon type and material are picked from the full pool.
  4. 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.


📊 Drop rates at default settings

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

🎛️ Customizing drop rates

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-weights values 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.

Clone this wiki locally