An inhabited dungeon is an environment in and of itself. The creatures that live there need to eat, drink, breathe and sleep just as the creatures of the forest or the plains do. Predators need prey.
Creatures living in the dungeon need to be able to get around. Locked doors, or even doors that require hands to open, can prevent creatures from getting to food or water.
Consider these factors when designing a dungeon you want the players to believe in. If the environment doesn’t have some logic behind it, the PCs can’t make decisions based on reasoning while adventuring there. For example, upon finding a pool of fresh water in the dungeon, a character should be able to make the assumption that many of the creatures inhabiting the place come to that spot often. Thus, the PCs could wait in ambush for a particular creature that they’re after. Bits of faulty dungeon logic, such as all the doors in a dungeon being locked when the dungeon is home to many creatures, destroy any chance of verisimilitude.
Not everything that lives in a dungeon is a monster. Other creatures inhabit these unlit labyrinths as well.
Creepy Crawlers: Insects, spiders, grubs and worms of all kinds live in the dark recesses of dungeons. They don’t present a real threat, but they do provide food for predators and scavengers in the dungeon — which in turn pose a threat to adventurers.
Rats: Rats make up an important part of any dungeon ecology. These omnivorous rodents serve as the staple for most dungeon predators and scavengers. In huge swarms, they become a threat themselves.
Bats: Like rats, bats are found throughout any dungeon with access to outside air. Although normal bats aren’t dangerous, a swarm of bats can obscure vision and hamper the actions of dungeon delvers — particularly spellcasting.
Other Animals: Small creatures such as badgers and ferrets or large omnivores such as bears and apes may take to a full-time (or almost full-time) subterranean existence in a world filled with dungeons and caverns. Predatory animals such as tigers, wolves and snakes follow their prey down into the dungeons and remain, becoming a part of the ecology. Deep dungeon delvers have brought back stories of colossal caverns far underground with flocks of birds flying about. And of course underground streams, lakes and even seas teem with all sorts of fish, water mammals and aquatic reptiles.
Over the generations, dungeon animals have developed darkvision in order to survive. They have adapted to their environment, and now they thrive in the dark confines of caves and passages. They feed on mold, fungi or each other. Because of the lack of sunlight, many species have become entirely white, while others have evolved a black colouration to hide in the darkness.
In a dungeon’s damp, dark recesses, moulds and fungi thrive. While some plants and fungi are monsters and other slime, mould and fungus is just normal, innocuous stuff, a few varieties are dangerous dungeon encounters. For purposes of spells and other special effects, all slimes, moulds and fungi are treated as plants. Like traps, dangerous slimes and moulds have CRs, and characters earn XP for encountering them.
A form of glistening organic sludge coats almost anything that remains in the damp and dark for too long. This kind of slime, though it might be repulsive, is not dangerous.
Moulds and fungi flourish in dark, cool, damp places. While some are as inoffensive as the normal dungeon slime, others are quite dangerous. Mushrooms, puffballs, yeasts, mildew, and other sorts of bulbous, fibrous, or flat patches of fungi can be found throughout most dungeons. They are usually inoffensive, and some are even edible (though most are unappealing or odd-tasting).
Green Slime (CR 4): This dungeon peril is a dangerous variety of normal slime. Green slime devours flesh and organic materials on contact and is even capable of dissolving metal. Bright green, wet, and sticky, it clings to walls, floors and ceilings in patches, reproducing as it consumes organic matter. It drops from walls and ceilings when it detects movement (and possible food) below.
A single 5-foot square of green slime deals 1d6 points of Constitution damage per round while it devours flesh. On the first round of contact, the slime can be scraped off a creature (most likely destroying the scraping device), but after that it must be frozen, burned or cut away (dealing damage to the victim as well). Anything that deals cold or fire damage, sunlight, or a remove disease spell destroys a patch of green slime. Against wood or metal, green slime deals 2d6 points of damage per round, ignoring metal’s hardness but not that of wood. It does not harm stone.
Dwarves consider green slime to be one of the worst hazards of mining and underground construction. They have their own ways of burning it out of infested areas, methods that they say are thorough. “If you don’t do it proper, the stuff comes right back”, they claim.
Yellow Mould (CR 6): If disturbed, a 5-foot square of this mould bursts forth with a cloud of poisonous spores. All within 10 feet of the mould must make a DC 15 Fortitude save or take 1d6 points of Constitution damage. Another DC 15 Fortitude save is required 1 minute later—even by those who succeeded on the first save — to avoid taking 2d6 points of Constitution damage. Fire destroys yellow mould, and sunlight renders it dormant.
Brown Mould (CR 2): Brown mould feeds on warmth, drawing heat from anything around it. It normally comes in patches 5 feet in diameter, and the temperature is always cold in a 30-foot radius around it. Living creatures within 5 feet of it take 3d6 points of non-lethal cold damage. Fire brought within 5 feet of brown mould causes it to instantly double in size. Cold damage, such as from a cone of cold, instantly destroys it.
Phosphorescent Fungus (No CR): This strange underground fungus grows in clumps that look almost like stunted shrubbery. Drow elves cultivate it for food and light. It gives off a soft violet glow that illuminates underground caverns and passages as well as a candle does. Rare patches of fungus illuminate as well as a torch does.
While the adventurers are exploring the dungeon, the light of their lanterns attracts the attention of hungry dire weasels, who come to see if they can catch some soft and juicy things to eat. On another delve, a carrion crawler finds them and follows them, out of sight. When it hears a fight, it scrambles up from behind and tries to make off with a character who has fallen in combat. On yet another expedition, the party meets another party of adventurers. If the two groups can work together, they can exchange vital information, trade valuable items, and possibly even work together. The meeting, however, could just as easily turn into a nasty fight. Wandering monsters such as these add unpredictability and action to dungeon adventures.
As the adventurers explore a dungeon, make rolls to see if they encounter wandering monsters. Use wandering monster rolls to add an unpredictable element to a dungeon delve, to encourage characters to keep moving, and to put a price on being noisy. The exact formula for when you roll for wandering monsters is up to you. Generally, the chance is 10% for a wandering monster to show up when certain conditions are met.
When a Certain Amount of Time Has Passed: Making one roll per hour is typical. You can roll more often in heavily populated areas, up to as often as once every 10 minutes. If you’re not already tracking time in the dungeon and you don’t want to start, roll for wandering monsters when the characters are doing anything that takes a long time (such as taking 20 while searching a room for secret doors) instead of keeping track of the clock.
When Characters Make Noise: Breaking a door or having a typical fight counts as making noise. Breaking a door and then having a fight right away counts as one instance of noise, so it’s one roll. Getting into a loud argument, knocking over a statue, and running up and down stairs in full kit at top speed are other actions that might call for a wandering monster roll.
In High-Traffic Areas: Deciding what constitutes a high-traffic area is up to you. You can roll every time the characters enter a new corridor, provided such a corridor makes it easy for creatures to get to and fro and thus sees a lot of traffic. Other areas, such as pools of fresh water, might also attract many creatures.
In Cleared-Out Areas: If the PCs have cleared out part of the dungeon, then you can roll for wandering monsters as they travel through a previously cleared area to an uncleared area. After all, creatures spread out to fill a vacuum, claiming abandoned territory as their own.
When Leaving the Dungeon: While you have every right to roll for wandering monsters as the party is leaving the dungeon, you might decide not to. The characters generally make good time as they head for the surface, and they’re usually taking a route they have used on their way in, so it’s reasonable for the chance for wandering monsters to go down. Also, if the players know that the characters might face an extra encounter on the way home, they tend to break off their exploration when they feel they can still handle another encounter, causing them to act more cautiously than they want to or than you may want them to.
In a sprawling, random dungeon, you can simply use the random dungeon encounter tables to determine which monsters wander by. Reroll if the result would be a stationary creature or one unlikely to wander. In a smaller or special dungeon, make your own random encounter tables.
The entries on a customized wandering monster table can indicate individual monsters or groups of monsters rather than kinds of monsters. For example, the entry “Large monstrous scorpion” could mean a particular scorpion that lives in this dungeon rather than a random scorpion from an indefinitely large population of similar scorpions. That way, once the characters have killed that scorpion, they can’t encounter it again. Creatures on a customized table could also have lairs keyed on the dungeon map, so that adventurers who kill a creature while it’s wandering would later find its lair empty. Similarly, those who kill it in its lair would never encounter it wandering.
In the same way that you can invent the denizens of specific dungeon rooms rather than determining them randomly, you can invent specific wandering monsters. These could include monsters that escaped from the PCs before (or that the PCs escaped from). Indeed, you can replace the idea of the wandering monster with a random event instead. The characters could hear fighting in the distance, stumble across random clues to the dungeon’s past, or become subject to strange, fluctuating magical auras in place of encountering a wandering monster.
Overall, wandering monsters don’t have as much treasure as monsters encountered in their lairs. When NPCs are encountered as wandering monsters, their gear is their treasure. Intelligent wandering monsters might (50% chance) have a treasure whose level is equal to the dungeon level. Unintelligent monsters don’t have treasure. A dire weasel’s den might be littered with the valuables of creatures it has killed, but it doesn’t carry that stuff around with it. Since wandering monsters have less treasure than monsters in their lairs or homes, characters typically try to minimize their encounters with wandering monsters.
Source: Dungeon Master’s Guide (Page 76)