DISCLAIMER |
---|
Dev builds of Mythic Dungeons 2.0 are NOT available yet! |
With Mythic Dungeons 2.0.0+, it is now possible to create procedurally generated dungeons. This article will explain how they work.
To make a procedural dungeon, create a new dungeon with the following command. /md create <your dungeon name> procedural
Rooms
Generated dungeons are created from a collection of admin-defined rooms. These rooms are like puzzle pieces, and are configured with connectors that link them up to other rooms. They must be built and configured in the dungeon editor.
Rooms have their own unique settings, such as a weight value to raise or lower the likelihood of the room being used, a minimum and maximum number of times the room will generate in the dungeon, and how deep into the dungeon it will generate. Learn more about rooms here!
Rooms are saved in a rooms
folder inside your dungeon, and consist of a YAML file and a structure file.
Connectors
Rooms are configured with a set of connectors. These connectors are what the dungeon generator will use to attach rooms together, lining them up. Connectors MUST be placed at the edge of a room, but you can have as many as you want, including multiple connectors on the same side of the room. This is incredibly powerful for creating dungeons with multiple floors.
Connectors have options for what other rooms are allowed to connect to them, which can ALSO be further customized with a "weight" value to raise and lower the likelihood of a room being chosen at this connector.
Connector Doors Connectors can further be customized with connector doors. These are groups of blocks that can be placed and removed by various dungeon functions and mechanics. This allows full control over progression through your dungeon's rooms. It also lets you create fancier-looking walls to block off connectors that don't have rooms on the other side of them!
NOTE: The "entrance" into a room will ALWAYS be left open. This is to create consistency with room doors. If you want to prevent players from advancing, you should close doors other than the entrance. Here's a visual to explain it.
Configuration
Generated dungeons come with a new generation.yml
file that contains various settings on how the dungeon will be generated. This includes layout modes, which are generation style presets (such as Minecrafty vs branching), as well as options for those layouts. This file is also where you configure the minimum and maximum number of rooms.
Surrounding Block The surrounding block in the generator config is the block that will surround your rooms. This is handy for quickly closing off connectors you don't want open with a solid block, and basically surrounds each room with a "box" of the specified block.
Branching Layout
A branch is a series of rooms generated linearly together, each only using two connectors max, creating a linear path. This layout generates a primary branch (lets call it the "trunk"), and then attempts to generate additional branches on unused connectors of the trunk. You can further customize branching behavior by tweaking how many branches can generate, how many rooms each branch can have, and what rooms a branch is allowed to use.
[Image of a Minecrafty layout dungeon here]
Minecrafty Layout
Minecrafty layouts generate dungeons in a similar way to Minecraft's Strongholds. This generation tends to be much more chaotic and is easy to get lost in. For every connector in a room, the generator will try to generate a room connected to it. When using this layout mode, connectors have a "chance" option that decides how likely they will generate a new room. (Default is 50%.)
In the below example, you can see a dungeon with no branches. Note that there are no rooms with more than two connectors in use.
[Image of branchless dungeon here]
Straightness
Straightness is a property of branches that lets you determine how likely the rooms will generate in a straight line. If this value is set to 1.0 (100%), it will try to always generate rooms in a straight line unless it encounters a room without any valid connectors for a straight path.
In the below example, you can see that the dungeon generates in a perfectly straight line until it encounters the red bend room.
[Image of a (mostly) straight dungeon here]
Additional Notes
- Rooms can generate rotated.
- Dungeon functions are stored inside rooms instead of a
functions.yml
. - All dungeon functions are fully supported, and are preserved when generating a room.