Jump to content

Is it Possible; A Procedurally Generated Dungeon?


Dudred

Recommended Posts

I am brand new to modding, and as an initial project, I am working on a large dungeon, designed to be a break in the linear, boring, dungeon-sweeping. I want it to be a memorable dungeon designed to encourage you to leave and revisit frequently, with many alternate areas to explore.

While working on this project I thought of something, would it be possible to procedurally generate a dungeon, or even just a section of a dungeon?

Rather than procedurally generating each room maybe it could be done by making -say 100 different rooms, and linking them together in random orders?
Would it be possible to randomly fill it with enemies, or would you have to place them in when making the rooms?

I don't know if scripting limitations would prevent it, or if it would even need scripting to be done (the best scripting I've done so far is make a talking rock, he only says 4 things, and he's kinda sarcastic). I see NavMesh possibly being an issue between rooms, but I lack the experience to foresee any other problems.

Could you only generate it once, or would it re-generate upon some command?

Would it work upon start-up of a new character (or loading an existing character)? Would another manual step be necessary, such as running a file before starting a new character?

It wouldn't necessarily have to have any endpoints or goals in it anywhere, just 1 entrance/exit, with some loot inside some of the pre-made rooms.

 

I have no idea if it's even possible, but I would like to see it.

Link to comment
Share on other sites

you mean a dungeon that randomly generates as you enter different sections? if so than no you cannot, the Skyrim engine isn't built for it. now if you mean just random enemies then maybe a leveled list of sorts could be made so as you explore harder enemies appear as you level.

Link to comment
Share on other sites

Mmm.. Maybe instead of making it procedurally generated, how about making it a bit "Dark souls"esque?

 

So that you can't access certain parts before you've gone through other parts.

 

Maybe so that at the end of each part you'd get key, only one key that would be lost upon use, thus you could only open one door aka. path with it?

 

But anyhow, that was highly off-topic.

Procedurally generated dungeon/pre-set chosen at random.. I'd guess it's possible, but no idea how.

 

Though, the "randomness" would only work so that door would lead to different instance, gigantic dungeon in one worldspace sounds like something immensively impossible.

 

Or not.

 

The way how hearthfire adds stuff into house could be used, but you can guess how much it's work as EVERY piece of clutter inside the dungeon would need to be linked somehow to quest or something that would randomize it.

 

Pretty hard task, if you ask from me.

Link to comment
Share on other sites

the key thing seems like a good idea

 

Aye, gotta admit I like it myself as well. And made it up in couple of minutes.

 

Though, building one takes many and many hours.

 

Surely, many ol' dungeons could be re-used, and I'd recommend it.

 

Also, this way it wouldn't be limited in size, it could be really enormous dungeon. Maybe even secret paths and such could be used.

Link to comment
Share on other sites

It could be broken up into cells, rather than having it spawn dynamically. You set up various cells that are only accessible via a load-door from the other cells. Then the issue becomes one of how to randomize the connections.

 

However, you'll also need a way for the game to memorize those connections for the return trip, otherwise, the player enters the first section, then through a door to the second, tries to go back into the first, only to end up in either the third or 5th, or even outside again. Or stuck in a loop. Or exit a tower and end up in an underwater cell.

 

However, the engine has issues with numerous load doors, so there's that. Each section would have to be fairly large just to keep it from being a "door room" and losing the interest of the player, or causing "too many doors" crashes.

 

 

If items in a room could be replaced via a timed script, then you could (in wishful theory) attach said script to a given door, replacing it with an identical door model every cycle, and each door is linked to its respective cell.

However, if that could be done, then it should be possible (again, in wishful theory) to dynamically generate a dungeon. Then again, maybe not, since you'd also have to dynamically generate a navmesh and clutter.

Link to comment
Share on other sites

I did something similar long ago as a Dungeons and Dragons DM. Opening a door led to a random room. sometimes it was the same room. It was interesting at first, but got old fairly quickly with the party just opening doors at random trying to find a way out. Every time a door was opened, I rolled 2d10 (percentage 1 - 100) and got the result from a table. I spent a lot of time developing the thing and only used it once.

 

For Skyrim, the choices are even more limited. Each room would be a separate worldspace. Each door will need a loading time to make it work properly - otherwise you could not string them together differently each time. Using this you could even have multiple doors in a room each leading to a new worldspace. I'm not sure how (or if) the CK handles random variables like this though.

 

Next problem, How to keep a record of each worldspace you pass through so you can retrace your path - now what was once random is not.

Link to comment
Share on other sites

the key one sounds better and has a lot less trial and error for a first time dungeon mod. so I would go with the less stress option. also making a fun maze that can be revisited at different times (maybe add a reset button that resets the dungeon prior to you entering as if you never entered) seems far more enjoyable than making a bunch of room and letting the game make the maze. in the first one you could change massive parts of it at anytime without to much effort.

Link to comment
Share on other sites

I actually had a system similar to the key idea already planned for the dungeon I am working on, regarding choices in which door to open. I just thought procedurally generating a dungeon would be amazing if you could get it to work. Key words, Key Words.

Would it be possible for the dungeon to generate itself upon starting the mod via say, SkyUI, mod interface? (so long as you are nowhere near the dungeon) Or even just upon creating your character? It wouldn't have to be an endless dungeon, but one that is randomly created up to a specified size. I am thinking of it as taking and randomly attaching pre-built rooms to one another, simply lining up the matching door pieces of each room together, randomly.

If all else fails, could it be done by generating the dungeon outside of the game (perhaps during installation of the mod?) and it will generate you you're very own randomized dungeon? Of course, this nearly defeats the purpose, as you have only one of these special dungeons to share with all your characters, rather than it being different for each play-through. Unless you also made a way to re-generate it (outside of the game?).

To make it unique for each play-through, maybe it could generate- say 5 different dungeons- and then randomly assign each to different characters? Character A is assigned Random Dungeon 1, Character B is assigned Dungeon 3, and Character C is assigned Dungeon 1 again etc. So during character loading or creation it would "pick" one of those random dungeons to use for that character.

Edited by Dudred
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...