Today we build a road which goes straight from the south to the north.
This tutorial is a little bit longer than usual. It covers
- using traversing paths instead of entrance and exit
- „persist“ the map so you can travel back to the south and it still looks the same
Region IDs Setup
This function can be used instead of „place Entrance / Exit“. Instead, we build two paths which leads out of the current map.
We need to setup the region tags on the snippets differently: Basically, we put Region Id 6 on every path that goes to the south, and any custom Region Id on every path that goes to the north. These will be spawning points for the player.
You can remove the entrance and exit from the Decoration Map as they become obsolete. As we don’t have an exit anymore, we need to find another way to let the player transfer to the next or previous map.
We place an event onto the Space Map with a parallel process. In this tutorial we want our player to be able to travel towards both the north and the south. Therefore we need 2 commands. Additionally, to have persistent maps, we use a seedable RNG and feed it each time before the generator starts. I moved these commands into a Common Event to keep things more tidied up.
$dungeonGenerator.randomWalk() .borderWidth(0) .allowGoingBack(false) .makeWayOut("bottom") .makeWayOut("top") .generate() .drawDecorations() .spawnPlayerAt("bottom") .finalize();
$dungeonGenerator.randomWalk() .borderWidth(0) .allowGoingBack(false) .makeWayOut("bottom") .makeWayOut("top") .generate() .drawDecorations() .spawnPlayerAt("top", 7) // <-- set the region Id you actually used .finalize();
The last one is a very simple example with one issue: There’s no function to actually leave the dungeon. As soon as the progression becomes eg. >5 or <0 then the player can be transferred back to the world map or any other location.