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.
Поля
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
nodes | List<Position> | empty | Ordered 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. |
priority | Int | 0 | Rooms that overlap are all entered; the higher priority fires first, for entering and for leaving. Equal priorities keep the order of the room configuration. |
verticalMargin | Double | 2.0 | Blocks 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. |
onEnter | List<Ref<TriggerableEntry>> | empty | Triggers executed when a player enters the room |
onLeave | List<Ref<TriggerableEntry>> | empty | Triggers executed when a player leaves the room |
enterOnce | Boolean | false | Run 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). |
leaveOnce | Boolean | false | Run 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). |
restrictions | Ref<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. |
Общие поля TypeWriter (criteria, modifiers)
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
criteria | List<Criteria> | empty | Conditions 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. |
modifiers | List<Modifier> | empty | Modifiers 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
priorityfires first, for entering and for leaving. criteriaare checked at every block the player moves to inside the room's footprint. A player who stops meeting them leaves the room.modifiersapply on entering, just beforeonEnter, andenterOncelimits them too.enterOnceandleaveOncecount per player and per run. A spentoncestays spent after a reload.- The room events fire at every crossing, even when
oncealready spent the room's own triggers: events observe,onceonly limits what the room itself runs. In a fixed dungeon the events carry no context keys. verticalMargindefaults 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.restrictionsnames 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.