Birdoggydog's Builds

Adding dark rooms, a bolt gun and a gas room to dungeons

A sheet mark that keeps a room nearly black, a wall-mounted bolt gun you run past or wait out, and a grating that floods a room with poison gas.

A room on a dungeon sheet can be marked dark now, and there are two new traps: a bolt gun in a corridor wall and a gas room. The generator lays the traps on its own.

64 seconds. A lit room, then the dark one next to it. The bolt gun’s slot and amber eye, the party walked across and hit, then run past. The gas room filling yellow, the poison every 2 seconds, and the gas clearing.
Ten first-person frames: a lit blue-tiled room, a nearly black room with a faint orange glow down a corridor, a corridor wall with a slot in it, a corridor with a floor grating, then a room filled with yellow-green gas with poison lines in the log, and the same room clear again.

The film’s frames in order, with the captions it was recorded with.

They’re the next pieces from the list of what the dungeon kit was missing, after deep water and rubble and word codes and the express lift.

How do you keep a room dark?

The content file already had a light level per room, where 0 meant dark, and the generator used it. What was missing was a way to say it on the sheet. A thing marked dark on any square of a room sets the room’s dark flag and its light to 0, so none of its lamps get placed. The lighting code checks that first and gives the room an ambient light of 0.025, where a lit room has 0.3. The mark wins over the content file’s value, and the importer warns when the two disagree.

It’s refused on rock and in a corridor, and two marks in one room get a warning. The party’s light spell still lights a dark room like any other. The phone designer page offers it as *.

How does the bolt gun work?

The bolt gun is a captive-bolt gun in a corridor wall. It needs rock beside its square for the slot. When the party steps on the square, the catch clicks, and 0.3 seconds of game time later the bolt crosses the square and comes back, in 0.18 seconds. A party within 0.7 meters of its line takes 18 damage, and the bolt pierces. Then it takes 6 seconds to re-cock.

A corridor has no way round, so there are two ways past it. A walking party is still in the line when the bolt fires, but a running party is already past. Or you can step on, step back, let it fire, and cross while it re-cocks.

The tell is the slot in the wall at 1.25 meters with a dull amber eye in it, and the wall across from it pocked and scorched. If open floor is across instead of rock, the importer warns and skips the scorch. Both traps are a subclass of the existing trap node, so they inherit saving and the way a long jump of the game clock is handled. A load in the middle of the 6 second re-cock finds it still re-cocking.

How does the gas room work?

A loose grating on one square of a room opens the old ammonia lines under the floor, and vents in the four corners blow. The room goes through four stages: 2.5 seconds to fill up to 2.2 meters high, 14 seconds full, 5 seconds to clear, and then 60 seconds before the grating is armed again. While the gas is at least 40% full and the party is inside the room, someone takes 4 poison damage every 2 seconds. Stepping out of the door is out of the gas.

The tell is the floor around the grating and vents stained yellow-green, and a thin hiss while it’s armed. You can step around the grating, run out before the gas is thick, or wait it out. The state, the time left and the breath timer are saved like the bolt gun’s.

How does the generator lay them?

The generator gives these two traps their own random stream, so adding them didn’t move any other trap, switch or thing in the dungeons it had already made. A corridor trap becomes a bolt gun at a rate of 0.25, on a straight stretch walled on both sides. Over 20 test seeds, 4 of 16 corridor traps became bolt guns.

On 0.3 of floors one room becomes a gas room, as long as it isn’t the start, the goal or a pinned room, and is at least 3 by 3 with a way in. The grating goes on the square nearest a way in, off the doorway squares, so you cross it on the way in but can step round it. It’s laid last so nothing else moves. In the same test, 16 of 60 floors got one. Neither trap counts against a floor’s trap budget. The generator never lays the dark mark itself, because that stays the drawer’s choice.

The checker refuses what the importer refuses: no wall beside a bolt gun, a gas trap in a corridor, or two in one room. It also wants every trap’s tell seen 2 or more squares before the trap.

What broke on the way?

My machine ran short of memory and killed the test batch twice, so I ran it in smaller groups. Regenerating the fill test dungeons for the new trap kinds turned up an older bug: the draft note that lists a floor’s content shares stopped at the first share that was over budget instead of skipping it. That’s fixed. It also showed six generator tests that had been failing on main for a while, hidden by stale fixtures. A rest station lands on a water square in two dungeons, and the fill walker gets stopped by rubble in three. Neither comes from the traps, and I’ve filed them.

Also done

  • dark_traps passes 39 of 39 and trap_names 234 of 234.
  • All the numbers here are placeholders until I’ve played them.
  • The click, the shot and the hiss borrow sounds from other things. They need their own.