Skip to main content

Extractioncraft Loot System

Extractioncraft has a layered loot system built on three concepts: content packages reference loot tables, loot tables reference loot pools, and loot pools define the actual items that can drop.

Overview​

Content Package
-> chestLootTables / barrelLootTables (weighted selection)
-> Loot Table
-> lootTable entries (each has a chance to roll)
-> Loot Pool
-> eliteMobsLoot / vanillaLoot (weighted selection of one item)

Loot Tables​

Loot table configs live in the loot_tables/ folder. Each file defines a list of loot pool entries, where each entry has an independent chance to produce an item.

KeyTypeDefaultDescription
isEnabledBooleantrueSet to false to stop the table from producing any drops. Containers skip a disabled table when picking one, and mob kills ignore it.
spawnPoolsString list[]BetterStructures spawn pool names. When an EliteMob associated with a matching spawn pool is killed, this loot table is used for its drops. The comparison is case-insensitive and ignores a trailing .yml, so kobold_miner_pool and Kobold_Miner_Pool.yml both match.
lootTableList of objects[]Each entry references a loot pool filename and a chance (0.0 to 1.0)

Loot Table Entry Format​

lootTable:
- filename: my_loot_pool.yml
chance: 0.5
- filename: another_pool.yml
chance: 0.2

Each entry rolls independently. A chance of 0.5 means a 50% probability that this pool produces a drop. chance may be a number or a numeric string. An entry whose pool file does not exist in loot_pools/, or whose chance is missing or outside 0 to 1, is skipped with a warning at startup; the other entries still load.

Loot Pools​

Loot pool configs live in the loot_pools/ folder. Each pool defines a set of possible items. When a pool is rolled, one item is selected based on weighted probability.

KeyTypeDefaultDescription
isEnabledBooleantrueSet to false and loot table entries that reference this pool never roll it.
eliteMobsLootList of objects[]EliteMobs custom items that can drop
vanillaLootList of objects[]Vanilla Minecraft items that can drop

EliteMobs Loot Entry​

eliteMobsLoot:
- filename: my_elite_item.yml
weight: 1.0
- filename: another_item.yml
weight: 0.5

The filename references an EliteMobs custom item config. The weight determines relative drop probability among all entries in the pool.

Some custom items are left out of the selection before it is made:

  • An item with a permission is only eligible from chests and barrels, and only for a player who has that permission. The dropped item belongs to that player, so nobody else can pick it up. Mob kills never drop permission-locked items.
  • An item with itemType: CLASS_LOOT is only eligible when EliteMobs class loot allows it for the drop's difficulty and rank. Class loot drops unbound.

Vanilla Loot Entry​

vanillaLoot:
- material: DIAMOND
weight: 1.0
- material: GOLD_INGOT
weight: 2.0

The material is a Bukkit Material enum name. The weight works the same as for elite loot entries. All elite and vanilla entries in a pool compete in a single weighted selection, so a pool always produces at most one item per roll. Vanilla items always drop as a single item. A material that is unrecognised, is not an item, or is air is skipped with a warning at startup, and an eliteMobsLoot filename that does not match an EliteMobs custom item logs a warning at drop time and produces nothing.

Weights may be written as decimals (0.5), whole numbers (2) or numeric strings ("1.5"), and must be greater than 0. An entry with a missing, zero, negative or non-numeric weight, or without a filename or material, is skipped with a warning at startup; the rest of the pool still loads.

Container Loot (Chests and Barrels)​

When the match goes live, BetterStructures places a chest or barrel at every container marker in the map. When a player in the match right-clicks a chest or barrel:

  1. The vanilla container never opens. The interaction is cancelled and replaced with the Extractioncraft looting flow, which only runs while the match is live and only for containers the match placed.
  2. The player must stand perfectly still for 3 seconds. A countdown is shown as a subtitle.
  3. Any change in position cancels the interaction ("Don't move while opening a container!"). Looking around without moving is allowed. A player can only be opening one container at a time, and a container can only be opened by one player at a time.
  4. The loot table was selected from the package's weighted chestLootTables or barrelLootTables list when the interaction began. On success, it generates the drops.
  5. The container is replaced with air, and the selected loot table's entries each roll independently. The resulting items drop on the ground at the container's location.

Containers display portal particles every 10 ticks while active in a match, making them visible to players.

Container drops use the package's contentLevel (default 10) as the EliteMobs item level. Their class loot difficulty comes from the zone the container sits in, as described under mob kill loot, and their rank is the lowest one, trash.

Mob Kill Loot​

When an EliteMob dies in the world of a live Extractioncraft match, the plugin reads the betterstructures:spawnpool custom data that BetterStructures attaches to the bosses it spawns. Mobs without that data, and deaths outside a live match world, never generate Extractioncraft loot.

Every enabled loot table whose spawnPools list matches the mob's spawn pool generates drops at the death location. This is not a weighted pick, so listing the same spawn pool in three loot tables gives you three independent sets of rolls. The mob's own level is passed to EliteMobs for level-appropriate item generation, along with the boss's class loot difficulty and rank.

BetterStructures spawns each instanced boss at its spawn pool's maxLevel when the match goes live. Each of those bosses also gets the difficulty of the zone it spawned in. The zones are square bands around the center of the map:

ZoneDistance from the center on either axisDefault EliteMobs difficulty
2Less than one sixth of the map's widthMythic
1Less than one third of the map's widthHard
0The rest of the mapNormal

The difficulty names come from the difficultyIds mapping in EliteMobs' class loot settings. EliteMobs also applies boss powers limited by difficultyID only in the matching zones, which the Kobold Mines bosses use. The world border shrinking toward the center therefore pushes players into the Hard and Mythic zones.

Item Behavior on Exit​

  • Players who successfully extract keep all items. Extractioncraft soulbinds every unbound item in their inventory, cursor and crafting grid to them; items already soulbound keep their owner. Binding only happens while the EliteMobs Soulbind enchantment is enabled.
  • A server shutdown or plugin reload during a live match counts the same as extracting.
  • Any other exit from a live match clears the inventory, cursor and crafting grid when deleteItemsOnFailToExtract is true (the default). With it set to false, those items are soulbound instead.
  • Leaving while the match waits or counts down leaves the inventory untouched. See match flow for every way of leaving.