Mob Drop Commands

Run console commands as mob drops

Overview

Mob Drop Commands run console commands and/or a native item drop when a player kills a mob. Use it to hand out custom items via another mod, award currency, trigger a broadcast, or spawn ground-item loot at the corpse. Each pool has its own chance and an optional player-facing notification.

The simple surface, beside Bonus Drops

This file stays as it is: the short way to say "run this when that mob dies". It is consulted first on a kill, and disabling a pattern here silences it in Bonus Drops as well. Reach for Bonus Drops instead when you want the fuller vocabulary: shared loot tables, block breaks as well as kills, chance formulas that read a player's luck or another mod's readings, and per-row overrides of what the mod itself ships. Shipping kill drops as an installable add-on is Bonus Drops work too - author Server/MMOSkillTree/BonusDrops rows in a folder, zip it, and drop the .zip into your server Mods/ folder. See Building the zip.

Opt-in, zero default pools

The mod ships with no default drop pools. This feature does nothing on a fresh install; a server owner must author entries in mob-drop-commands.json before any bonus drop fires. This file is a server-owner surface only - there is no content-pack folder behind it, and no on-by-default 5%-per-kill drop.
Override configmods/mmoskilltree/mob-drop-commands.json

The file stores your authored pools; there are no shipped defaults to override.

File Structure

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

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.

Pool Fields

FieldTypeDefaultDescription
commands-[]Optional. One or more console commands to run. See placeholders.
dropList1.5.0-nullOptional. The id of a native Hytale ItemDropList asset. When set, the pool spawns that drop list's ground items at the corpse - no console command needed. A pool can set dropList, commands, or both.
chance-1.0Roll threshold (0.0–1.0). 1.0 means always.
notification-optionalLocalized floating notification. See notifications.
* required

Two retired fields Since 1.6.0

The file moves to schema version 4, and existing overrides are converted in place on the first start after upgrading. Two fields are no longer read, and a file still carrying either one gets one start-up warning naming it:

  • delay - a pool's commands all run immediately, in the order they are written. Sequencing them by ticks never did what it looked like it did.
  • requiredTier - dead schema that silently disabled any pool setting it, because the built-in elite-mob system it keyed on was removed in 1.5.0. To gate a drop on mob difficulty today, write a Bonus Drops kill row whose chance reads MMO Mob Scaling's rarity tier.

The admin dashboard drops both inputs to match.

Placeholders

Command strings may use these placeholders:

  • {player} - killer's username
  • {mob} - mob type identifier (e.g. Trork_Warlord)
  • {tier} - the kill's attributed rarity (e.g. Legendary), supplied by a companion mod through the kill-rarity provider (MMO Mob Scaling attributes its rolled rarity). With no provider installed, or for an unscaled mob, it resolves to blank rather than printing a literal {tier}. Unrelated to the retired requiredTier pool filter above

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.

No tier filter on this surface

Every pool under a matched pattern rolls on every kill of that mob; there is no way to make a pool boss-only from this file. That is what the fuller Bonus Drops surface is for: a kill row's chance formula and its roll conditions can read the rarity tier, the affix, or the frozen difficulty of the mob that just died, supplied by the separate, optional MMO Mob Scaling companion mod.

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.