I have an old resource thread with good examples of NPC lines, free to copy and edit.
https://forums.rpgmakerweb.com/index.php?threads/failivrins-freesources.78679/#post-757884
These lines were intended to be generic so anyone can use them, but with practice you can make NPCs even more colorful and interesting. Like
@Milennin said, NPCs can give helpful hints or offer sidequests. For a developer, the real challenge is making NPCs with personality and depth.
First, you have to focus on the setting. Unfortunately, many developers treat villages as nothing but temporary stopovers for the heroes to recover and re-equip. NPCs in these settings never do anything but comment on the weather and give the hero advice in the form of “press X to not die.” To make compelling NPCs, here is the first important principle:
The village must have a compelling reason to exist.
Don’t overthink it. A compelling reason to exist can be very simple and modest. One very common example involves mithril/adamant. Let’s say the best armor in your game is part of an “adamant” series. Where does it come from? Show us the village where they mine the adamant ore. And while you’re at it, take that cave dungeon you’ve been working on and put it in the mountains outside the village. Now you have a meaningful setting, and the NPCs in the village have something to talk about besides the weather.
NPCs should talk mainly about their own concerns, rather than the heroes’ concerns.
After all, the heroes are basically tourists. Mining adamant ore and making adamant armor is a way of life for these people—and it’s their source of pride. Maybe it's a source of fear, since monsters have invaded the mines and some villagers have gone missing. Maybe they want to praise a friend who is the best smith in town, or share their jealousy about a rival. Whatever the case, they want to talk about adamant. Finally…
The heroes should get a unique reward for visiting the village and interacting with NPCs.
Some games throw the rewards in your face when NPCs give you rare items out of the goodness of their hearts. In most cases, this is not necessary. The player already receives two rewards for visiting the adamant mining village. First is a concrete reward: The heroes can buy full sets of the highest quality armor. Second is an aesthetic reward: “Adamant Armor” is no longer just a fancy name in the item list. The player’s vision of the world has expanded, and they will remember that village when they wear the armor (which, among other things, creates a real sense of fighting to protect the people of the world).
Some other ideas…
Behavior animations are gold. Unfortunately, they can be difficult and time-consuming for us mortals without artistic expertise. Think of creative work-arounds, and as always,
Show, don’t tell.
Bad example: The player enters a mill. A bearded man who looks like all the other bearded men in town is standing next to some sacks of flour. When the player speaks to him, a tag appears above his head saying “Miller.”
Good example: The player approaches a mill. Before the player enters, a dirty man in overalls with no shirt bursts out of the door and pushes a sack of flour to a cart waiting in the yard. Then he returns to the mill and gets another sack of flour. The man repeats this behavior on loop, and if the player wants to talk to him, they have to catch him while he’s moving in and out.
The good example takes only a light dash of visual artistry, a little bit of eventing, and a bit of creativity, but the effect is an NPC that is much more life-like and compelling.
Finally, I would mention a particular kind of NPC that works great in almost any game:
The Recurring NPC.
There are two common kinds. The first is a Traveling Merchant who is off on her own adventure but happens to share the same route as the heroes. The player learns to recognize this NPC and, knowing she carries a good stock of cheap potions, is always relieved to stumble across her in the middle of the Deadly Swamp or Castle Dungeon. At each encounter, the merchant briefly narrates a bit of her own adventures (such as why she got thrown into the Castle Dungeon), then gets right down to business. The Traveling Merchant NPC is a great way to add color and flare to the relatively mundane and repetitive act of buying and selling.
The second kind of Recurring NPC is the Weapons Master. He is a quixotic character touring the world for the sake of meeting new challengers. Usually, the player has to bet money to fight him, in return for a larger sum of money or a rare item if the player wins. The Weapons Master keeps things interesting by constantly changing the rules of combat. He fights with a different weapon each time and shows off a good strategy that the player might be able to mimic. Sometimes he sets conditions; for example, only one hero can fight him at a time, or MP and HP are reversed during the battle. Fighting the Weapons Master is never necessary for game progression, but it’s a fun diversion and a challenging way to engage players in the game’s battle system.
I’m sure there’s more to be said for this topic. I look forward to new replies.