Loot Table - Rumsfield/konquest GitHub Wiki

Updated for 1.9.0

Konquest Loot Tables

Chest loot in town monuments and ruins is randomly chosen from lists of items in the loot.yml config file. You can modify these lists to customize the items that spawn in loot chests. There are 3 categories of items: regular items, potion bottles, and enchanted books.

These are the different lists of loot tables in the loot.yml file.

Loot Table Used For Description
loot Monuments The default loot for town monuments.
loot_special Monuments Loot for each villager profession chosen by town trade specializations.
loot_custom Monuments Loot used for custom settings in monument templates. Use the command /k admin monument loot (monument) (name) to set the custom loot table used for specific monument templates, which are applied to all kingdom towns using the template.
ruins Ruins The default loot for ruins.
ruins_custom Ruins Loot used for custom settings in ruins. Use the command /k admin ruin loot (ruin) (name) to set the custom loot table used for specific ruins.

Monument Loot

There are 3 ways to customize the loot tables in town monuments.

  • The default loot table applies to all monument templates.
  • A different loot table for each Villager Profession under the loot_special section can be used to give towns with a trade specialization unique loot that matches the specialized villager profession.
  • Any number of custom loot tables under the loot_custom section can be applied to any monument template using the command /k admin monument loot (monument) (table name). This can allow you to define different monument templates that each provide different types of loot which kingdoms can choose from for their towns.
    • The included examples of custom monument loot tables are CUSTOM_MILITARY and CUSTOM_BUILDER.

Ruin Loot

There are 2 ways to customize the loot tables in ruins.

  • The default ruins table applies to all ruin territories.
  • Any number of custom loot tables under the ruins_custom section can be applied to any ruin using the command /k admin ruin loot (ruin) (table name). This can allow you to define different ruins that each provide different types of loot to players that capture them.
    • The included examples of custom ruin loot tables are CUSTOM_TEMPLE and CUSTOM_MINESHAFT.

Loot Table Format

A loot table has the following structure:

<Loot Table>:
  name: The display name that players see for this loot table
  items: (Optional) The set of items that can be chosen from this loot table
  potions: (Optional) The set of potion bottles that can be chosen from this loot table
  enchanted_books: (Optional) The set of enchanted books that can be chosen from this loot table

Items

The entries under the items section must use a Material name, and uses the following structure:

<Material>:
  amount: The number of items in the stack
  weight: The relative probability weight, set to 0 to disable the item from being chosen

Potions

The entries under the potions section must use a PotionType name, and uses the following structure:

<PotionType>:
  upgraded: True/False, is this potion level 2?
  extended: True/False, does this potion have a longer duration?
  weight: The relative probability weight, set to 0 to disable the potion from being chosen

Not all potions can be upgraded or extended. If you specify a potion that cannot be made, there will be an error in console and the basic version of the potion will be used.

Enchanted Books

The entries under the enchanted_books section must use an Enchantment name, and uses the following structure:

<Enchantment>:
  level: The enchantment level, 0 to randomly choose any level
  weight: The relative probability weight, set to 0 to disable the enchantment from being chosen

Loot Weight

Loot is chosen from a table using the weight value. The higher the weight, the more likely it will be chosen. The probability that a loot entry will be chosen is equal to its weight divided by the sum of all weights of the loot in that table, times 100. For example, if there are 10 items and they all have a weight of 2, then the probability is the same for all items, as 100*(2/20) = 10%.

Town Monument Loot

This table shows the default item drops for monument loot chests. Konquest will periodically (core.monuments.loot_refresh) place a number (core.monuments.loot_count) of items from this table into each monument loot chest. The loot table is configurable, and defined in the loot.yml configuration file.

Item Amount Weight
Items
Gold Ingot 18 4
Iron Ingot 36 4
Diamond 4 2
Emerald 12 2
Coal 64 6
Gunpowder 24 2
Blaze Rod 8 2
Nether Wart 8 2
Glowstone Dust 12 2
Bottle o' Enchanting 5 2
Cooked Beed 8 6
Cooked Porkchop 8 6
Cooked Chicken 8 6
Bread 16 4
Saddle 1 4
Iron Horse Armor 1 3
Golden Horse Armor 1 3
Diamond Horse Armor 1 2
Ender Pearl 4 4
Watermelon 4 5
Pumpkin 4 5
Book 6 5
Name Tag 1 5
Cobweb 4 2
Egg 8 4
Fireworks 4 2
Carrot on a Stick 1 2
Potions
Potion of Swiftness 1 4
Potion of Regeneration 1 4
Potion of Healing 1 4
Potion of Leaping 1 4
Potion of Slow Falling 1 4
Potion of Fire Resistance 1 4
Enchanted Books
Power 1 2
Flame 1 2
Punch 1 2
Sharpness 1 2
Bane of Arthropods 1 2
Smite 1 2
Efficiency 1 2
Unbreaking 1 2
Fire Aspect 1 2
Knockback 1 2
Luck of the Sea 1 2
Protection 1 2
Projectile Protection 1 2
Sweeping Edge 1 2
Thorns 1 2
⚠️ **GitHub.com Fallback** ⚠️