Loot Configuration

From ChocolateQuestWiki
Revision as of 08:54, 17 May 2021 by Admin (talk | contribs) (1 Version importiert)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CQR gives you the ability to customize the loot found in dungeons.

In total there are 5 dungeon chests that have their own placeholder block, also there are additional ones These are the default chests used (for the config file, remove the '_chest' part and add the file extension):

  • clutter_chest
  • equipment_chest
  • food_chest
  • material_chest
  • treasure_chest

Also there is the custom exporter chest. It allows you to specify ANY loaded loottable in the game to roll from. CQR will try to load all files in <Path to CQR folder>/lootconfigs/chests, even ones with a different name. This allows you to add new loottables for use with the custom exporter chest. Example: Add a correctly formatted .properties loottable called 'MyLootTable' to that folder, you then can input 'cqrepoured:chests/MyLootTable'.


Config Content

All loot configs are .properties files by default, that is the simple loottable variant. You can edit them with any text editor.

You could also use a loot table generator for vanilla minecraft and directly put the generated .json file there, but it also needs to have a valid name like described above (but dont change the file extension, it should still be .json for vanilla loot tables).

It will always prioritize the .json files.

Every loot config holds entries in the following form, options in [ ] are optional.

Identifier = Item, Meta, Min Count, Max Count, Chance[, Enchant, Min Level, Max Level[, Treasure[, Enchant Chance]]] There are a few rules

  • One line, one entry
  • Add '#' (without the ) in front of a line to mark it as a comment
Option Data type Description Constraints
Identifier String The name of the entry, has to be unique accross the whole file.
Item ResourceLocation The item ID of the item. Has to be an existing item
Meta Integer Damage of the tools, meta value for things like wool (defines the color here). Has to be at least 0 and needs to stay in the item's durability or max meta range.
Min Count Integer Minimal amount of the item per roll. Has to be at least 0 and at max 64. Has to be equals to or smaller than Max Count.
Max Count Integer Maximal amount of the item per roll. Has to be at least 0 and at max 64. Has to be equals to or greater than Min Count
Chance Integer Defines the chance in percent (0 = 0%, 20 = 20%, 100 = 100%) for the item to appear when it gets rolled. Also defines the weight. Has to be at least 0 and at max 100
Enchant Boolean Wether or not the item will be enchanted. Has to be set to "true" or "false"
Min Level Integer Minimal amount of levels to enchant the item with. Has to be at least 1 and at max Max Level
Max Level Integer Maximal amount of levels to enchant the item with. Has to be at least Min Level
Treasure Boolean Wether or not the item can receive treasure enchantments (for example mending). Will also double Min and Max level when enabled and a rolled item receives treasure enchantments. Has to be set to "true" or "false"
Enchant Chance Integer Chance in percent for the item to receive enchantments Has to be at least 0 and at max 100