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.
This system currently requires FastAsyncWorldEdit!!
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, and the minimum and maximum number of times the room will generate in the dungeon. Rooms are saved in a rooms
folder inside your dungeon, and consist of a YAML file and a schematic 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.
Configuration
Generated dungeons come with a new generator.yml
file that contains various settings on how the dungeon will be generated. This includes layout modes, which are generation style presets (Minecrafty vs branching), as well as options for those layouts. This file is also where you configure the minimum and maximum number of rooms.
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%.)
[Image of a Minecrafty layout dungeon here]
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, and how many rooms each branch can have.
In the below example, you can see a dungeon with no branches. Note that there are no rooms with more than two connectors.
[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.