Old school and 2d because it's easier to screw up connectivity in 3 dimensions.
So basically this is me talking about how I plan to put the logic for this together. You probably don't have any reason to read it if you don't know a little bit about or have any interest in random map generators.
My concern:
I tend to realize I left something big out midway through these things but I don't think that will cut it here. I need to have the scope laid out up front.
First Analysis:
So in these games you can't just do a plain maze generation, except that you almost can. While a lot of the paths loops back on each other you've rarely got more than one real path you can go down to progress to the next boss. I can basically set it up like the Gaussian noise landscapes that make decent terrain. The maze is the lowest resolution step.
The games I remember so fondly would frequently have some tool or event open up a shorter path to go from where you were back to town so actually trying to place more detailed features literally on top of a simple maze won't work, I would have to contort the whole thing to get paths to cross over each other (or have it be 3d but that's just going to be a mess.)
No, it needs to be a middle layer on top of the abstract path of first dungeon, second dungeon, third...
The other failing of using basic maze generation is that the areas are rarely shaped like winding tunnels but rather have more of a hub and arm layout. The levels from the middle of the game onward are a strong mix of both (LttP's Ice Temple was my Water Temple before gamers griped about Water Temples- getting from point a to b without the puzzle's required conditions really does just throw you back to an earlier state demanding you navigate your way through it once again.)
So basically every junction in the game is a lock and key barrier, other than the linear path you're presented. Except that it isn't linear. The dungeons especially have junctions where you're given a choice of which door to unlock with those universal yet single use keys. This brings the danger of a choice where all of the player's keys have been used but the paths to the remaining keys all remain locked off. The cheap solution to this is to place a key behind every door but that isn't satisfying as the structure becomes too predictable.
The Actual way to do it:
The better way to do guarantee that things are solvable is to work backwards so that you're always placing the key to a door somewhere in front of it. Any time there is a new obstruction to that key the obstruction will have a key available somewhere reachable. You can't have an unlimited number of paths using the same key type all on the same hub like this but having more than six paths on a hub usually feels like bad design anyway. The largest rooms all have barriers down the middle that require solving some multistep puzzle to open up. This method also allows for safe generation of one way paths into new areas.
For the purpose of setting up the map all of the tools are just a multi-use key with a specific (or not so specific) lock they fit into. In the case of puzzles you couldn't have reached until you have the tool needed for them they really don't need any puzzle logic- they just fill up space so the player progresses through them much the same way as they would through an empty hallway. The problems with a series of empty hallways are that they present poor pacing, don't offer any mental reward, and don't continue to make the old tools feel valuable enough to keep carrying around.
So working backwards from the end to place every required object before the lock it opens gives the lowest component. Filling in space between these junctions with locks the player already has the keys for (old tool puzzles, mazes, or puzzles requiring no tool, or just fights with generic monsters,) and winding the path back to familiar locations so that it doesn't take too horribly long to get somewhere once all the doors are open provides the middle component.
The last layer to this random map generator is all of the one shot puzzles that fill the nooks and crannies with money or life fragments. These are all optional and don't consume exhaustible resources so they can go anywhere in any order.
Closing Thoughts:
I think this pretty much does it for the overall map. It will leave empty spaces at the "end" for the tools the player got at an earlier point in the game so at this point the npcs and enemy encounters can all just be blank boxes like that. Stages where the player actually has to deal with a specific npc to open some gate don't require any more fleshing out than that because it's not this has the mechanisms for exhaustible keys or any of those tools yet- it really just needs to place the rooms and their locked doors onto a grid.
Some of the more complex dungeon rooms and wilderness screens are really several "rooms" in the way I've been using that word so having a "screen" be a 5x5 area on the grid should make these kinds of things easy enough to put together without tangling up the logic to much. It would work about the same way as crossing the paths so that players go back to a town area after most dungeons except that the paths would remain distinct.
With all of this in place though it shouldn't be too unmanageable to fill it in. Games like Diablo just stitched together prefab set pieces so it shouldn't really be new ground to tread. Lot of work obviously but if I'm really not up to it I could hand the generator off to other people.
So I think that's everything it would take to get the structure of the world put together. This is fairly grandiose compared to the random level generators people usually make for games but can anyone see any particular roadblocks that would get in the way? Or anything important I've left out?