Saltar al contenido principal

Dungeon Room Template

Dungeon Room Template

A room of a generated dungeon: the blocks are a saved Paper structure kept as the artifact of this entry, the rest of the fields say how the generator may use it. The size of the room is read from the saved structure, never typed: capture it in game with the editor of the Artifact ID field (two corners, then the connector and marker tools).

Campos

CampoTipoPredeterminadoDescripción
artifactIdString—Unique artifact identifier. The in-game editor of this field captures the room and places its doors and markers.
categoryRoomCategoryNORMALThe role of the room: START (the run begins here, one per dungeon), NORMAL, TREASURE (always on a branch), CORRIDOR (inserted between two rooms that cannot touch), SECRET (always a dead end), BOSS (the last room, one per dungeon).
allowRotationBooleantrueThe generator may turn the room by quarter turns. Turn it off for a room whose blocks only make sense in the captured orientation.
connectorsList<ConnectorSpec>emptyThe doors of the room. Rooms are joined door to door, so a room without doors can only be a dead-end START.
ConnectorSpec (4)
CampoTipoPredeterminadoDescripción
positionTemplatePoint—The door block, relative to the lowest corner of the box: the BOTTOM CENTRE of the opening (its width and height come from the connector type). It must lie on the wall named by Face.
TemplatePoint (3)
CampoTipoPredeterminadoDescripción
xInt0Blocks east of the lowest corner of the box (x grows east).
yInt0Blocks above the lowest corner of the box.
zInt0Blocks south of the lowest corner of the box (z grows south).
faceFacing4NORTHThe wall of the box the door opens in. NORTH is the wall at z = 0, SOUTH the one at z = size z - 1, WEST at x = 0, EAST at x = size x - 1.
typeRef<DungeonConnectorTypeEntry>—The kind of door: its opening and the doors it can be joined to. Two rooms are joined only through compatible kinds.
requiredBooleanfalseA required door must be joined to another room: a template that cannot fill all its required doors is never used.
markersList<MarkerSpec>emptyThe points of interest of the room: player spawns, loot chests and trigger points. A marker is linked to its entry by its place in this list.
MarkerSpec (7)
CampoTipoPredeterminadoDescripción
positionTemplatePoint—The block of the marker, relative to the lowest corner of the box. It must be inside the box.
TemplatePoint (3)
CampoTipoPredeterminadoDescripción
xInt0Blocks east of the lowest corner of the box (x grows east).
yInt0Blocks above the lowest corner of the box.
zInt0Blocks south of the lowest corner of the box (z grows south).
yawFloat0Where the marker looks, in Minecraft degrees (0 south, 90 west, 180 north, -90 east). A chest faces back toward this direction, an NPC looks toward it.
kindMarkerKindSPAWNSPAWN: where the players appear when the run begins; only the first SPAWN of the START room is used (a start room without one cannot be used). CHEST: a loot chest is placed here. TRIGGER: the Triggers are fired for the player who reaches the room. NPC: the NPC instance of the Npc field stands here, in every run that uses the room. MOB: the Dungeon Mob Spawn entry of the Mob field makes its mobs appear here, the first time a member of the run enters the room.
chestRef<DungeonLootChestEntry>—CHEST markers only: the loot chest entry to place at the marker. The position and the yaw of the marker replace its own location.
triggersList<Ref<TriggerableEntry>>emptyTRIGGER markers only: the entries fired for the players of the run. They read the run, the seed, the room, the difficulty and the position from the context.
npcRef<DungeonNpcInstanceEntry>—NPC markers only: the Dungeon NPC Instance shown at the marker, to the members of the run. The position and the yaw of the marker replace its Spawn location. Point at one instance from a single marker: when several markers name it, only the first one counts. The same instance named in several rooms of the layout appears in the FIRST one only (layout order, deterministic).
mobRef<DungeonMobSpawnEntry>—MOB markers only: the Dungeon Mob Spawn entry whose mobs appear at the marker (its count, scatter, equipment and triggers apply; its Room and Positions are ignored). Several markers may name the same entry: each one is its own placement, spawned once per run.
onEnterList<Ref<TriggerableEntry>>emptyTriggers fired for a player when they enter the room. They read the run, the seed, the room, the difficulty and the position from the context.
onClearList<Ref<TriggerableEntry>>emptyTriggers fired once per run, for the player who clears the room, when a 'Dungeon Clear Room' action runs while that player stands in it. The platform does not decide by itself when a room is cleared: the author's own triggers do (for instance when the last monster dies).
enterOnceBooleantrueRun the onEnter triggers (and the markers' triggers) only the first time each player enters the room in a run. The on_dungeon_room_enter event still fires every time.

How to use it​

See Generated dungeons for the full workflow, the categories, the markers and the in-game editor. Limits: at most 256 blocks per side, 64 doors and 1024 markers per room. The category START needs a SPAWN marker. enterOnce defaults to on for templates.