Template for any RPG level generator.
Types of Objects that are required for every level:

Waypoints(Diablo2 fast travel system):
Each level can have multiple waypoints covering every major area(hidden areas don't need waypoints).

Teleport List(UI element based):
Spawn points on level have to be located in neutral zones(see
http://videogamedesign.wikidot.com/leveldesign:neutral-zones )
to prevent players being killed on arrival.
Spawn points shouldn't cover all areas: instead player will spawn in one safe location(town or neutral zone).

No fast travel: Entrances only appear in another zone as portal/entrance/door that needs to be moved in.
This design allows many entrances/exits spread all over the level, leading to different areas or other levels(multi-level maze).

General guidelines: It should be obvious even to dumbest player how to travel to every location without consulting manual/website/docs. Unintuitive travel methods such as e.g. craft an amulet of Realm Beyond The Gate, activate all statues in order spelt by obscure NPC hint and then cast spell X on yourself and then place amulet in the pedestal to activate the portal, are impractical(player will have to do it each time) and prone to mistakes and misunderstandings.
For special portals/doors/gates/entrances which has to be unlocked with special object/ritual the game should provide a clear step-by-step guide(the simpler the better) or restrict such things to optional one-time side quests. In general these special entrances are better represented by auto-activation, by taking a quest(or simply entering the area) instead of obscure procedures.

2.Areas which replenish/reduce dynamic stats(Hp/mana) or give buffs(temporary status effects).
A.Activated by player action:object enters passive state when player activates it(may reset after x seconds),giving the player the buffs/stat boost indicated by the object.(example:a Fountain of Life)
B. Area-Based effect: Room which replenishes life, or cursed area which drains life. Area-based aura given off by central object that grants buff/debuff are a common element.

3. Traps: Harder levels should have more traps.

A. Traps should have no one-hit-kill mechanics, that is undue burden to player dying/returning each time.

B.Traps should either deactivate after short time or be vulnerable to damage.

C.Traps are designed only to slow down the player: not stop him to study trap mechanics and solve puzzles to advance(this can be used at some quests, but not in general areas).

D.Traps that act as spawner(including trapped chests/doors):
They should have a limit either in time or in number of spawned monsters. Infinite monster stream until you kill the spawner should be reserved to obvious spawner(not hidden from player and obvious as the source of monsters - having a hidden trap/spawner in a different location that creates monsters in current location is unintuitive).

4.Treasures and items:
A.Hidden rooms, passages and secret areas should contain reward for player finding them.
B. Some areas should just have items on the ground(traps and hidden monsters are encouraged).(bait treasure)
C.Chests/Treasure should be located in corners or semi-hidden(not in center of room, not in obvious view, not near entrance/exit). ( Hidden Treasure)
D.Monsters guarding loot/treasure(instead of dropping it) in closed rooms.(Guarded Treasure)
E.Avoid placing too much items/treasure on one location: it should be spread across the level.(Level Clearing vs Finding Treasure). (This prevents farming specific areas if level has non-random structure, but if level is randomly generated a single treasure area is fine)
H. Treasure should be usable/desirable to player: junk items, low-quality trash are going to just waste visual space. (Example:Empty Chests, Hidden Rooms with one potion,vase containing a normal dagger)

5. Monsters:
A.Boss monsters should be located far from entrances.
B.Entrance to a level must be clear of monster spawn points.
C.Monsters locked in closed rooms, gated areas, or otherwise not mobile should be obvious by sight, on minimap or via sounds.(surprises when entering rooms,areas, locations and suddenly seeing many monsters(e.g. diablo 1 rooms) should be avoided).
D.Avoid placing ranged monsters in confined spaces where they can focus fire on the character at once.(this creates too much damage). Example: A long passage ending in a room with 100 archers firing towards the passage.
E.Ranged monsters should not in general be able to overwhelm melee players by the numbers(the above 100 archer pack).
Level design that prevents this will avoid placing ranged monsters near chokepoints(as D passage example), provide alternative entrances to areas and avoid closed room surprises(building mazes with confined spaces).
H.Open Areas: Ranged monsters(notice the pattern: most balance issues involve range+power) should be weaker than melee monsters, have less stats and should not have ranged AoE attacks(exceptions are for Bosses/Uniques).

6.Triangle of balance:Power,Range,Defense
Which combat roles to assign:
Power+Defense=Melee monsters(Hit hard, Hard to Kill(at range),lack range, Speed=amplifies power)
Range=Generic Ranged Monsters(easy to kill, hard to avoid, better AI amplifies power(retreat/hit-and-run))
Range+Defense=Destroyable Traps, Static attackers/towers/turrets.(Long range threat,hard to kill, predictable or slow)
Power+Range=Unique monsters(Hit hard, have range)
Power+Range+Defense=Boss Monsters(Hard to kill,Long-Ranged,Hit hard)

7. Layout:
A.Closed Maze:chaotic buildings with rooms/doors/passages. Lots of confined spaces, secret areas, passages and chokepoints.
Typical example: Diablo1 Church levels.

B.Open Maze:Same as A with some area being open surface(gardens, fields,lakes,streets). Typically used for cities: avoid wide open streets in grid pattern, this is actually a modern meme. Organic city is an open maze with narrow streets, corners, dead-ends and crooked paths.
Typical Example:Assassin Creed cities

C.General Open Field(Overworld/Surface world): Open design:no choke points, allows wide area for maneuvers/tactics. Should be separated by borders and terrain features blocking direct end-to-end movement(rivers, chasms,mountains).
Typical Example: Deserts,Fields, Arenas. Avoid using linear/flat maze borders in this type of level(natural curves and ragged shore-like borders are preferred)

D. Vertical movement levels:Mountains(climbing), Water(diving),Platform jumping; etc.
This is type of level less suitable for fantasy RPG, due different or unusual movement mechanics. Standard Run/Walk is often replaced(underwater levels) and UI changes to accomodate vertical movement.

E. Mixed/Multilevel Maze: a Maze with(usually) narrow passages and multiple terrain levels, often lacks doors/gates.
Can combine A and B, flexible to accommodate rooms, rivers, generally closed to environmental effects(unlike B city-maze).
Typical example:Catacombs, sewers, Crypts, caves.
This is a generic category for all maze-like levels that don't have wide open areas, but also not confined to single building layout(A.Closed maze).

Picking design of level:
Is the level is internal(closed to sun/environment) or external(open area,daylight) or mixed(containing both elements)
Is the level artificial(buildings,cities) or natural(caves,fields,forests). (Aesthetics/design of level)
Is the level confined(narrow passages, obstacles/vegetation, many borders/chokepoints) or open(wide areas, no chokepoints)
Is the level tactical(traps, puzzles, secrets, ambushes ) or strategic(monster packs, terrain advantages, wide open battles)
is the level instanced(challenge for few players, quests, tend to be tactical/smaller) or open to all(wide areas, mass/easy movement, monster packs, ranged attacks)