#
Loot Chests
In AdvancedDungeonArena it's possible to create refillable loot chests inside your dungeons with Variables and custom item support.
Loot chests can be created at any container block, such as: chests, shulker boxes, barrels, furnaces.
Loot chest configurations located in the /loot_chests/
directory inside a dungeon's folder.
To refill a loot chest, use the generate_loot
Script Action.
#
Creation
Adding loot chests to a dungeon is simple:
- Aim at a block that is container.
- Run the
/ada lootchest create <dungeonId> <name>
command. WheredungeonId
is dungeon ID,name
is new loot chest ID.
Add some items to the loot chest's pool:
- Hold an item in the main hand.
- Run the
/ada lootchest additem <dungeonId> <chestId> <name> <weight>
command. WheredungeonId
is dungeon ID,chestId
is loot chest ID,name
is ID for an item,weight
is item weight. - Repeat for all other items.
Items with higher weights are used more often. The chance of an item being chosen is item weight ÷ total weight of all items
.
#
Configuration
To configure the rest of loot chest settings, you have to go to a loot chest's configuration file.
The possible amount of items generated in a loot chest controlled by the ItemsAmount
setting.
This option is Scalable. You can use Variables here.
ItemsAmount:
Initial:
Min: '0'
Max: '6'
AsInteger: true
This setting controls whether each item can be choosen only once per loot generation.
UniqueOnly: false