Aller au contenu principal

Dungeon Room

Dungeon Room

Manifest entry representing a dungeon room defined by a polygon footprint. Place at least 3 nodes to form the room boundary. Y bounds are derived automatically from the nodes' Y values (min for floor, max for ceiling), widened by [verticalMargin]. The members of a run are followed through the rooms of the room configuration their run drew (see [btcrenaud.dungeons.run.RoomTracker]). The priority, the vertical margin, enterOnce and leaveOnce are read when the run starts. A player is tracked when they walk, teleport, respawn or ride a vehicle; a player who leaves the run (or its world) leaves their rooms first.

Champs

ChampTypePar défautDescription
nodesList<Position>emptyOrdered nodes defining the room's polygon boundary. 1 node = point room (radius 0.5), 2 nodes = line segment room, 3+ nodes = polygon. Y values define vertical extent automatically.
priorityInt0Rooms that overlap are all entered; the higher priority fires first, for entering and for leaving. Equal priorities keep the order of the room configuration.
verticalMarginDouble2.0Blocks added above the highest node and below the lowest node: a player counts as inside from lowest Y - margin to highest Y + margin. Needed for a flat room (all nodes at the same height), which would otherwise only contain that exact height and make a walking or jumping player enter and leave at every step. Also covers a player riding a vehicle. 0 = exactly the height of the nodes.
onEnterList<Ref<TriggerableEntry>>emptyTriggers executed when a player enters the room
onLeaveList<Ref<TriggerableEntry>>emptyTriggers executed when a player leaves the room
enterOnceBooleanfalseRun the onEnter triggers and the modifiers only the first time each player enters the room in a run. A new run starts again. The on_dungeon_room_enter event still fires every time (it observes, enterOnce only limits what the room itself runs).
leaveOnceBooleanfalseRun the onLeave triggers only the first time each player leaves the room in a run. A new run starts again. The on_dungeon_room_leave event still fires every time (it observes, leaveOnce only limits what the room itself runs).
restrictionsRef<DungeonRestrictionsEntry>—What the players may not do while they stand in this room. Reference a 'Dungeon Restrictions' entry: it REPLACES the one of the dungeon in this room (an entry with nothing ticked lifts every restriction here). Empty = the dungeon's restrictions apply.
Champs TypeWriter communs (criteria, modifiers)
ChampTypePar défautDescription
criteriaList<Criteria>emptyConditions a player must meet to count as inside the room. Checked at every block the player moves to while they stand in the room's footprint; a player who stops meeting them leaves the room.
modifiersList<Modifier>emptyModifiers applied to the player when they enter the room, just before the onEnter triggers (so enterOnce limits them too)

How to use it​

Draw the outline with /typewriter dungeon room <room> edit rather than typing coordinates: the editor adds nodes where you stand or look and saves them into nodes. One node is a point room (radius 0.5 block), two nodes a line, three or more a polygon. The vertical extent comes from the lowest and highest node. Link rooms from a Dungeon Room Config.

In play​

Rooms apply to fixed dungeons (a generated dungeon uses its room templates instead). The members of a run are followed through the rooms of the configuration their run drew. A player is tracked when they walk, teleport, respawn or ride a vehicle, and a player who leaves the run or its world leaves their rooms first.

  • Overlapping rooms are all entered. The higher priority fires first, for entering and for leaving.
  • criteria are checked at every block the player moves to inside the room's footprint. A player who stops meeting them leaves the room.
  • modifiers apply on entering, just before onEnter, and enterOnce limits them too.
  • enterOnce and leaveOnce count per player and per run. A spent once stays spent after a reload.
  • The room events fire at every crossing, even when once already spent the room's own triggers: events observe, once only limits what the room itself runs. In a fixed dungeon the events carry no context keys.
  • verticalMargin defaults to 2.0 blocks above the highest node and below the lowest. A flat room needs it, or a walking or jumping player would enter and leave at every step. Set it to 0 for the exact height of the nodes.
  • restrictions names a Dungeon Restrictions entry. While a player stands in this room it REPLACES the restrictions of the dungeon instance: an entry with nothing ticked lifts them here. Empty = the restrictions of the dungeon apply.