Drop tables

Files under droptables/ nest freely and merge into one flat namespace. A mob names one with drops:.

example_boss_drops:
  conditions:
    - { type: damage_share, min: 0.10 }
  distribution: per_killer
  mode: all
  drops:
    - { item: minecraft:diamond, amount: "4-9" }
    - { item: minecraft:netherite_scrap, chance: 0.08 }
    - { table: example_shared_loot, chance: 1.0 }
    - { exp: "200-350" }

Table keys

dropslistrequired

The entries.

modestringdefault all

all rolls every entry independently against its chance. one_of picks exactly one by weight. n_of picks n by weight, without replacement.

nnumberdefault 1

How many, for n_of.

distributionstringdefault per_killer

per_killer gives each qualifying player their own independent roll. shared rolls once and drops it on the ground for whoever picks it up.

conditionscondition list

Gates the whole table.

Entry kinds

Each entry names exactly one of these:

KeyDrops
iteman item: a vanilla id, or a Sigil item where Sigil is installed
tableanother table, rolled in turn
expexperience
currencyVault currency
commandruns a command
questadvances a quest through AetherCore

exp and currency carry their amount in the key that named them, so { exp: "200-350" } is one row rather than two.

Entry keys

amountnumber or rangedefault 1

A fixed number, or a "4-9" range. Expressions work here too.

chancenumberdefault 1.0

For all mode. Written as a fraction or a percentage, where anything above 1 is divided by 100, so 0.08 and 8 both mean 8%.

weightnumberdefault 1.0

For one_of and n_of. Relative, not a percentage.

conditionscondition list

Gates this entry alone.

damage_share

conditions:
  - { type: damage_share, min: 0.10 }

A player who did not contribute at least this fraction of the damage gets nothing.

This looks like a condition and is written like one, but it is not one, because it needs the mob's damage ledger, which no condition can see. It is lifted out of the condition list rather than being faked as one, so it works only in a drop table's conditions, not in a skill's.

Ranges

The "4-9" form is accepted here, in drop amounts, experience and currency, because in these positions it cannot be ambiguous.

Everywhere else, 4-9 is a perfectly good subtraction, so <random.4to9> is the unambiguous spelling and the only one accepted. See Expressions.

Weighted sub-tables

example_shared_loot:
  mode: one_of
  drops:
    - { item: minecraft:golden_apple, amount: 2, weight: 6 }
    - { item: minecraft:enchanted_golden_apple, weight: 1 }
    - { item: minecraft:emerald, amount: "3-8", weight: 4 }

Referencing this from another table with { table: example_shared_loot, chance: 1.0 } is how a guaranteed "one good thing" slot is built without duplicating the pool into every boss.

Testing one

/bestiary droptable test <table>

Rolls the table and prints what came out, without killing anything.

Suppressing vanilla drops

A mob's options.prevent_other_drops defaults to true, so a custom ravager drops its table and not saddles. options.prevent_mob_kill_drops additionally drops nothing when the killer was not a player.

Run /bestiary droptable test <table> several times for weighted or low-chance entries: one roll proves parsing, not probability. The command cannot reproduce killer-dependent context such as damage_share, so finish those tests on a disposable mob with the intended attackers.