Why it is written this way
When asking an AI to write NPC dialogue without constraints, every villager sounds identical. From the blacksmith to the innkeeper, they all say: "Greetings, traveler. How may I help you?" This happens because the AI defaults to an averaged stereotype of a generic "game NPC" rather than a distinct individual.
The Role section gives the AI a clear quality standard. The phrase "know who is speaking without seeing their name" serves as an internal evaluation rule, forcing the AI to differentiate voice styles from the start. Asking for three lines of speech habits before the dialogue serves the same purpose: once word choices, sentence rhythm, and attitude are locked in, the voice remains consistent across all five situations.
The Example block does the heaviest lifting. It demonstrates the arrow format, the single-line consequence notation, and the natural conversational cadence without requiring pages of formatting rules. Showing the pattern ensures clean, ready-to-use output that easily fits into game design spreadsheets.
The Format constraint requiring five specific scenarios prevents a common development blindspot: creators often write introductions easily but forget post-quest or disappointed states. Finally, the constraint to make at least one option simply end the dialogue prevents "fake branches" where every response unnaturally awards a reward.
Compared with a bad example
Write some game NPC dialogue for an innkeeper in a fantasy world.
This produces five generic lines starting with "Welcome, weary traveler!" All lines share the exact same voice, offer no player choices, and cannot be directly imported into a game dialogue tree. It lacks distinguishing character traits, meaning every NPC generated this way will sound like clones. Crucial late-state dialogue (quest completion, disappointment) is also missing, forcing you to re-prompt multiple times per character.
Variations
Differentiating Existing Dialogue Tones
Below is existing dialogue I wrote for {{NPC profession}}. Instead of rewriting everything from scratch, evaluate whether these lines sound truly distinct to this character. Identify any lines that sound generic enough for any other NPC to say, and rewrite only those lines to fit this character's unique voice. The game atmosphere is {{game atmosphere}}. Provide a one-line explanation for each revision.
Use this when you already have dialogue drafts but they feel too homogeneous. It pinpoints and polishes only the generic lines instead of rewriting everything.
Vendor & Functional Shop Dialogue
{{NPC profession}} also functions as a shopkeeper. The game atmosphere is {{game atmosphere}}. Write functional shop dialogue for the following scenarios: Purchasing an item / Not enough money / Selling items / Trying to buy an unavailable item / Closing the shop. For each scenario, provide 1 standard line and 1 shorter alternative line for when the action is repeated.
Functional shop dialogue is heard dozens of times, making shorter secondary barks essential to prevent player fatigue.
Related prompts
Last updated 2026-09-02 · Found a mistake? Let us know