Template ‐ ROOM_SET - ThePix/QuestJS GitHub Wiki
You can use the ROOM_SET template to link together a set of locations that you want to link in the narrative, but the player could discover in any order.
An example of this might be a corridor that is split into three locations. When the character first sees the corridor, you want to note the impressive ceiling, but only the first time the player sees it. For the other locations, you just want to say it is like the other locations.
The solution is to put all three locations into a ROOM_SET. You should provide the name of the set; all rooms with the same room set name willbe in the same room. When the player enters the first location, that will have "roomSetOrder" set to 1, the second room entered will have it set to 2, etc.
You can then use the "roomSet" text processor directive in your room descriptions. The first attribute will be show if this is the first room, the second, for the second, and so on.
createRoom("Corridor north", ROOM_SET('corridor'), {
desc:"{roomSet:When you enter the corridor, you are blown away by the amazing ceiling:This part of the corridor is like the other:More of he same corridor}. It contines south, and there is a door north.
// etc.
})