Randomly Generated Dungeons (Mostly) Through Events

musicalgenocide

Villager
Member
Joined
Jun 8, 2014
Messages
12
Reaction score
1
First Language
English
Primarily Uses
Hello everyone,

First of all, thank you in advance to anyone that reads all the way through this - I realize it's a lot. Basically, I am hoping that some of the community is able to share some insight around the logic of what I am trying to do; possibly showing me an easier way or confirming that I am on the right track. 75% of this is crafted without plug-ins. While I do understand programming logic, I am not fluent in javascript. I have, however, been playing with events since RPGMaker 2000; so I at least have a pretty good idea of how those work.

To put things in as basic terms as possible, I am attempting to make a game that is very similar to Lufia II's Ancient Cave dungeon, but with roguelike progression.

If you aren't familiar with the Ancient Cave, this is how it works (as I remember it from 15 years ago: )

  • Every floor is randomly generated - floor layout, monsters, chests, exits, etc.
  • Every 10 floors is a boss. Afterwards, you have an option to leave the dungeon or continue to the next 10.
  • There are 100 floors total.
  • Your party starts at level 1, and the enemies scale with you as you progress.
  • Each enemy encounter is represented as a single NPC on the map.
  • Enemies only move when your character moves, moving from the current tile to a random adjacent tile.
That's it, in a nutshell. The key differences for my game are:

  • You start with one party member and are given a random additional member in each new area.
  • You start with two available characters to start as - certain conditions being met in each game unlock additional characters to play as in future games.
  • After the boss, you have an option to go to town.
  • Every set of floors has a different area theme (forest, cave, etc)
  • Each area theme is randomly chosen based on "tiers" - higher tiers becoming available the more areas you clear.
Ex: Area 1 was rolled as Forest, a Tier 1.
After Forest is cleared, a new area is rolled. Area 2 can't be Forest again, so a different Tier 1 is selected - Cave.
After Cave is cleared, two areas have now been cleared, moving on to Tier 2. Area 3 is rolled as Swamp.
  • Every area has a boss unique to that area.
  • The final area is chosen based on a dice roll at the beginning of the game, and that area's boss would have player interaction through events in areas leading up to the final area. The idea for this being to develop a story behind that particular boss inside of that play-through.

So here's what I've got so far.

1) Randomly Generated floors & areas:


upload_2018-8-10_11-50-13.png

The first picture shows the "Forest Next Level" common event. This event is used at the end of every floor. When the player chooses to proceed to the next floor, a random number is generated to determine which map to send the player to. Each number is linked to a specific variant of the current area. Every unique area has an "(x) Next Level" event that uses the same contents.

FloorCount: Gets a +1 at the end of every floor. Once it reaches 4 (starts at 0, so this would be on the fifth floor), the player is sent to the boss floor.
NextLevel: Used to select which variant to transfer the player to.


upload_2018-8-10_11-55-39.png

The next common event, "Progression", appears at the end of every area. This event determines which new area the player will be transferred to.

Before any other calculations occur, it resets FloorCount and NextLevel to prepare their use in the next area's "(x) Next Level" common event.

The event first checks to see what the AreaProgression variable is set to, which in turn determines which tier of areas the event will choose from. If it's <2, then a number from 1-3 is rolled and the area linked to that map is chosen. If an area is chosen that the player has already been to, then the event loops and tries again. If it's >2, then the event will choose from the set of three Tier 2 areas. The same would then be true for >4 and Tier 3 areas.
TotalAreaProgression: Counts the number of unique areas cleared.
ForestComplete: A switch that is activated at the end of the Forest area. This signals that this area has already been chosen so that the player will not have to play through the forest area twice - the switch is turned ON after the area's boss is defeated. The same switches are used for each area: CavesComplete, SwampComplete, etc.
AreaChoose: This variable picks which of three areas in a given tier to transfer the player to.

upload_2018-8-10_12-14-1.png

I would assume that, even if it was possible to actually create and randomly generate maps from scratch, it would require some pretty extensive amounts of code.

My solution is to just make several different variants of each floor. All of the Forest 1 maps would be similar in layout, but the entrances, exits, chests, monsters, etc would all be different. There also may be slight variations in the walls/pathways, or a secret passageway that only appears on one version of the map, etc.

This method requires creating a LOT of maps, and is probably the most time consuming portion of the actual creation of the game. One of the reasons for creating this post was to make sure that my logic was sound before I made 300 maps and had to go back and change the same six details in every map.

2) Random encounters:


upload_2018-8-10_12-18-47.png

This event is a single encounter. When the player enters a new floor, the below event, "Monster Generator" is run automatically.

upload_2018-8-10_12-19-59.png

The variable MonsterCount is used to determine which map encounters are active on each floor. The idea behind this it to randomize the number of enemies and enable "rare" encounters. The "less than or equal to" instead of just < is used to ensure that rolling a 6 and getting the "rare" encounter does not also trigger every other encounter on the map.

The encounter event itself is pretty simple: When the player touches the event, the encounter is triggered. If the player wins, the event is erased. If the player loses, game over. Yanfly's Enemy Levels and Enemy Base Parameters plugins are used keep the enemies scaled with the level of the player.

The comment <Move_With_Player> is from Frysning's Event_Mover plugin, a plugin that literally says it makes the monsters move like they do in Lufia II. Thank you for that, Frysning.


As for the Common Event: Monster; it's empty. I put that there because I am hoping that there is a better way to do this, rather than copy/pasting every monster event, changing it's MonsterCount variable and changing which troop is used 5-20 times for each map. Basically, doing this like a billion times (*my math might be a bit off)

3) Character Selection, Unlocking and the Final Bosses:

Here's where I am getting a bit hung up.

I'm currently using Hime's PreTitleEvents for the character selection process - this skips the title entirely and goes straight to a screen that shows the two available characters and asks if the player wants to start a new game or quit.

This works fine, but I am not sure how to actually trigger unlocked characters to be selectable as a saved game is never loaded - thus any previously achieved process would be lost to the void. Is there a way to pull up a loading screen or force the game in the first slot to be loaded?

As for the final boss making appearances in earlier levels: Again, I would probably lay this out using various variables and switches on each map - but the concept seems cumbersome and I feel like there has to be an easier way.



In closing, I will not admit the number of games (I don't remember tbh) that I have started working on and never finished in the past. A hundred thousand things have gotten in the way - whether they be working too much, being too tired from working too much, finally getting some free time but instead wasting it playing some stupid MMORPG which was supposed to be like Ragnarok Online but better but then turned out to be lame so going back to Ragnarok Online again until something else came along and starting all over again and then just being pissed off at yourself because you realize you wasted all this time when you should have been doing something ****ing productive. *deep breath*


Anyway, I have a tendency to dream big. Way too big. For me, this project is smaller - achievable. A stepping stone, practice to help prepare me for the game that I want to make.

I just need some help getting started, so I would love to hear some feedback or suggestions on anything above. Thanks for reading!
 
Last edited:

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,401
Reaction score
4,965
First Language
English
Primarily Uses
RMMZ
I actually did a project with random dungeons through events. I made 10 very large maps, had different start locations and evented path cutoffs to cause different dungeons. I used the tileset change command to create different areas within these different maps and tilesets.

The result was good. The bugs were a massive pain to track down and repair.
 

musicalgenocide

Villager
Member
Joined
Jun 8, 2014
Messages
12
Reaction score
1
First Language
English
Primarily Uses
Swapping tilesets is interesting, I hadn't thought of that.

Given the scope of all the randomness I'm trying to achieve, I figure there's going to be some bugs to root out sooner or later. That's why I'm trying to get the logic/concepts down and make sure I'm doing everything right before I start doing the bulk of the work.

And when it comes time to squash bugs, I'll be ready.
 

Aelrios

Warper
Member
Joined
Aug 15, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Dude holy crap! I literally just bought rpg maker mv recently to try and create something like this! If I can pull it off, that is :p. I've only just started, and haven't tried to tackle any of the randomness that such a project requires yet, so I'm afraid I'm not much help yet. I loved the Ancient Cave in Lufia 2, and have always wanted to create a roguelike experience with a similar feel to it! Cool to see that others still remember and enjoyed that part of Lufia 2. I'll have to keep an eye here, since a lot of what I need will probably align with the help you are seeking.

I have to admit it's a bit disheartening to see someone (who can probably pull it off better) making something so close to what I had envisioned for my own project, with a couple of small differences, of course. Not sure if I should continue with this or try something else now, to be honest ^^;;. But either way, I wish you luck with your project!
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,692
Reaction score
1,105
First Language
Portuguese - Br
Primarily Uses
RMMZ
I just found this post when I was just researching something to try to make a game in RM MV that could look like this Ancient cave of Lufia 2! Very good your work !! Good luck!!
 

musicalgenocide

Villager
Member
Joined
Jun 8, 2014
Messages
12
Reaction score
1
First Language
English
Primarily Uses
I have to admit it's a bit disheartening to see someone (who can probably pull it off better)
Now hold on a minute, fellow RPG maker user. Don't sell yourself short! It doesn't matter what you are trying to learn - game design, music, welding, photography, ice sculpting, etc; the more time you put into it is the result that you will get out of it. Regardless of how you feel about the "10,000 hours of practice makes you good at something" adage, it essentially says this on a basic level.

Hard work, practice, effort (and a little elbow grease) will eventually make you successful. I started making music when I was 15, and it was absolutely terrible. 18 years later... well, it's a heck of a lot better than it was 18 years ago!

...making something so close to what I had envisioned for my own project, with a couple of small differences, of course. Not sure if I should continue with this or try something else now, to be honest ^^;;. But either way, I wish you luck with your project!
I can't tell you the amount of times I've played a game or watched a movie or whatever else and thought "damn, this is pretty much the same idea I've already come up with..." It can be frustrating, especially when you see something that is so very close to what you had envisioned, but think of it this way: There's always room for you to put your own personal spin on it.

Sure, Chrono Trigger was an amazing game, setting the bar for the time travel plot device and just RPGs in general. But just because Chrono Trigger did it so well, it doesn't mean time travel is off the table! There are plenty of other ways it can be used to create great stories and great games, and I'm sure that there are plenty of game designers of varying successes that were inspired by it.

The point is, we might have what is essentially the same idea at it's core - but that's just the launching pad. It's what you build on that idea with that makes it special, that makes it yours.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

My dynamic weather system grows... now with cloud cover influenced by wind speed! (4x playback) (Not final cloud image/map)
Wrote a plugin today that allows you to assign BGM, Battlebacks, and even Battle Entry SE's on a per-troop basis. Introducing a random encounter with a high-pitched Chicken Squeal is worth it all by itself.
Stream will be live shortly with some game development! Feel free to drop by!
Asphodelethe wrote on skybluehair's profile.
Hi! I loe your desert NPCs for adding some variety. I've used them in a free game (The Snow Elf on Itch.io) and I'd love to use them in the new game I'm working on, which I hope to release commercially. I'd love your permission if I could have it!


So I figured out how to put words and pictures in the screen transition. It even wipes away from both the top and bottom. The possibilities are endless! :LZSexcite: I'm going to devise secret messages now for them because I'm a terrible wonderful person like that. :kaopride:

Forum statistics

Threads
105,763
Messages
1,016,244
Members
137,450
Latest member
patriciabrown
Top