- Alternative path and optional area identification. The map generator constructs a graph from the map structure and uses the graph to determine where to place content on the map. Each content type has a graph pattern that defines the possible placement locations on the graph. Example patterns are any node, a leaf node, or a chain of nodes. This allows content to be placed where it makes the most sense, such as putting treasure at the end of a sequence of rooms filled with enemies. The map generator now recognizes more complex patterns: alternate paths and optional areas. The former is a subgraph in between two required nodes (a node that must be traversed to get to the end of the level) that contains two or more disconnected sets of nodes. It’s used to identify different paths the player can take through an area of the map. The latter is a subgraph connected to a single required node and is used to identify a set of connected rooms that are completely optional. These patterns are necessary for some history event types, such as faction settlements, abandoned areas, and alternate paths with varying distance and difficulty (the player can take the long, safer path or the short, more dangerous path).
- Enhanced map graphs. Added support for alternative paths and optional areas, made corridor shapes larger, modified node visual styles to improve clarity, switched to a sans serif font.
- Map generation stats expanded and dumped to a file. To aid in troubleshooting, and collect data on the map generator, map generation stats are now written to a file.
- Minor bug fixes.
Next week, I’ll add new history event types that use the new alternative path and optional area graph patterns.