メインコンテンツまでスキップ

Dungeon Loot Chest

Dungeon Loot Chest

Entry for defining loot chests in dungeon instances. Chests are placed in the world of the run; the loot of a chest is rolled once, the first time a player opens it.

フィールド

フィールド型デフォルト説明
dungeonInstanceRef<DungeonInstanceEntry>—The dungeon instance this chest belongs to
locationWorldLocation—Location of the chest in the instance world. The yaw turns the chest: it faces back toward the direction the yaw looks at.
WorldLocation(6)
フィールド型デフォルト説明
worldString——
xInt0—
yInt0—
zInt0—
yawFloat0—
pitchFloat0—
placementTypeChestPlacementTypeBLOCKBLOCK: place a block at the location. NPC: the chest opens when the Npc Anchor entity is right-clicked.
storageItemItem—Engine Item representing the block (CraftEngine and Nexo custom blocks supported). BLOCK mode only.
containerTitleString—Custom title for the storage container (MiniMessage, leave empty for default)
lootTableList<LootItem>emptyList of possible loot items
LootItem(5)
フィールド型デフォルト説明
itemItem—The item to drop
dropChanceDouble50.0Chance to appear in the chest (0-100%). When the table is WEIGHTED it is the weight of the item instead.
minAmountInt1Minimum quantity
maxAmountInt1Maximum quantity
slotInt-1Specific slot in the chest (0-26), or -1 for random slot
placementDelayInt2Delay in seconds before placing/registering the chest (allows world loading)
replaceExistingBooleantrueReplace any existing block at the location (BLOCK mode only)
clientSideBooleanfalseThe block exists only on the screens of the run's players: nothing is placed in the world. Ignored in NPC mode.
interactionModeDungeonChestManager.ChestInteractionMode—Interaction mode: LOOT (virtual inventory) or ACTIONS (execute triggers)値:LOOTACTIONS
onInteractList<Ref<TriggerableEntry>>emptyTriggers executed on click (ACTIONS mode only)
disappearAfterInteractBooleantrueIf true, the chest disappears once it is closed (once the last player looks away from a shared chest)
manualModeBooleanfalseIf true, the chest is NOT auto-placed. Use a Loot Chest Trigger action to spawn it on demand. Exception: a chest named by a CHEST marker of a generated room template is always placed at its marker, whatever this option says (the marker is where you asked for it).
visibilityChestVisibilityAUTOAUTO (default): PER_PLAYER when Client Side is on, SHARED otherwise, as before this option existed. PER_PLAYER: every player of the run opens an inventory of their own, rolled once for them. SHARED: one inventory for the whole run.
onDisappearOnDisappearDROP_AT_CHESTWhat happens to the items left in the chest when it disappears. DROP_AT_CHEST: they fall at the chest. GIVE_TO_PLAYER: they go to the player who closed it, and what does not fit falls at their feet.
npcAnchorRef<EntityInstanceEntry>—NPC mode: the entity instance that opens this chest when a player of the run right-clicks it. Without it, a chest placed by an older page still opens when an entity within 2 blocks of its location is right-clicked (deprecated: set the anchor).
lootSelectionLootSelectionINDEPENDENTINDEPENDENT: every loot item rolls its own chance. WEIGHTED: 'Weighted Picks' distinct items are drawn, the chance of an item being its weight.
weightedPicksInt3Number of loot items drawn when the loot selection is WEIGHTED.
lootTableRefRef<DungeonLootTableEntry>—A 'Dungeon Loot Table' shared with other chests and mobs. When set, it replaces the Loot Table, Loot Selection and Weighted Picks of this chest (they are then ignored). Empty = this chest's own lines.
additionalLocationsList<WorldLocation>emptyMore places for this chest: the entry puts one chest at Location, then one at each of these. Every chest is independent: it rolls its own loot, has its own opening and vanishes on its own. A Loot Chest Trigger that names this entry makes all of them appear. Ignored in a generated dungeon (the chest stands at its marker).
WorldLocation(6)
フィールド型デフォルト説明
worldString——
xInt0—
yInt0—
zInt0—
yawFloat0—
pitchFloat0—

How to use it​

Place a chest for one dungeon. Capture location with the content editor while standing in the template world. Chests are placed placementDelay seconds (at least 1) after the run world is ready.

FieldWhat to know
placementTypeBLOCK places a block. NPC places nothing: the chest opens when a player of the run right-clicks the entity of npcAnchor.
npcAnchorThe entity instance that opens the chest in NPC mode (for example a Dungeon NPC Instance). Without it, an old page still opens the chest when an entity within 2 blocks of location is right-clicked, which is deprecated: set the anchor.
storageItemThe block of the chest: a vanilla container, or a CraftEngine or Nexo custom block. BLOCK mode only.
clientSideThe block exists only on the screens of the run's players: nothing is placed in the world. Ignored in NPC mode.
visibilityAUTO is PER_PLAYER when clientSide is on, SHARED otherwise. PER_PLAYER: each player of the run opens an inventory of their own, rolled once for them. SHARED: one inventory for the whole run.
lootTable, lootSelection, weightedPicksWith INDEPENDENT every item rolls its own dropChance (0 to 100). With WEIGHTED, weightedPicks distinct items are drawn and dropChance is the weight. Each item has a quantity range and an optional slot (0 to 26, -1 for random). The roll is made once and the same inventory is shown again when reopened.
interactionModeLOOT opens the chest, ACTIONS runs onInteract instead.
disappearAfterInteract, onDisappearThe chest disappears when it is closed (for a shared chest, when the last player looks away). DROP_AT_CHEST drops what is left at the chest, GIVE_TO_PLAYER gives it to the player who closed it and drops what does not fit at their feet.
manualModeThe chest is not placed at run start. Fire a Loot Chest Trigger to place it. A chest named by a CHEST marker of a generated room is always placed at its marker.

The chest faces back toward the yaw of location. It opens with an animation. In a generated dungeon the position and yaw of the marker replace location. A chest that is open at a reload is closed and put back, with its content kept. At the end of a run the open chests are settled first: the items left are dropped or given according to onDisappear.

Shared table and several chests​

FieldWhat to know
lootTableRefA Dungeon Loot Table. When set, it replaces the lootTable, lootSelection and weightedPicks of this chest completely: they are ignored, never mixed. If the entry is missing, a warning is logged and the chest keeps its own lines.
additionalLocationsMore places for the same entry: one chest at location, then one at each position listed here (capture them with the content editor, like location). Each chest is independent: it rolls its own loot, opens on its own and disappears on its own. A Loot Chest Trigger that names the entry places all of them. In a generated dungeon additionalLocations is ignored: the chest stands at its marker.