Birdoggydog's Builds

Mending crawl steps, unbuilt packs and doubled doors

A duct never has a height step now. Sheets stopped misplacing doors and notes, and the registry lists packs of floors the world hasn't built.

A crouched party can crawl straight through a duct now, because a duct never has a height step. I also fixed five other dungeon bugs from the same plan, and the dungeon generator and the game importer both got new checks for them.

Crouched in the Coil Works, floor 2, crawling south from (5,26) to (5,27) with no stop where the old step was.

Why did the crouched party get stuck in a duct?

On 18 October I said that a level change in a duct isn’t passable, but that it’s fantastically cool that it works the way it does. A duct has 1.2 m of ceiling and a half-meter step inside one leaves a crouched party stuck. The generator had already stopped making them, but drawn sheets and five old fixture squares still had one.

So the rule is that a crawl never steps. Dungeon heights come from a per-square model. edge_at gives the floor height at the edge of a square toward a neighbor, and the step between two squares is the difference between their two edges. Before this, a step was walkable if it rose at most 0.5 m, which is the party’s step height, and any drop was walkable. Now a step with a crawl square on either side is refused, and the importer reports an error that names the crawl square: “a crouched party has under 1 m at its mouth”. The generator’s height check fails a sheet with one in the same way.

I let exactly one kind of step through, which is a drop out of a crawl into a full-height floor or water square. It has to leave at least 1 m at the mouth, and you can’t climb back up it. The mouth is the opening at the edge, from the crawl’s floor up to the lower of the two ceilings. A crawl ceiling is 1.2 m over its own floor and a full square’s is its height over its floor, so the mouth comes to the lower of 1.2 m and the room’s height minus the drop. In a normal 4 m room a 2 m drop still leaves 1.2 m. Into a low 2.5 m room a 2 m drop leaves 0.5 m, and that’s an error.

The test harness builds a small sheet with a duct and checks six cases. A flat crawl passes. A step between two crawl squares is refused both ways. A half-meter rise out of a crawl is refused, even though an ordinary ledge of that size is climbable. A 1 m drop into a normal room passes and isn’t walked back. A 2 m drop into a normal room passes, and into a low room it fails.

Five squares in the old content broke the rule: one in each of two generated test dungeons, one in the Coil Works’ floor 2, and two in the eldritch tour dungeon. I flattened each to the height of the crawl beside it. A crouched party now walks from (5,26) to (5,27) in the Coil Works and back, and a test does exactly that. I couldn’t check that rebuilding the tour dungeons wouldn’t put the steps back, because the tour build can’t rebuild them at the moment. That’s still open.

How do I keep notes and doors right after a sheet grows?

When the generator digs a tunnel past a sheet’s edge, the sheet grows and everything on it shifts. The things moved, but the stock record didn’t, and neither did the squares written into the notes. So a note could say “opens the door at 19,6” for a door that was now at 39,6.

The fix has two parts. Each note that names a square is now built from parts that link to the thing by its unique id, and those links stay inside the generator and never reach the sheet. After the last dig, one pass shifts every square in the record (packs, pits, rest spots, switches, door rules) by how far the sheet grew. Then it writes each note again from the things where they now stand. I didn’t want to patch the text with a regex, so the text is the last thing made.

The test uses seed 13, floor 1. The plate’s note has to name 39,6, and the record’s switches, rest spots and door rules have to match the squares of the things on the sheet.

Doors had their own bug. A door on a corridor could land on a square next to water. Now a corridor’s door goes on the first square that is plain floor, has rock on both sides across the way, and has no water beside it. If no square qualifies, the way gets no door. In the seed 31 test the flooded loop has no door at (15,15) and no note saying a door can be walked around. The tool that fixes doors in the hand-drawn tour sheets also learned that water isn’t plain floor.

Why did a pack that wasn’t there break a door?

A door in the Tallow Locker opens when a pack of monsters dies. The importer made the pack’s id correctly, but the content registry only listed packs standing in the built world, so the builder warned that the pack didn’t exist.

Doors and chests of unbuilt dungeons were already listed that way. I added the same for packs. For each placed dungeon without errors, the registry walks every floor and collects each pack that has members. An entry holds the pack’s name, its monster types in order, and its formation, and the registry marks it as not present and not built. It has no position, because the plan’s squares belong to the floor and not to the world, and I didn’t want to guess one. For the Tallow Locker’s pack that’s two Gristle Spitters and a Bile Seer in a wedge, and the CONTENT warning is gone.

Why was a door doubled?

I put two doors across one hall by accident, and told myself on 10 October that one was enough. Now both the importer and the generator warn about it: “door at X beside the door at Y across one passage: one is enough”.

A door knows how far across the hall it’s built (its span) and which way is across. Two doors count as one passage when the second stands on a square of the first one’s span, on the same line across the hall. Two doors one behind the other along a hall are on different lines, so they aren’t warned about. Doors in a narrow passage or a crawl tunnel are left out too, because their span is just their own square. Breakout Site has one door and gives no warning.

Also done

  • I made the generator’s test fixtures again with the new generator, with the command each test gives and no hand edits. That changed six small fixtures and eight room-filling floors, and the stand-in copies in the generator’s repository are the same files.
  • The room-filling test now just tells me about a room kind with a monster share that draws no pack in its audit floors, where before it failed. The only case so far is the bathroom.
  • I haven’t re-recorded any other film, because none of their tests failed.