Mob Drop Commands

Run console commands as mob drops

Overview

Mob Drop Commands run console commands when a player kills a mob. Use it to hand out custom items via another mod, award currency, trigger a broadcast, or gate rare drops behind a chance roll. Each pool has its own chance, delay, tier filter, and optional player-facing notification.

Config lives in mods/mmoskilltree/mob-drop-commands.json and is override-based — the file only stores your customizations on top of the defaults.

File Structure

{
  "schemaVersion": 1,
  "overrides": {
    "Trork_Warlord": {
      "disabled": false,
      "pools": [
        {
          "commands": ["give {player} Weapon_Longsword_Flame --quantity=1"],
          "chance": 0.05,
          "delay": 5,
          "requiredTier": "",
          "notification": {
            "enabled": true,
            "color": "#4a9eff",
            "icon": "icon_loot",
            "primaryKey": "notify.mob_drop",
            "secondaryKey": "notify.mob_drop.hint"
          }
        },
        {
          "commands": ["eco give {player} 500"],
          "chance": 1.0,
          "delay": 0,
          "requiredTier": "Legendary"
        }
      ]
    }
  }
}

Each key under overrides is a mob pattern. Each mob has a list of pools; every pool rolls independently on kill. Setting disabled: true on a pattern suppresses all pools for it, including any shipped defaults.

Pool Fields

FieldDefaultPurpose
commandsOne or more console commands to run. See placeholders.
chance1.0Roll threshold (0.0–1.0). 1.0 means always.
delay0Delay in ticks before commands run. Useful to sequence multiple drops.
requiredTier""Elite tier filter. Empty matches every kill; a tier name (e.g. Legendary) matches only that tier (case-insensitive).
notificationoptionalLocalized floating notification. See notifications.

Placeholders

Command strings may use these placeholders:

  • {player} — killer's username
  • {mob} — mob type identifier (e.g. Trork_Warlord)
  • {tier} — elite tier name, or empty string if the mob wasn't elite

Notifications

A notification block produces a floating cue for the killing player when the pool fires. The primaryKey and secondaryKey fields are localization keys resolved against the lang files.

Pattern Matching

Mob patterns follow the same longest-substring rule as Mob Kill XP. When a mob dies, its type identifier is compared against every pattern and the longest match wins. More specific patterns (e.g. Trork_Warlord) take priority over shorter ones (e.g. Trork).

All pools under the winning pattern roll independently. Pools from shipped defaults and user overrides are concatenated unless the pattern is disabled.

Pairing with Elite Mobs

Because requiredTier reads the mob's current elite tier, you can use Mob Drop Commands to give elites better drops than their non-elite counterparts. Leave requiredTier empty on your standard pool, then add a second pool with requiredTier: "Legendary" for a boss-caliber drop.

See Elite Mobs for how tiers are rolled and what tier names are available.

Admin Dashboard

The admin dashboard has a Mob Drop Cmds page under /mmoadmin that lets you add, edit, and remove pools without hand-editing the JSON. Changes persist to mob-drop-commands.json and take effect on the next kill — no restart required.