... now with 35% more arrogance!

Showing posts with label rdg. Show all posts
Showing posts with label rdg. Show all posts

Thursday, October 17, 2019

RDG 2.0: Substructures and Superstructures

Continuing my thoughts on random dungeon algorithms: the first three steps on my list deal with nested structures. To explain this better, let’s start with a typical substructure generated on Step 2 and filled in on Step 3. This would be a network of intersecting tunnels. In earlier posts, I suggested using letters (“leximorphs”) to define the tunnel structure. I think this is possible as a computer algorithm, but it would be tricky. You’d have to define a two-dimensional array, where each array location is a list of one or more connections.

But a simpler algorithm might be better. Assume there are six main hypothetical tunnels in a structure:
  • three aligned more-or-less North-South (left, center, right;)
  • three aligned more-or-less East-West (top, middle, bottom.)
hypothetical tunnel structure

This defines nine hypothetical four-way intersections. Rolling for each direction at every intersection would mean 36 rolls, a tedious task for a human… but nothing for a computer. Roll 2d6 on the following chart, keeping track of doubles:

2d6 This Direction Leads to a…
2 blocked or collapsed tunnel
3-4 door to tunnel (or room if double 2s rolled)
5-7 wall (secret door on double 3s, roll again)
8 tunnel continues (or room on double 4s)
9-12 stairs down (ladder on 5+ on 1d6) roll again
change direction to “up” on double 5s or 6s

Two of the results – secret doors and stairs/ladder – require a reroll to see where they lead. Stairs/ladder also require a 1d6 roll to determine which kind, with stairs being more likely.

Because of the way we start with a grid of interconnecting tunnels, there are loops built into the dungeon structure. The rolls close off some directions, but some areas of the dungeon will still have loops, allowing multiple routes to reach the same area. When we get to room generation, room exits can generate additional tunnels as well, which can further complicate the structure. This is good. This is a Jaquayed dungeon structure.

Now let’s back up to Step 1. We roll for structure here, too. This is more like a superstructure. It’s basically the same process, except the tunnels are assumed to be longer, and each “room” is actually a substructure, its own network of 36 potential intersections, with a tunnel from the superstructure connecting to one of the outside intersections. If Step 2 generates a dungeon, Step 1 generates a dungeon of dungeons. A megadungeon, if you will. The loops built into the superstructure will enable multiple routes to specific dungeons – call them sublevels, or dungeon nodes. If a route through a particular dungeon seems too dangerous, it may be possible for adventurers to get around the danger via one or more other dungeons.

And it gets more complicated, once we start talking about themes and room clusters. But I better reserve that for another post.

Creative Commons license
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0
International

(CC BY-NC-SA 4.0) license.

Wednesday, October 16, 2019

RDG: Thoughts on Computer-Generated Sublevels

Alex Schroeder let me know in a comment on yesterday’s random dungeon post that he’s looking for additional dungeon generation algorithms for Text Mapper. The method I described in that post was really aimed at being simple and easy to remember for humans. What would I do if I were exploiting computer power instead? What does Text Mapper actually need?

The 5- and 7-room dungeon algorithms are already pretty good for mini-dungeons. One thing I noted, though, is that it rarely creates a Jaquayed dungeon, as Jason Alexander describes. The structure is almost always linear with maybe one or two dead-end branches, although I did get two 7-room dungeons with internal loops after several reloads. And since they are mini-dungeons, there’s an obvious underrepresented dungeon type: megadungeons, or at least sprawling underworlds. I did do a couple old posts about random dungeon generators and non-linear dungeon generation, although I think they are unusable for a computer algorithm in their current state. Still, there’s the seed of a couple ideas for new additions to Text Mapper: an underworld wilderness map, a ruined underworld city generator, and a themed dungeon sublevel generator used as part of the underworld city generator or by itself to generate a mid-sized dungeon.

Here are some hypothetical steps we could take for the third and most important generator:

  1. Start at the Top. Randomly select a theme and basic tunnel structure that includes loops and nodes.
  2. Each Node is a Substructure. Generate a more specific theme within a node and its own tunnel structure with loops and subnodes in the same way as Step 1.
  3. Each SubNode is Either a Room or a Room Cluster. Theme determines which (Mazes tend to be more tunnels and isolated rooms, Tombs are like Mazes but with tunnels connecting room clusters, Ruins have more room clusters, and Fortified Areas have shorter, fewer tunnels.)
  4. Generate a Room Shape and Exits.
  5. Select Room Theme. For example, Storeroom, Torture Chamber, Kitchen. Specific theme from Step 2 determines list of room themes to select from. Room Theme specifies general room contents, including containers present.
  6. Add Room Occupant, if any. Determine if occupant starts in a hidden state and what the trigger is (vermin can emerge from crates if disturbed. Spirits can be summoned by touching a holy/cursed object.)
  7. Add Container Contents, including possible treasure.
  8. Add Secrets, including secret exits or containers.
  9. Repeat Steps 4 to 6 for Each Room until SubNode is complete.
  10. Repeat Step 3 and following steps for next SubNode until all SubNodes in the Node are finished.
  11. Repeat Step 2 and following steps for the next Node until all Nodes are finished.

Creative Commons license

This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0
International

(CC BY-NC-SA 4.0) license.

Monday, March 3, 2014

RDG: Special Rooms in Caverns, Warrens, and Mazes

(Posted under duress in accordance with the OSR Blogowners Association standards.)

I’ve done some preliminary testing of the corridor generation and room generation techniques for a Random Dungeon Generator and noticed some rough spots: entirely too many traps. I will have to fix that in any final published version. In the meantime, I’ve been thinking about generating the zone special feature rooms or zone hubs. I’m not entirely finished thinking about these, an in particular I haven’t decided whether it would be better to connect the structure of the special room to the concept of the feature or keep them separate. I think for now I’ll restrict myself to thinking about structure in isolation, and I’ll take the structure types slowly as I ponder the possibilities.

I’ll start with special feature rooms for caverns, warrens and mazes. (Yes, I know I didn’t describe creating cavern tunnels and generic “rooms” yet, buut I’ll get to that soon. In the meantime, I’m just going to state that I see the special feature rooms for both caverns and warrens as being structurally the same.) While the standard rooms surrounding a zone feature are all squares and rectangles of fairly similar size, the zone feature rooms ought to have a chance for more irregular shapes: L- and T-shaped rooms, for example.

There’s an easy way to do this.

Imagine first that the area – subzone – with the special feature in it is a 10x10 square “geomorph” (100 x 100 feet.) The geomorph has four quadrants, and there may be a room are part of a room in each quadrant. Roll 3d6 and observe how they land in relation to each other: the arrangement will be either an L, a T, or all in a rough line. this tells you which quadrants have a structure present.

Each d6 represents one possible room. If two of the dice, or all three, match, merge these into one room. The dots on a d6 represent the shape of the room, similar to the way the spaces behind doors work, but in this case each dot is a 20 x 20 foot area of floor.
  1. 20-foot diameter circular chamber
  2. triangular room, 20-foot base & height
  3. triangular room, 30-foot base & height
  4. 40x40 foot square
  5. 50x50 foot square
  6. 40x60 foot rectangle
“Merged” matching dice will extend one of the dimensions. For example, this arrangement of dice:
4    4
5
Represents an 80x40 foot room spanning the north half of a geomorph and a 50x50 foot room in the SW quadrant. Merged triangles get trickier, since depending on the dice orientation, you will get either a larger triangle, a parallelogram, an irregular shape, or a trapezoid. for caverns and warrens, you should round the corners and curve the walls a bit, but mazes may have actual straight walls and sharp corners.

Another roll, which I will present in a future post, will allow for pits and high ceilings. If a room has either, roll 1, 2 or 3d6 depending on the number of quadrants the room spans to determine what the shape of the “basement” and “gallery” levels is. It might be smaller or larger than the chamber’s main level, and might have a different shape than the lower portion, perhaps even connecting to an upper or lower “sublevel”.
Written with StackEdit.

Saturday, February 22, 2014

RDG: Placing Rooms

in the previous article I wrote about how to place tunnels or passageways in a megadungeon first, using leximorphs – “geomorphs” made out of letters in a word – and placing the rooms after the passages are defined. The steps, in summary, were:
  1. Roll a d20 and a d6 at the same time.
  2. Spell out the numeral rolled on the d20.
  3. The d6 roll is the number of letters to use.
  4. The dot pattern is the position of each letter, starting at the top and moving clockwise.
  5. The orientation of the d6 – diagonal, vertical, or horizontal dots – is the orientation of the letters.
  6. Write letters so that they touch each other.
  7. Roll d8 for ruins, d12 for tombs, or d20 for mazes and consult previous table.
  8. If a passageway continues into a new subzone, repeat from the beginning.
For step number 7, however, it would be more appropriate to roll the d8, d12, or d20 along with a d6. If the first dice rolled is a number higher than 2, the d6 can be ignored. Otherwise, it will indicate either what’s behind a door or doorway, or the arrangement of a cluster of rooms or doorways.

Let’s take the first case: you are rolling a d20 and a d6 simultaneously to determine what is at the end of a tunnel in a warren or maze. If the d20 result is a 1 or 2, then the dots on the d6 show us the shape of what is behind the door:
  1. Dead end (a 10x10 “room”, completely empty.)
  2. Passageway.
  3. Passageway.
  4. Square room, 40x40.
  5. Square room, 50x50.
  6. Rectangular room, 40x60 or 60x40.
Again, the position of the dots for any roll above 1 tell us the orientation of the passageway or room. Passages can lead straight ahead, diagonally left or right, or form a “T” with the tunnel that connects to them. Either the walls or the corners of square rooms will be aligned with the compass directions. The long sides of rectangular rooms can be aligned N/S, E/W, or offset 45 degrees from one of those directions. The size of a room or passageway in any given direction will shrink to fit the space actually available on the map. If a passageway deadends next to an area that is already mapped, or if a room shares a wall with an existing room or corridor, players can check for secret doors to find a shortcut.

In a tomb or ruins arrangement, the d6 does not represent a single room, but a cluster of doors or rooms:
  • If the d6 is a 1, there’s only one door or doorway; roll another d6 and interpret it exactly as you would for a maze, using the table above.
  • If the roll is odd (3 or 5,) there is one door that leads to a 50x50 room. The center dot on the die represents that room, with other dots representing positions of doors (either side of the room for a 3; one door per wall, near the corners, for a 5.)
  • If the roll is even (2 or 4,) the passageway runs between one or two pairs of doors.
  • If the roll is a 6, the passageway runs between three pairs of doors OR there is a single door with a 60x40 room, depending on the orientation of the d6. In the latter case, the short walls have one door each, while the wall opposite the entrance has three doors.
For each door indicated, roll a d6 to determine what is actually behind the door, using the table above. If you are using this as a solo RDG, don’t roll the d6 for a given door until you open the door. For every room except the 10x10 result, you would use the random room types and stocking methods appropriate to the zone (I haven’t detailed these yet.) The 10x10 room is the only truly empty room and is meant to be a “gotcha” (“Dammit, we wasted time getting through this door?”) However, resourceful players can use these rooms as makeshift supply rooms or jail cells.
Written with StackEdit.

Monday, February 17, 2014

RDG: Filling in Corridors

Another post on the topic of Random Dungeon Generators… Previously, I mused about generating megadungeons zone by zone, starting with zone themes I previously described, with a central feature acting like a hub, and filling in the area around the hub with more generic rooms and passages, stocked randomly. One problem you encounter with a lot of random dungeon generators is that they tend to be very slow, filling only a small area at a time. This may seem to be irrelevant when using an RDG for prep instead of generating as you play, solitaire or otherwise; however, when you need to fill large areas, such as in a megadungeon, it’s very tedious. It makes more sense to generate multiple passageways first, then generate the rooms or other features you discover as you explore the passageways.

Imagine a tic tac toe board. One of the squares, selected randomly, is the location of a special feature in a zone (evil shrine, drawbridge, prisoner pit, king’s throne room, etc.) If using an RDG for random prep, number the squares clockwise from the top center and roll a d10 to place the special feature (9 or 0 both indicate the center square.) If you are generating a dungeon during play, roll a d10 as you enter each region; on a 1-2, it’s the special feature. All the other squares are random passageways. what kind depends on the zone structure type:
  • Caverns: irregular tunnels that snake and fork, occasionally widening into caves
  • Warrens/Maze: lots of twisty, narrow tunnels, with only the occasional room or wider area
  • Tombs: maze with sporadic clusters of rooms
  • Ruins: more frequent room clusters
  • Fortified Area: mostly adjacent rooms connected by short passageways
I’ll leave Caverns and Forts for later, but Mazes, Tombs and Ruins share some features and can be dealt with as a group. You need a lot of standard corridors sprawling through the area, sort of like streets in a city, which suggests that you could use leximorphs – words with the letters written close together – to define the tunnels. We can use the method Zak describes for neighborhood street maps in Vornheim: roll a d20 and spell out the numeral rolled.

However, to keep the patterns from becoming too stale, roll a d6 with pips at the same time as the d20. This represents (a) how many letters of the number’s name to use; and (b) the arrangement of the letters. Thus, one dot means only use the first letter; two or three dots means the first 2-3 letters, arranged horizontally, vertically or diagonally as indicated by the orientation of the dots on the d6; four or five dots means arrange the letters clockwise around a square or diamond, starting at the top and ending in the center (for a Five;) and six dots is a clockwise rectangle of six letters. The strokes of the letters are five-foot or ten-foot-wide corridors.

For mazes, each end-point that doesn’t touch another corridor potentially ends in a room. For tombs, they potentially end in room clusters (d6 with pips, dots represent location of rooms.) For ruins, each end-point and each juncture of two or more strokes potentially has a room cluster. Roll on the following table:
  1. Archway(s) with Room(s) beyond
  2. Door(s) with Room(s) behind
  3. Arrow Trap (at juncture only), otherwise passage continues to next area
  4. Falling Rubble, passage continues to next area
  5. Pool of Liquid
  6. Spike Trap (at juncture only), otherwise passage continues to next area
  7. Pit Trap, passage continues to next area
  8. Dead End
Roll a d8 for Ruins, d12 for Tombs, and d20 for Mazes and Warrens; any result over 8 means a Dead End in a Tomb or a passage that continues in a Maze. If the Maze is a lair for wild beasts, Door results will be archways or openings.
I’ll cover adding rooms in the next installment.
Written with StackEdit.

Thursday, February 13, 2014

RDG: Generating Extensive Dungeons

Continuing with my musings on random dungeon generators, I thought I’d look at Beedo’s blog post this time around. Beedo has a different goal than Alexis: prepping megadungeons, instead of solitaire play. He settles on the idea of random dungeon generation to fill in the details of the map and the room key as quickly as possible. We’re mostly talking about reducing the tedium of a very large task, although we also want to avoid tedious output. We don’t want the dungeon map or room key to be too monotonous.

The zone approach mentioned in the previous RDG post would help, but you have to think of the process differently. Instead of rolling as you enter each zone, and possibly having zones change back and forth without much rhyme or reason, you start at the top conceptual level – broad megazones. Say you have a ten level dungeon in the works. For each level, roll 2d6, 2d4, or 2d6/2, depending on how “mega” you want your megadungeon. That’s the number of megazones. Roll 2d4 or 1d6 for each megazone: that’s the number of zones. Each zone has the same zone type as the megazone it is in, so you may have a cluster of Cavernous Lairs, or Ruins+Tribes. Instead of rolling once on the zone-appropriate subtables for each megazone, roll for each zone.

This may be a little hard to see, since I haven’t actually offered any example subtables. I’m imagining there’d be at least one structural subtable for each structure type (Caverns, Warrens/Mazes, Tomb, Ruins, Fort, others.) Possibly a separate subtable or set of subtables to create the structure of the “focal room”, which wouldn’t be a plain, ordinary structure, but might have an unusual shape, multiple height levels, pillars, obstacles, or unusual exits.

Then, you’d have subtables for room types, which basically determine the possible furnishings of the generic rooms in the zone, For example, a Tribe area might have sleeping chambers, storage areas, feeding areas, training areas, guardposts, prisoner areas, etc. Each zone would have two or three room types, rolled randomly.

Then, you have subtables for various monster types: vermin, domestic, guard, wild beast, monstrous beast, humanoid, human, superhuman, cursed (modifies one of the other types.) Each kind of zone will have two or three kinds of vermin, one or two other mid-range creatures, and a primary type and possibly secondary type, based on the area type (Lair, Cursed, Hideout, Tribal, etc.) So, four to seven monster varieties in any given zone. You build your stocking table and wandering monster table from those monsters.

You’d have a couple other subtables for things like traps, hazards, treasure and miscellaneous minor features. These would round out the area.

Now, if you use a source like Dave’s Mapper to snag some random geomorphs, you can use those as your “focal point” in a zone and then use a plainer tunnel/room generator to fill in the miscellaneous rooms around the focal point. As long as your tunnel/room generator is pretty quick, this will let you fill in an entire level map for a megadungeon in a reasonable amount of time. All that’s left is rolling for room types, rolling for occupants, rolling for traps, and rolling for treasures.

Next time, I will probably address some ideas about rolling up the structures.
Written with StackEdit.

Tuesday, February 11, 2014

Random Dungeon Musings

Random Dungeon Generation is the new emerging topic this month, it seems.

There’s a post at the Tao of D&D about dissatisfying aspects of the random dungeon generator tables in the back of the DMG. There’s also a brief mention of random dungeon generation and stocking at Dreams in the Lich House, more of a musing on the necessity of random maps and tables to keep a mega-dungeon project from requiring enormous amounts of time to prepare.

I’ve thought a lot about it myself. And I’ll say first that half of what Alexis at Tao of D&D is not really a big deal. He thinks a major problem with the DMG generator, and other generators he’s seen, is that they produce too many empty rooms. No need to delve into the philosophy of empty rooms and how best to use them; Alexis is simply wrong about this being a major problem because it’s a trivial fix. Swap “Empty” with one of the other results, like “Monster”; problem solved. Although it would be better to change it to “Resource Room with chance of hidden vermin”. You want to leave breathing room for players to rest, or decision points for the expedition (search this room to see if there’s something useful, or not?)

Now, the other point Alexis made is more reasonable: random dungeon generation tends to produce less structure than you may like. It would make more sense for the dungeon to be separated into zones, divided by obstacles or secret doors or other restrictions to movement, Each zone would have its own list of monsters; only vermin or wildlife would be likely to spill over across zone boundaries, while major predators and intelligent denizens would be restricted to specific areas. You’d feel a natural flow, that way: as soon as you made your way across the Underworld Rapids, you’d notice fewer Devil Goblins and more Spiked Frogmen.

Now, I’ve had many ideas about random dungeons and have many others I’m mulling over, but I’d like to point out that the megaduungeon modules I posted a couple days ago are sort of built on that concept, and point the way to a solution: build each zone around a centerpiece room with special features and several generic room types for surrounding areas. If you are using random generators for solitaire play, roll the zone type first as you enter an area, then assign your vermin monster(s) and build a basic corridor structure. Exploring rooms is likely to reveal more monster types, more resource types, and eventually, you will find the “central” room that defines the theme of the area.

Your first table is going to look something like:
  1. Caverns+Lair
  2. Warrens
  3. Ruins+Lair
  4. Ruins+Curse
  5. Tombs
  6. Tombs+Hideout
  7. Caverns+Hideout
  8. Ruins+Hideout
  9. Caverns+Tribe
  10. Ruins+Tribe  
  11. Fortification
Etc. The idea being that each entry is a pair of “general structure” + “type of major threat”. There would be separate tables for each structure type: caverns, warrens (tightly-packed and dug by a beast,) ruins (crumbling, repurposed constructed area,) tombs (sort of warrens for the dead,) and forts (newer structures in good repair.) Each table would define the major active feature + minor room types, and the minor rooms would cluster around the major room. The zone table would also direct you to separate monster tables to roll up vermin, wild beasts, monstrosities, and inhabitants, with “Lairs” favoring beasts and other monstrosities as the dominant inhabitant, “Cursed” pretty much guaranteeing a monstrosity with an unusual ability and possible semi-intelligence, “Hideout” being a bandit camp, “Tribe” generating humanoid living areas, and “Fortification” having a more organized intelligent monster dominating lesser minions.

But I suppose I’ll have to develop this in more detail later.
Written with StackEdit.