{
  "version": "1.0",
  "name": "NPC Conversation Demo",
  "author": "TAGMaker",
  "description": "Demonstrates a basic NPC with talk and examine events.",
  "startRoom": "village_square",
  "created": "2026-01-01T00:00:00.000Z",
  "modified": "2026-01-01T00:00:00.000Z",
  "files": [
    {
      "path": "scripts/game_start.taml",
      "content": "script on_game_start\n  goto: village_square\nend"
    },
    {
      "path": "scripts/on_turn_end.taml",
      "content": "script on_turn_end\nend"
    },
    {
      "path": "rooms/village_square.taml",
      "content": "room village_square\n  name: \"Village Square\"\n  narrative: \"You stand in the centre of a small village. A market cross casts a long shadow. An old man sits on a bench nearby, watching you with curious eyes.\"\n  description: \"A cobbled village square. An old man sits on a bench to your left.\"\n  dark: false\nend"
    },
    {
      "path": "npcs/elder.taml",
      "content": "npc elder\n  name: \"Elder Aldric\"\n  description: \"A weathered old man with sharp eyes and a knowing smile.\"\n  location: village_square\n  on examine:\n    print \"Elder Aldric has the look of someone who has seen too much. His cloak is travel-worn but his back is straight.\"\n    print \"He notices your gaze and nods slowly.\"\n  end\n  on talk:\n    if elder_spoken == true\n      print \"\\\"We've already spoken today, friend.\\\"\"\n      print \"He waves a hand vaguely. \\\"Come back tomorrow.\\\"\"\n    else\n      set elder_spoken = true\n      print \"\\\"Ah, a traveller.\\\" The old man's voice is surprisingly strong.\"\n      print \"\\\"I am Aldric — I've lived here sixty years. What brings you to our village?\\\"\"\n      print \"\"\n      print \"He leans forward. \\\"If you seek the old tower, it lies to the north. But I wouldn't go after dark.\\\"\"\n    endif\n  end\nend"
    }
  ],
  "mapRooms": [
    {
      "id": "village_square",
      "name": "Village Square",
      "description": "A cobbled village square.",
      "dark": false,
      "x": 0,
      "y": 0,
      "width": 160,
      "height": 80,
      "color": "#ffffff",
      "roomType": "regular",
      "events": {}
    }
  ],
  "mapExits": [],
  "objects": [],
  "npcs": [
    {
      "id": "elder",
      "name": "Elder Aldric",
      "description": "A weathered old man with sharp eyes and a knowing smile.",
      "location": "village_square",
      "mobile": false,
      "aliases": [
        "aldric",
        "old man",
        "man"
      ],
      "dialogues": [],
      "onEnter": "",
      "onExamine": "print \"Elder Aldric has the look of someone who has seen too much.\"\nprint \"He notices your gaze and nods slowly.\"",
      "onTalk": "if elder_spoken == true\n  print \"\\\"We've already spoken today, friend.\\\"\"\nelse\n  set elder_spoken = true\n  print \"\\\"Ah, a traveller.\\\" The old man's voice is surprisingly strong.\"\n  print \"\\\"I am Aldric. If you seek the old tower, it lies to the north.\\\"\"\nendif",
      "onAttack": "",
      "onDeath": "",
      "onFollow": "",
      "onAutoAttack": "",
      "onTrustChange": "",
      "followPlayer": false,
      "health": 100,
      "combatSide": "neutral",
      "autoFight": false,
      "attackPower": 0,
      "defense": 0,
      "trustLevel": 50,
      "conversationEnabled": false,
      "convGreeting": "",
      "convFarewell": "",
      "convTopics": []
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [
    {
      "id": "npc-start",
      "name": "on_game_start",
      "description": "Runs when the game starts.",
      "body": "goto: village_square"
    },
    {
      "id": "npc-turn",
      "name": "on_turn_end",
      "description": "Runs after every player action.",
      "body": ""
    }
  ]
}
