Skip to content

Godot Server Split - NPC Pipeline

Part of NPCs World Verbs Rewards and Living World


Godot responsibilities

  • Display NPC · interaction trigger · dialogue · activity UI
  • Animate world objects · completion effects · gift/drop moment (from server)
  • Unlock local collision/path from world state returned by server

Godot must NOT decide

  • mastery · final correctness · random drop result
  • permanent progression · destination unlocks

Those come from server / database.


Server responsibilities

  • Select or validate activity/session · select words · verify answers
  • Save attempts · update mastery · session completion
  • Update NPC relationship · world state
  • Determine deterministic rewards · roll optional drops once
  • Update inventory · return updated state to Godot

Served job payload (example)

served_npc_job:
  job_instance_id: job_123
  npc: { id: merchant_mara, display_name: Mara }
  story:
    opening: "Captain! Good timing. The rain washed these labels clean."
    request: "Can you help me write them again?"
    success: "That is much better. The delivery can go out now."
  activity:
    type: spelling
    rounds: 3
    words: [fish, rope, lamp]
  world:
    verb: write
    target_objects: [wet_label_01, wet_label_02, wet_label_03]
    completion_effect: [labels_become_readable, crates_open]
  rewards:
    deterministic: []
    optional_drop_possible: true

Example flows

First island (merchant)

  1. Child arrives — boat_available: false
  2. Talk to merchant → required job merchant_repair_box_labels
  3. Activity: missing_letter · 3 rounds · repair crate labels
  4. Save attempts + completion + relationship + world objects
  5. World: crates repaired · boat_available: true
  6. Merchant dialogue + boat at dock + path opens

Lighthouse

  • Activity: reading/spelling · verb Light/Restore
  • Completion: lantern on · map fog clears · Whale Bay revealed
  • Reward: navigation (not item first)
  • Later optional drop: Old Lighthouse Photo ~8%

Whale Bay

  • Activity: Reading Boss / Read Aloud · verb Guide/Speak
  • Each success: water rises · whale moves · rocks clear
  • Deterministic: crew friendship / clue · Optional: Rare Shell ~10%