Game Masters need to be able to adapt quickly. When the players zig when you expect them to zag onto the trail you’ve painstakingly laid out before them, you need to be able to just go with it, rolling their detour into your game story like you’d planned for it all along.
Here are some quick tips for doing just that. (Old pros will probably nod and say to themselves, “Obviously that it how it should be done,” but new GMs will hopefully find some value here.)
Check the List: I love to have a list of random names sitting in front of me when I run a game. This way, when a player asks “What’s the cop’s name?” or “Who owns this building?” I can give them a name without much hesitation. (I then make a note next to the name, like “cop” or “building owner” for my own reference so I don’t forget.) You could also have a list of spells, items, business names… whatever you think you might need to whip up on the fly. And yes, it could be a list that you roll on, but I prefer to randomize the entries ahead of time, and simply work my way down the list.
Ask the Dice: When I do roll, it’s when I need answers that aren’t on any list or directly relevant to the plot — in other words, I don’t know the answer and I don’t really care. These are things like “Does this random elf I just met in the bar know anything about the hermit in the forest?” or “How strong is this Martian ale?” For yes/no questions, I just check if the die roll is even (“Yes!”) or odd (“No!”). For “how much” questions, I check the relative value. (“Oh, high roll. Better not drink too much of this stuff.”) You can even use the same technique to see positive or negative values. (“How does he feel about the queen? Um… on a 1, he hates her, on a 6 he loves her, and anything in between is varying levels of like or dislike.”)
Ask the Players: Finally, you can straight-up ask the players what they expect to happen, or want to accomplish with their unplanned course of action. (“It’s the governor’s private quarters, which you were never supposed to enter. What are you hoping to find here before the guards show up?”) If it’s not game-breaking, you can give them what they want (“Sure, the wax seal is here on his desk…”), but never make it exactly what they want (“But it’s apparently enchanted, because it starts singing as soon as you pick it up”).