Gallery

Here you can find some Code Snippets to copy-paste into your project.

If there are lines with a <– symbol in it, read the comment and then remove the arrow and the comment from your command. Mind adjusting variables!

Classical Maze

A very simple call to generate a classical Maze without any finetuning

$dungeonGenerator.prims()
.generate()
.placeEntranceOn("bottom")
.placeExitOn("top")
.drawDecorations()
.finalize()

Ice Cave

This snippet contains „drawDecorationXTimes„. You can use this line multiple times or even not use it.

$dungeonGenerator.prims()
.mergeDeadEnds(0.3)
.cutOffDeadEnds(1)
.generate()
.placeEntranceOn("bottom")
.placeExitOn("top")
.drawDecorations([1, 2, 3, 4])  // <-- fill with the ids of your commonly used decorations
.drawDecorationXTimes(11, 1, 3) // <-- 11 is regionId for Lootchests, 1 minimum, 3 maximum
.finalize();

Sewers

$dungeonGenerator.
prims().
mergeDeadEnds(0.5).
cutOffDeadEnds(2).
generate().
placeEntranceOn("any").
placeExitOn("any").
drawDecorations().
finalize();

Inside the Volcano

$dungeonGenerator.randomWalk()
.generate()
.placeEntranceOn("bottom")
.placeExitOn("top")
.drawDecorations([2, 4])          <-- normal decoration objects
.drawDecorationXTimes(11, 1, 3)   <-- 11 is regionId for Lootchests, 1 minimum, 3 maximum
.finalize();

Demon Castle, with Switch

$dungeonGenerator.randomWalk()
.generate()
.placeEntranceOn("bottom")
.placeExitOn("top")
.drawDecorations([2])       <-- normal decoration objects
.drawDecorationXTimes(11)   <-- 11 is regionId for the Switch
.finalize();

Forest Road

The forest Road uses a Seedable RNG and can be left towards the north and the south. You need a Variable here to store the Dungeon’s Progression. This variable must be incremented by 1 when going north and decreased by 1 when going south.

When entering the map or going north, use

$dungeonGenerator.setSeed($gameVariables.value(4));  <-- 4 is a RMMV variable to store the Dungeon Progression
.borderWidth(0)
.randomWalk()
.allowGoingBack(false)
.makeWayOut("bottom")
.makeWayOut("top")
.generate()
.drawDecorations()
.spawnPlayerAt("bottom")
.finalize();

When going south, use

$dungeonGenerator.setSeed($gameVariables.value(4));  <-- 4 is a RMMV variable to store the Dungeon Progression
.borderWidth(0)
.randomWalk()
.allowGoingBack(false)
.makeWayOut("bottom")
.makeWayOut("top")
.generate()
.drawDecorations()
.spawnPlayerAt("top", 7)  <-- adjust the variable 7
.finalize();