-
Notifications
You must be signed in to change notification settings - Fork 12
Loot Chests
The loot configuration is a good example of my making something that was easy to write code to read and easy for me to edit, but not at all obvious in terms of meaning. A basic line looks like this:
gear, 1, minecraft:stone_sword, 1, 1
It start with the loot list to put the item in of which there are three:
- gear for weapons, tools, armor, and other supplies that might used in the dungeon, such as torches and arrows
- heal for healing items such as food, potions, and golden apples
- loot for treasure/reward items
Next is loot level of the item.
Gear and heal go up to level 7, while loot goes up to level 8, where level 8 is for epic items that might be a reward for fighting a room full of full-on bosses. The loot in chests is determined by the hardest spawner in the room, whether there is just one spawner or several, if it is destination/loot/boss room, if it is the main chest in that room, and a bit of random luck.
The next two numbers are the maximum and minimum amount of that item; that is the smallest and largest stack size it will place.
heal, 4, minecraft:bread, 2, 4
Would place a stack of 2 to 4 bread.
Some items may have and extra bit of text at the end like so:
heal, 4 minecraft:potion, 1, 1, HEALTH1
The item is a reference to NBT tags defined in the Custom NBT for Loot Items file(s). These tags will be added to the item, in this example to make it a health 1 potion.
The main file used by most themes is the chest.cfg file found in config/DLDungeonsJBG/. Other files can be added in files under config/DLDungeonsJBG/SpecialChests/ in order to give special loot to dungeons with specific themes. The default oceanic theme, for example, uses a different loot table because torches are useless in those dungeon while extra water breathing potions can be a lifesaver. Want to create a magic dungeon with lots of especially magical loot? Just make a special *.cfg file for it, put in the SpecialChest folder, and tell the theme you want to use it.
For data packs (newer version) chest loot files are found at data/dldungeonsjbg/dldungeons/theming/special_chests -- with special_chests being retain though all chest loot files go here now.