The Art of Rulings

This is the most important part of the guide. That is not a setup for a running gag about every part of the guide being the most important part. This is the actual most important part of the guide. Making good rulings is being a good GM. Everything else is being an adventure writer/developer, a job which is sometimes, but not always, packaged together with being a GM. If you pay Paizo or Wizards of the Coast or whoever to be your adventure writer (by buying a published adventure), you are still the GM, because you still make rulings at the table.
So here’s what a ruling is: 1) You describe the environment and anything important in it, and resolve any relevant automatic checks (perception, knowledge, etc.). 2) The players say they’re going to do something, and you determine the PCs intention and approach. 3) You figure out what the mechanics for the action are (mostly what skill to roll and what the DC is), make sure the player understands what the mechanics are, and then you roll the dice. 4) Then you determine the consequences, and if appropriate, you let the results ride. In practice, you need each of these steps to be automatic and reflexive to avoid bogging down the game while you go through a checklist every time the players do anything, and many of them probably are already. If you're missing one, focus on adding it to each and every ruling until it becomes automatic. It shouldn't take too long to get good at them. If you're missing several, focus on one at a time. Trying to add in more than one at a time will just dilute your focus and make the learning process both more frustrating and less effective.

Presenting the Situation

Step one is to present a situation to your players. Describe the environment itself and then anything in that environment that is immediately important, usually meaning important NPCs, monsters, or treasure. Nothing in the scene ever needs to be described with more than two details, and usually one is plenty. This includes the environment the room takes place in. There are probably three dozen individual objects in a tavern that you could attach a detail to while describing the place, but if the players are in the tavern to meet Shady McQuest-ATM, spend one or two details on the tavern and one or two details on Shady and then you’re done. Whole thing shouldn’t take more than two sentences, but you also shouldn’t be skipping the description of the tavern or of Shady. The details should, as much as possible, set the tavern and Shady apart from every other tavern and grizzled old man in the world. If the tavern has hay on the floor and thick wooden tables, well, most taverns do. If the tavern has a shrine to the god of health in one corner and drunks go there to pray for no hangover when they wake, that’s memorable.
If the players have just rolled up to a major hub city for the campaign and you really need to get the description out of the way in a hurry, you might have a much longer description that includes three different shops, four different important factions or major NPCs, and a half-dozen major threats intended to keep the players occupied for the next ten adventures. Most of the time, however, you’ll either be presenting a simple situation, in which case devote one sentence to the room and one sentence to the important monsters/treasure/NPCs in it, or you’ll be providing the players with an update to a situation, in which case you can probably get away with a sentence fragment if you really want to shine in the word economy department. When presenting a situation, your goal should always to make it as short as possible while still describing every important thing in the scene with one and maybe two distinguishing details. When rolling up to that hub city, for example, if you can spread the description around so that only one or two new shops, factions, or major threats are introduced at a time, do so. Players want to interact with your world, not just listen to you describe it, so only resort to long descriptions or narration when you can't find any other way to deliver important information to the PCs by the time they'll need it.
You aren’t finished presenting the situation until you’ve resolved any automatic checks. Passive perception is common knowledge these days, but passive knowledge isn’t. If there’s something in the situation that the players could know more about by rolling a knowledge check, ask them to roll that check immediately after you finish describing the scene. Alternatively, handle it like passive perception and keep all your players’ knowledge scores on your side of the screen. Roll obscurity of the fact in question just like you’d roll stealth for an enemy, with a bonus equal to the fact’s DC-10. So, if a fact would be a DC 15 to recall, you can roll its obscurity at +5 against a player’s passive knowledge.
Every time your players enter a new room in a dungeon, a new building in town, a new leg of their overland journey, or what-have-you, there is a chance they could be required to make a perception (or knowledge) check. The amount of times there will actually be something to perceive or not is somewhere south of 10%, which means players can glean a lot of information just from rolling the check at all. Even if they don’t abuse this metagame information, they’re still tugged a bit out of their character’s perspective because they now know something their character doesn’t. You can solve this online by making hidden checks. On roll20, for example, the command /gmroll will allow you to make checks for stealth or obscurity in secret. If playing in person, you will need to be a bit craftier. Absent-mindedly roll the die every time players enter any new situation. This will happen once every 5-10 minutes or so, but that’s no problem. You don’t actually have to resolve anything. Every time players enter a new room, you roll the die and casually glance down at it. If there’s not actually anything there, you don’t even have to focus on the die long enough to read it. For similar reasons, developing a habit of casually rolling dice just to hear the sound they make is advised.
It's worth remembering, the goal here is not to trick the players, it's to help them get and stay in character by keeping OOC information out of their hands. If your players are any good, they'll make an effort to keep IC and OOC knowledge separate, but they'll probably have a better time if they don't have to.

Players Take Action

Players have exactly two methods of interacting with the situation you’ve presented. They can ask for more information, or they can declare actions. If you’ve done your job right, the players will not need to ask for more information, but in practice players are going to semi-regularly ask questions because no GM is perfect.
When a player declares an action, there are two components supplied by the player, the intention and the approach. The intention is what the player wishes to accomplish with the action, and the approach is how they plan to do it. Make sure both of these things are clear before you start adjudicating anything. Usually it’s pretty straightforward. When a player says they’re going to climb a wall, their intention is to get to the top of the wall and their approach is climbing it. Sometimes it’s murkier. A player trying to shove a guard on a bridge might be trying to intimidate him, move him one square away so he can draw a weapon without provoking an attack of opportunity, or shove him off the edge and insta-gib the sucker.
The approach can also be unclear, for two reasons. Firstly, because sometimes players just describe their intention alone. “I want the king to give us an army so we can go fight the dark lord.” Other times because they suggest a skill in a vacuum, without an approach attached. You say “the king doesn’t think the dark lord is a threat,” and the player says “I roll diplomacy.” In both cases, you need to ask for more information. In the first, you say “okay, how are you going to get the king to give you the army?” And in the second, you say “what exactly are you saying to him?” This is important both for roleplay purposes and because the specific approach of the player might convey important bonuses or penalties to the roll or change what skill is rolled.

GM Supplies Mechanics

The GM supplies mechanics, and just like you need to make sure you understand the player’s intention and approach before rolling any dice, the player needs to understand what mechanics they’re rolling. Sometimes this is because skills have some overlap and the players might be hoping to roll one skill instead of another where both apply (you can measure the strength of a skill list in part by how often it is unclear which skill a certain action calls for). Other times it’s because the player hadn’t realized what the mechanical consequences would be. There may have been a miscommunication and they didn’t realize how tall the building they’re jumping off of was and how much falling damage they’d take. They might not have realized they’d have to roll their terrible arcana skill, not because they thought another skill would apply, but just because they didn’t really think about it at all.
The supplying mechanics stage is also when you figure out how difficult the action is. You might not tell the player what DC they’re looking at if the character has incomplete information on the problem (although if they do have complete information on the problem, by all means supply a DC so the player can put that into context, they’re not a master safe-cracker, they don’t know how hard it is to crack five tumblers, but their character is and does - supplying a DC helps bridge the gap between a character's knowledge and the player's and is good practice for the exact same reason as keeping OOC knowledge away from players as much as is practical). This is especially true if the DC is impossibly high. One thing to keep in mind is that everything, no matter how unlikely, has a DC. Climbing rain into the clouds may require a DC 50 athletics check, but it’s not impossible. It may be impossible for your players, though, who don’t have any skills higher than a +9. This advice is often phrased as “say yes or roll dice,” and we support that notion, albeit with the caveat that certain actions may be unavailable even with a natural 20 to certain characters (if they’re specialized wrong, or if they’re too low level, or etc.).
If a task is impossible at their current skill level, you should let players know in advance, preferably by handing them an exact DC. This accomplishes two things. First, players have something to look forward to for higher levels, when sooner or later they will have the bonuses needed to pull off legendary feats like this. Second, it lets players know it’s impossible in advance, so if they do get a 20 (if they bother rolling at all) they don’t feel like you’ve cheated them.
On the other hand, if an action is trivial, you’re done. Go ahead and skip to the part where you describe the results. If there are no consequences for failure, the action is always trivial. Even if it requires a roll of a 20, if the players have all the time in the world to pick a lock, just go ahead and tell them that yeah, it takes a lot of effort, but eventually they get it. Some games formalize this with take 20 rules (5e has sort of done this - the Automatic Success rule from pg. 329 of the DMG is similar to take 20 rules, but I find that far fewer players are familiar with it and the minor mathematical differences aren't really worth the effort of teaching it), but even if they don’t you should still make the ruling that if nothing stops the players from rerolling until they succeed and success is at all possible, then go ahead and let them succeed immediately (in real time, in game time it may have taken a while).
This is sticking our nose into encounter design (which comes next), but if you want players to be rolling to pick locks, there needs to be consequences for failure and they must make sense. The lock cannot just refuse to ever be picked because the first attempt failed. Maybe the players are on a time limit, only one hour to rescue the princess before Baron von Evil marries her against her will, and each attempt consumes two precious minutes of time. Maybe there’s an ogre inside, and if they pick the lock silently, they can kick the door down and get the drop on him, but if the players fail their check they make a bunch of noise and he wallops them in the face as soon as they open the door (in which case don’t bother with more checks after the first, once you’ve failed the ogre knows you’re there and further failures have no additional consequences). Maybe there’s something chasing them, and the players don’t know how many failures they have until it catches up, but you do, and every time they fail they can hear slavering jaws and clacking claws drawing closer.
If an action is trivial not because anyone could do it, but because the player’s bonus is just so high that they can’t fail, you can skip the roll completely, but you probably shouldn’t. Players usually enjoy rolling a die, adding some monster bonus, and getting the double the DC. It’s also worth considering degrees of success. Sometimes the players can succeed if it’s a DC 15, but they get bennies for every 5 points higher, so it makes a difference whether they get a 30 or a 35. This is why encounters with degrees of success built in are better than ones without, because it means a party whose highest bonus is a +2 and a party whose highest bonus is a +12 both have some real tension in the die roll, but the guys with the +12 still got a real benefit out of having a score so much higher than they could’ve had otherwise. Their decision to take a high DEX character with Stealth trained actually made a difference, but the roll of the die is still relevant.
Just before rolling dice, make sure that both you and the players understand what’s at stake, at least insofar as the players’ characters understand the situation. Usually this isn’t necessary because it’s obvious to everyone, but if the players are about to do something stupid, it’s probably because there’s a misunderstanding. Now is the time to clear it up, not after you’ve rolled the dice and their brains are splattered on some cobblestones.

Describe the Outcome and Let it Ride

Once you know the player’s intention and approach and the player understands what mechanics are involved, you can actually roll some dice. Rolls get made, and the player either succeeds or fails. When describing the outcome, reiterate the approach and describe the consequences. If there are hard numbers in the consequences, split them off into a separate sentence. “You offer the guard an ‘express fee’ on the background check, and he narrows his eyes at you. You’ll take a -2 to any more attempts at persuasion.” Now the player is fully informed. He understands what has happened in the story and what hard math consequences that means to future attempts.
If the players have succeeded, let that success roll forward. The meme for this is “let it ride” and we support it wholeheartedly. Simple probability states that if players have to roll a new stealth check every time they pass a sentry, they are going to get caught and in a hurry, even with a decisive advantage over the guards’ perception. So go ahead and have them roll once and let it ride for a while.
Okay, for how long? When does the ride end? Can an entire dungeon be bypassed with one stealth check which immediately turns the party completely invisible, whereupon they steal back the crown jewels they came for and leave? Obviously this is taking things too far, the quest’s rising action and climax are now shorter than its setup.
A couple of things can end a ride. Firstly, a significant change in DC or situation. If the party snuck past orc sentries, but now they have to sneak past keener-nosed wargs, that can either end the ride or just call for a new perception check against the riding stealth check (letting a check ride against new checks carries the disadvantage that you have to remember the original, though). If the orc camp is attacked by fire giants, the ride might end just because the situation has significantly shifted.
Secondly, if the ride is successful, it’s over. The thing is, exactly what constitutes “success” is hard to pin down. If the party wants to sneak into the ritual room at the heart of the temple of doom, have they succeeded only when arriving at the altar? Are they successful when they sneak past the perimeter into the atrium, and do they need a new check to get from the atrium into the bowels of the temple? The answer is either “yes” or “no” depending entirely on the situation, and blurs the line between rulings, encounter design, and adventure design. If the temple of doom is a dungeon crawl that’s supposed to take up most of the adventure, getting into its heart shouldn’t be a matter of a single check, but if it’s a side mission that popped up spontaneously in play, you might want to let that get resolved with one good roll.
Thirdly, the ride might be ended by an unexpected complication that the players fail to resolve with some other skill. Say your players successfully disguise themselves with a deception check, but there’s a checkpoint which will require checking papers they don’t have. They decide to sneak past the checkpoint with a stealth check. If that succeeds, the ride continues. If that fails, they get caught and the ride is over.
Not every interruption is an unexpected complication, however. Say your players are disguised as guards on a Zhentarim caravan in order to sneak into a Zhentarim-controlled city despite their history of enmity with that particular faction. They make a successful deception check for the disguise, and the caravan is ambushed by goblins halfway through. After the combat, the deception check continues to ride. The goblin attack hasn’t jeopardized their disguise at all, (they’re disguised as guards) so it’s not a complication, unexpected or otherwise, and they haven’t succeeded, either, so the ride’s not over yet.
You might not want to let things ride in the first place in some situations. For example, the players are attempting to pick a series of locks before the guards arrive. If the players can tell that the guards are getting closer or know in advance exactly how many rounds away the guards are, there’s plenty of tension for them even if they’re just making the same roll over and over again. Combat is usually making the same roll over and over again, but the evolving situation still makes things tense. While ordinarily you’d let one lockpicking check ride through the entire set of locks (if not just let them take 20), the countdown clock changes things. Each failure must still have distinct consequences, however. If the countdown is vague to the players, they should be able to estimate how close they are to zero (i.e. “you can hear boots stamping in the distance” followed by “the stamping boots are getting closer” followed by “they’re right around the corner, now,” but not “the stamping boots are getting closer” four times in a row – if you repeat the same or essentially same information over and over, players don’t even have a vague idea of how long it will be before the countdown reaches zero), or else they must know exactly how many rounds they’ve got left on the actual countdown.