RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] (Somewhat) Random Dungeon Generator

0 Members and 1 Guest are viewing this topic.

********
Licks
Rep:
Level 91
Sexual Deviant
For a (somewhat) random dungeon generator, you will need
at least 2 varaibles and patience to make extra maps

Lets say you want a dungeon where you go through three random rooms and then a boss room at the end

Make six rooms where the exit is on the same side of each room (if you don't do this, the layout will seem illogical)
Why six rooms for a three room dungeon? So that the player as a more random trip through. Try to include some puzzles or minibosses and maybe even a treasure room of sorts.
Also make a boss's lair

At the entrance of the dungeon, have an event where the player walks in like this
Code: [Select]
Control Variables: Room Count+= 1
Control Variables: Room Number= Random No. (1...6)
Conditional Branch: Variable [Room Number] == 1
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 2
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 3
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 4
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 5
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 6
Transfer Player: (room name)
Branch End

Then at the exit of each room put this code (note, If you want your players to be able to loop back to the same room, add another branch)
Code: [Select]
Conditional Branch: Variable [Room Count] == 3
Transfer Player: (boss lair)
Control Variables: Room Count+= 1
Control Variables: Room Number= Random No. (1...6)
Conditional Branch: Variable [Room Number] == 1
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 2
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 3
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 4
Transfer Player: (room name)
Branch End
Conditional Branch: Variable [Room Number] == 5
Transfer Player: (room name)
Branch End
Branch End

If you want multiple dungeons like this in one game, rather than making multiple variables, at the boss, multiply the room count variable by zero and since the players will not back track through, transport them out
To see an example of this, download the attached file
If you have questions or comments say them here.
« Last Edit: February 23, 2014, 04:07:21 PM by modern algebra »

*****
Rep:
Level 88
Great job! This is great. I can use this.

Really helpful. +Rep! :blizj:

*
A Random Custom Title
Rep:
Level 96
wah
Nice. Now I see why you put (Somewhat) in the title.

********
Licks
Rep:
Level 91
Sexual Deviant
Updated it incase you want multiple random dungeons
« Last Edit: November 13, 2007, 03:36:42 PM by Brick Shitter »