[MENTION=2067]I'm A Banana[/MENTION]
When I think of well-done "random encounters" (whether homebrew or published), I think of tables that incorporate all three of what you're talking about...and more. Each individual entry may lean toward one more than the other, but generally I expect a random encounter table to mix it up.
The three functions of random encounters you called out are:
- Show what lives there / provide evocative flavor to a journey
- Provide a significant challenge / monster lair / side quest
- Impose resource attrition on the party
Those are all great and have a place and time when they make sense to use.
I'd also expand your list to include:
- Change the stakes/parameters of a main quest
- Provide an opportunity to gain a resource / ally / advantage
- Create an opportunity for learning about the world
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Here are some examples from an adventure I'm writing, where there's a 2d10 encounter table for the Haunted Lands, a stretch of ghostly desert occupied by ruins and bandits...
Show what lives there / provide evocative flavor to a journey
Giant Scorpions said:
1d4 aggressive giant scorpions (CR 3), with signs of having venom extracted from their stingers by a poisoner at one time.
This one also provokes a question: Who has been harvesting giant scorpion venom? When they track down an assassin using giant scorpion venom they'll know where he harvests his poison from, making a potential connection they might be able to exploit to their advantage.
Provide a significant challenge / monster lair / side quest
Quicksand Predator said:
A vast stretch of quicksand fills a ravine (see the DMG pg. 110). Either a purple worm (CR 15) or an adult vishap lurks in the sands nearby waiting to strike those falling prey to the quicksand. During any fighting against the creature, some of the sands may collapse into one of the various ruins or tombs of the Haunted Lands (see the "Ruins" section in this chapter).
This one is a deadly challenge, though it might be made more surmountable by information/resources the PCs gain during the main story to help deter purple worms/vishaps. Additionally, it provides a chance to introduce a new area to explore.
Impose resource attrition on the party
Camp Scavengers said:
2d4 giant hyenas (CR 1) or 2d4 debbi harass the characters’ campsite, attempting to scatter mounts, steal food, and ruin supplies. If they are caught and given to clan al-Dabae al’Aswad, the gnolls will look favorably on the PCs. Alternately, hyenas might be tracked back to the gnolls at night.
This one is straight up attacking their resources, but it also provides an opportunity for a turnaround for players who are paying attention to the adventure's story.
Change the stakes/parameters of a main quest
Majnun said:
Majnun is a janni* (CR 4) who was exiled from his kind for attempting to poison Amir Heidar Qan and stealing the Amir’s prized treasure. While it’s true Majnun stole the treasure which he indeed carries on his person, he was framed for the failed assassination attempt. He travels the Haunted Lands disguised as a mystic astride a giant white camel, helping out those lost in the desert and offering cryptic guidance. If Majnun is turned over to the Jann of the Haunted Lands in the Great Anvil, the jann will generously reward those who captured the exile.
This one can change how the PCs go about pursuing a part of the main quest — finding Amir Heidar Qan — depending on whether or not they believe/trust Majnun.
Provide an opportunity to gain a resource / ally / advantage
Gnolls of al-Dabae al’Aswad said:
2d6 gnolls (CR 1/2) led by a gnoll pack lord (CR 2), riding an equal number of giant hyenas (CR 1), and accompanied by twice their number in trained hyenas (CR 0). They belong to the clan al-Dabae al’Aswad (Gnolls of the Black Hyena), which long ago tempered the rage afflicting gnoll-kind by adopting the Enlightened Faith of Zakhara. Most of the gnolls are thus chaotic neutral instead of chaotic evil. However, the icon of their faith - a spear said to have broken against the Loregiver’s side - was stolen by a thief in Konigheim and unless it’s found the gnolls risk descending into savagery.
This one provides an opportunity to ally with the gnolls, but also foreshadows consequences if the PCs don't undertake the side quest to restore the sacred broken spear to them.
Create an opportunity for learning about the world
Whispering Cave said:
A cave with a trickle of fresh water that echoes with disembodied voices whispering in forgotten tongues. A character meditating for an hour in the cave makes a DC 10 Wisdom saving throw. On a success they gain Inspiration and remove a level of exhaustion. On a failure they suffer long-term madness (see DMG pg. 280). Additionally, a cleric or paladin may expend a use of Channel Divinity while meditating to understand a bit of what the restless spirits are whispering, learning a clue (see pg. ##) about the BBEG.
This one I had to be a bit vague on because I'm writing something I intend to publish, but this one presents a question that the players can answer during their adventures: Why are there whispering restless spirits in the cave? Also, it provides an opportunity to gain a bit of lore that may help them down the road.