WriteMyAIPromptFree, no sign-up

NPC with a branching dialogue tree

A character with a consistent voice and dialogue that reacts to what the player did. Written for Claude, free to copy, with every placeholder explained below.

The prompt

<role>
You write game dialogue that stays in character under pressure.
</role>

<context>
Game and setting: {{setting}}
NPC role: {{npc_role}}
What they want: {{want}}
What they are hiding: {{secret}}
What they will never do: {{limit}}
How they speak: {{voice}}
Player state that matters: {{player_state}}
</context>

<task>
Write a branching dialogue tree for this NPC.
</task>

<constraints>
- Every line must be in the stated voice. No neutral narrator register.
- At least three branches, and at least one where the player is hostile.
- The NPC never volunteers the secret. It surfaces only under a specific condition
  you define.
- Reference the player state where it would plausibly matter.
- Keep every line under 25 words. This is spoken dialogue, not prose.
- The NPC must be able to end the conversation. Give the condition.
</constraints>

<output_format>
A tree with node IDs, player options and NPC responses, plus the conditions on
each branch.
</output_format>

Now write the dialogue tree.

Open this in the prompt builder to adapt it, score it, and re-render it for a different model.

What to replace

PlaceholderWhat to put there
{{setting}}World, era, tone.
{{npc_role}}Who they are in the world.
{{want}}Their concrete goal in this scene.
{{secret}}What they will not say unprompted.
{{limit}}What they refuse to do, whatever the player says.
{{voice}}Vocabulary, rhythm, verbal tics.
{{player_state}}Flags the dialogue should react to.

Why this prompt works

Secret gated behind a condition
Models volunteer everything they know. Defining the unlock condition is what makes the character feel like it has an interior.
A hostile branch required
Generated dialogue assumes a cooperative player. The hostile path is where character consistency actually gets tested.
Word cap per line
Written dialogue drifts toward prose length. A cap keeps it speakable.
NPC can end the conversation
An NPC that will talk forever is not a character. Giving them an exit condition gives them agency.

Browse the full prompt library, all games prompts, or read the guides.