@ksjp17
The way I handled NPCs was "What would the main character remember them saying?"
After all, getting through all of the motions of greetings, introductions, etc would just be asinine. So instead, I tend to pretend that this NPC has opened up a bit to the player and now wants to share something. Who is this NPC and what would they share?
This would be an example of why someone might warn you about taking some poison cures. Although, I'd handle that dialogue differently and wouldn't use the example you shared.
Sometimes it's silly, often times it's just noise that is moderately relevant, and once in a while it's quite pertinent.
@Julien
The exercise I walk myself through is this:
Problem: What does this NPC have to say and should he ever say anything different?
Where is this NPC at? Would it make sense to make an observation about the surroundings or not?
Does this NPC have a family? What's going on with that family? Anything they'd share?
What have some other NPCs already said? Could this NPC give their own spin on it?
What's the big news/plot line going on? Would it make sense for this NPC to speak on it?
Then I make a decision on whether it should be funny, insightful, charming, mean, etc.
This process works for me. If it doesn't work for you, another super simple thing to think about is this:
At the grocery store / market, what are some of the oddball responses / conversations you hear between the cashier and a customer?
That sort of senseless banter is exactly how some NPC dialogue should come across.
It's just small talk
