I think a lot of what has been suggested can be implemented using something loaded from the raws, in a manner similar to what Captain Failmore suggested. Some features, like geysers, require hand-coding. Others, like mole-dens, require related features (burrowing creatures, in this case). But most could be done in the raws.
However, how I would set up such a system differs from Failmore's enough that I think it's worth describing here.
This method involves two types of raw, rooms and complexes. In exchange for that added complexity, there are far fewer tags.
Rooms have the following information:
- Range or list of sizes. width/height/depth.
- Possible contents. Each has a range of quantity, a probability, and a type. The type can be general, like reaction types are currently.
- Possible buildings. Type, quantity, probability.
- Possible creatures. Type, quantity, probability.
- Wall material. This forms the room's edges. Something specific, something general, or no change.
- Wall type. Any tile type will do. Smoothed wall, unworked floor, whatever.
- Floor material. This forms the inside of the room. Defaults to same as wall material.
- Floor type. Defaults to unworked stone floor. Setting it to something like unworked wall makes your "room" not so much of a room.
Complexes have the following information:
- Average room distance. The number of tiles between rooms on average.
- Rooms. Each gets number of times, probability.
- Linking corridor wall type.
- Linking corridor floor type.
- Linking corridor width.
- Linking corridor height (vertically).
- Linking corridor stair type. Tile type used when a corridor has to go up.
- Distance at which creatures activate. By default, 0, IE; they're spawned when you breach the wall. You could raise this to a higher number for moles.
- Information on the biome you'd find this in. No giant bees in the arctic. No unexplained pools of blood in joyous landscapes.
When the game decides it wants to put one of these in, it figures out how many rooms it needs and their total size. It then multiplies this size by their linking distance and finds a region big enough to hold that complex. The game places rooms in that area randomly. If trying to place a room fails enough times, the room goes a bit off the edge. Once done, it finds an unconnected room, connects it to the nearest room that it's not connected to, and repeats until they're all connected.
Examples:
- Giant beehive. Define a 1x1x1 room with walls made of wax, a chance of having a bee, and a chance of having honey. Define a slightly larger room with a guaranteed queen. Make your complex out of lots of the small rooms and one of the queen room, and set the linking distance very low.
- Undead settlement. Define 3x3 rooms with workshops, 5x5 rooms with lots of one kind of good, large rooms full of tables and chairs, and small rooms with beds. Put a chance of an undead dwarf on each of those. Make your complex out of lots of the workshops and stockpiles, one or two dining halls, and lots of bedrooms. Set the linking distance moderately high and make the corridors semi-big.
- Lava flooded settlement. Repeat the above, but remove all room contents. Change the floor tile to unworked obsidian walls.
- Inexplicable bloody mess. Just one room. Fill it with water, a few dwarves, and undead carp. Make the spawning distance high so the carp have time to make it into a bloody mess before you see how it's been done.
[ December 04, 2007: Message edited by: SquashMonster ]
[ December 04, 2007: Message edited by: SquashMonster ]