Skip to content

Make a game’s side characters talk with an AI model

Give each non-player character a short persona and rules, and have a model write their lines in response to what the player does, inside safe limits.

ClaudeCursor Blaze Fish recipe
43
Proof
10/40
Payoff
15/25
Ease
7/20
Cost
11/15
How the score works
Difficulty
Builder
Setup time
3 hr
Monthly cost
$10/mo
What it saves
pages of hand-written dialogue

How to do it

  1. Write a 5-line persona for each character: who they are, what they know, what they want, how they talk, what they never say.
  2. Have your game send the persona, the recent events and the player's line to the model.
  3. Limit replies to two sentences and a mood tag your game can animate.
  4. Cache common lines so you do not pay for the same reply twice.
  5. Add a fallback line for when the model is slow or offline.

The prompt

You are {{npc_name}} in a game. Persona: {{persona}}. You know only: {{knowledge}}. You never reveal: {{secrets}}.
Recent events: {{events}}
The player says: "{{player_line}}"

Reply in character in at most 2 sentences. Return JSON: {"line": "...", "mood": "happy|neutral|angry|scared|sly", "gives_quest": true/false}. Stay family-friendly. Never break character or mention being an AI.

Blaze School prompt pack

The full version adds variations, error handling and a checklist. It is part of Blaze School.

Members get every prompt pack.

See Blaze School plans Log in

Where this comes from

A build we designed. Not yet tested end to end.

Tried this? Tell us how it went and help move its proof level up.

Was this useful?