Skip to content

NPC lore: creator-declared NPC-to-NPC relationships, referenced in context #56

Description

@harshithmullapudi

What

Creators declare relationships between NPCs in their town — Diana is Alice's mentor; Bob resents Diana; Sera used to date Vinny. NPCs reference these relationships when contextually relevant or when the player asks — never as unprompted gossip about the player.

Why

  • Towns feel like living worlds with history, not disconnected characters in the same folder.
  • Multi-NPC scenes (group chat) gain depth: NPCs can naturally comment on each other's positions.
  • Creators get expressive power without writing prompt boilerplate per NPC.
  • Preserves the cozy vibe — avoids the uncanny "small-town surveillance" risk of NPCs gossiping about the player.

Explicit non-goals

  • No proactive gossip about the player. NPCs do not say "I heard you told Iris about X."
  • No memory-of-group-chat leakage across NPCs by default. NPCs know their declared relationships; they don't secretly know every conversation you had elsewhere.

Rough scope

  • New model: `NpcRelation` (fromNpcId, toNpcId, relationType, description).

  • MDX authoring: allow a `relations:` frontmatter block, e.g.

    ```yaml
    relations:
    - to: alice
    type: mentor
    note: "You mentored Alice through her first startup exit"
    - to: bob
    type: rival
    note: "Bob still resents you for scooping his cafe idea"
    ```

  • Prompt injection: when an NPC is asked about another NPC (or when another NPC is present in group chat), inject the relevant relation into the system prompt as one line.

  • Guardrails: cap injected relations per turn (e.g., top-3 by recency / relevance) to prevent token bloat.

Dependencies

  • None. Ships independently of Passport / Friends.

Notes

  • Consider surfacing declared relations in the town editor as a small graph diagram — later, not v1.
  • Keep the tone opt-in and creator-authored. Auto-inferred relations tempt uncanny behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions