If you're anything like me, it can be hard to come up with an NPC on the spot all the time, especially when it is for something you weren't expecting. This is made even worse by the fact that NPCs come up all the time. Maybe a player wants to actually RP out their shopping trip, maybe they want to go punch crooks for information, or maybe they just want to ask someone around the palace for relevant information to a job they're doing. Either way, when put on the spot it can be hard to come up with something interesting, and you - or at least I - can tend to stray towards habits or personal desires. To answer that, I'm trying this out in the hopes it'll help spice up my own games. Perhaps it will work for you as well.
Before We Begin
Before I begin with this, some terms need to be explained before I use them. The key ones here are "helpful", "unhelpful", "cowardly", and "willful".
A helpful NPC is one who is, for whatever reason, willing to help the PCs with their problem. They may still want some form of compensation, but they will generally treat the PCs fairly and give them what they know once compensated - even if compensation is just being asked nicely. If you get a Helpful NPC, then give whole answers to your PCs, not just the bare minimum to be left alone.
An Unhelpful PC on the other hand doesn't want to help the PCs. They will likely require compensation or coercing to get anything out of them, and even then they will just give the bare minimum. Your PCs probably won't like the unhelpful types, but they are out there.
Next we have the Cowardly NPC. This is primarily a subset of the Unhelpful NPC - as it probably won't come up with a helpful one - and it means that the NPC is basically a coward. If the PCs use strong arm tactics, this NPC will likely break under the pressure and talk. In fact, the PCs may be better off strong arming then paying, since cowards are also often opportunists and now they know the PCs have money....
A Willful NPC on the other hand shouldn't be handled with intimidation and violence. Instead of giving up the information, they will simply wall up. At which point the PCs may get nothing, or may have to work harder in order to find proper compensation to get what the NPC has to know. Payment is probably the best way to go here, or at least trickery. But direct threats won't work.
Finally, as a disclaimer, a randomly generated NPC should never be the only chance the PCs have of finding what they want. It's going to suck if you forget this, and roll an Unhelpful Willful NPC who refuses to bow under strong arm tactics and makes the PCs fail the entire adventure. This is meant to add spice and variety to the game, and to make it so not every NPC is helpful and knows everything needed, nor unhelpful and has to be tortured to find out their name.
Quick and Simple
There are two methods I'm going to use here, the first is 'Quick and Simple' and the other is 'More In Depth'. Quick and Simple can be done with a coin, any die (just go high vs. low or odds vs. evens), or anything else that has a 50/50 chance of happening. Unfortunately, 'More In Depth' is still in the works, I will post it later as an alternative to this. It's initial designs made it too big to have in a combined post.
For the purposes of this, I'm going to assume you are using a coin. It goes like this:
Question 1: Is the NPC Helpful or Unhelful?
Question 2a: If Helpful, will the NPC help for free?
Question 2b: If Unhelpful, are they Willful or Cowardly?
Question 3: How much does the NPC know?
Heads: Fount of knowledge, able to answer a lot of PC questions on the subject
Tails: Can point the PCs in the right direction
Question 4: If Willful and threatened, how will the NPC react?
Heads: Lie/Deceive the party to get away
Tails: Fight/Flee (if not possible, or caught: silent treatment)
Question 5: If Cowardly and Paid, how will the NPC react?
Heads: Take their money and run
Tails: Try to get more money from the PCs
If you get Helpful and Free, then you are done. Things get a bit more varied afterwards depending on your results. I've tried this a couple times in games and it has worked well to add some variety. PCs were pleasantly surprised to find a particularly helpful and knowledgeable peasant around when they needed one, and amused at the antics of a cowardly person who didn't actually know much of anything.
If you try it, let me know how it goes. If you have suggestions for fixing it up, then please comment.