{
  "version": "1.1",
  "name": "Living Dungeon / Changing Map System",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "Taking an idol awakens the dungeon. The old exit closes, a new escape route opens, an existing guardian moves into the chamber and the room description changes. Dropping the idol cannot undo the event.",
  "playerAppearance": {
    "version": 1,
    "layout": "modern",
    "font": "sans",
    "colorScheme": "light",
    "textSize": 18,
    "lineHeight": 1.6,
    "readingWidth": 80,
    "quietReading": false,
    "mapMode": "discovered",
    "panels": {
      "inventory": true,
      "map": true,
      "objectives": true,
      "status": true,
      "words": true
    },
    "picture": {
      "visible": true,
      "fit": "contain",
      "focalX": 50,
      "focalY": 50
    },
    "commands": {
      "visible": true,
      "standard": [
        "look",
        "search",
        "inventory",
        "help"
      ],
      "custom": []
    },
    "words": []
  },
  "created": "2026-11-01T00:00:00.000Z",
  "modified": "2026-11-01T00:00:00.000Z",
  "files": [
    {
      "path": "rooms/lesson_room.taml",
      "content": "room lesson_room\n  blocked north: \"There is no northern passage while the dungeon sleeps.\"\n  exit north: lesson_escape when: lesson_awake\n  blocked west: \"The old passage has sealed. Use the new northern route.\"\n  exit west: lesson_old when: lesson_old_open\n  name: \"Sleeping Idol Chamber\"\n  description: \"The old exit is west. Take the stone idol to awaken the dungeon and reveal a different route.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_dungeon_prose\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_awake\\\",\\\"value\\\":true},\\\"then\\\":\\\"The walls shift. The western exit is sealed and a new northern passage is open.\\\",\\\"otherwise\\\":\\\"A silent chamber holds a stone idol. The western exit is open.\\\"}]}\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_old.taml",
      "content": "room lesson_old\n  exit east: lesson_room\n  name: \"Old Exit\"\n  description: \"The idol chamber is east.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_escape.taml",
      "content": "room lesson_escape\n  exit south: lesson_room\n  name: \"Awakened Passage\"\n  description: \"The idol chamber is south.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_idol.taml",
      "content": "object lesson_idol\n  name: \"stone idol\"\n  description: \"Taking this idol changes the dungeon permanently.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "npcs/lesson_guardian.taml",
      "content": "npc lesson_guardian\n  name: \"stone guardian\"\n  description: \"The awakened guardian watches the changed chamber.\"\n  location: nowhere\n  mobile: true\n  follow: false\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"lesson guardian looks at you in silence.\"\n  end\nend"
    },
    {
      "path": "objects/sample_field_journal.taml",
      "content": "object sample_field_journal\n  name: \"field journal\"\n  description: \"Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.\"\n  location: inventory\n  aliases: [\"journal\"]\n  takeable: true\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    }
  ],
  "story": {
    "version": 1,
    "states": [
      {
        "id": "lesson_awake",
        "name": "awake",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_old_open",
        "name": "old open",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": true
      }
    ],
    "rules": [
      {
        "id": "lesson_wake",
        "name": "wake",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_idol",
          "event": "take"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_awake",
            "value": true
          },
          {
            "kind": "state",
            "target": "lesson_old_open",
            "value": false
          },
          {
            "kind": "move_npc",
            "target": "lesson_guardian",
            "destination": "lesson_room"
          },
          {
            "kind": "message",
            "value": "The idol rises from its plinth. The dungeon awakens."
          }
        ],
        "otherwise": "",
        "once": true
      },
      {
        "id": "sample_finish",
        "name": "Record the completed expedition",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "sample_field_journal",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_awake",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The dungeon changed its map and moved the existing guardian. You record the result in your field journal. Your expedition is complete."
          },
          {
            "kind": "score",
            "value": 100
          },
          {
            "kind": "end",
            "value": "Your expedition is complete."
          }
        ],
        "otherwise": "Your expedition is not complete yet. Follow the room clues, then use the field journal to record your success.",
        "once": true
      }
    ]
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "a10-living-dungeon-changing-map-system",
        "choices": {
          "room": {
            "existing": "",
            "name": "Sleeping Idol Chamber",
            "description": "The old exit is west. Take the stone idol to awaken the dungeon and reveal a different route."
          },
          "old": {
            "existing": "",
            "name": "Old Exit",
            "description": "The idol chamber is east."
          },
          "escape": {
            "existing": "",
            "name": "Awakened Passage",
            "description": "The idol chamber is south."
          },
          "idol": {
            "existing": "",
            "name": "stone idol",
            "description": "Taking this idol changes the dungeon permanently."
          },
          "guardian": {
            "existing": "",
            "name": "stone guardian",
            "description": "The awakened guardian watches the changed chamber."
          }
        },
        "values": {
          "before": "A silent chamber holds a stone idol. The western exit is open.",
          "after": "The walls shift. The western exit is sealed and a new northern passage is open.",
          "wake": "The idol rises from its plinth. The dungeon awakens.",
          "blocked": "The old passage has sealed. Use the new northern route."
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_room.taml",
          "after": {
            "path": "rooms/lesson_room.taml",
            "name": "lesson_room.taml",
            "content": "room lesson_room\n  blocked north: \"There is no northern passage while the dungeon sleeps.\"\n  exit north: lesson_escape when: lesson_awake\n  blocked west: \"The old passage has sealed. Use the new northern route.\"\n  exit west: lesson_old when: lesson_old_open\n  name: \"Sleeping Idol Chamber\"\n  description: \"The old exit is west. Take the stone idol to awaken the dungeon and reveal a different route.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_dungeon_prose\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_awake\\\",\\\"value\\\":true},\\\"then\\\":\\\"The walls shift. The western exit is sealed and a new northern passage is open.\\\",\\\"otherwise\\\":\\\"A silent chamber holds a stone idol. The western exit is open.\\\"}]}\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_old.taml",
          "after": {
            "path": "rooms/lesson_old.taml",
            "name": "lesson_old.taml",
            "content": "room lesson_old\n  exit east: lesson_room\n  name: \"Old Exit\"\n  description: \"The idol chamber is east.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_escape.taml",
          "after": {
            "path": "rooms/lesson_escape.taml",
            "name": "lesson_escape.taml",
            "content": "room lesson_escape\n  exit south: lesson_room\n  name: \"Awakened Passage\"\n  description: \"The idol chamber is south.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_idol.taml",
          "after": {
            "path": "objects/lesson_idol.taml",
            "name": "lesson_idol.taml",
            "content": "object lesson_idol\n  name: \"stone idol\"\n  description: \"Taking this idol changes the dungeon permanently.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "npcs/lesson_guardian.taml",
          "after": {
            "path": "npcs/lesson_guardian.taml",
            "name": "lesson_guardian.taml",
            "content": "npc lesson_guardian\n  name: \"stone guardian\"\n  description: \"The awakened guardian watches the changed chamber.\"\n  location: nowhere\n  mobile: true\n  follow: false\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"lesson guardian looks at you in silence.\"\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_idol",
          "after": {
            "id": "lesson_idol",
            "name": "stone idol",
            "description": "Taking this idol changes the dungeon permanently.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "visible": true,
            "takeable": true,
            "droppable": true,
            "useGive": true,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": []
          }
        },
        {
          "path": "npcs",
          "key": "lesson_guardian",
          "after": {
            "id": "lesson_guardian",
            "name": "stone guardian",
            "description": "The awakened guardian watches the changed chamber.",
            "location": "nowhere",
            "mobile": true,
            "aliases": [],
            "onEnter": "",
            "onExamine": "",
            "onTalk": "",
            "onAttack": "",
            "onDeath": "",
            "onFollow": "",
            "onAutoAttack": "",
            "onTrustChange": "",
            "onGive": "",
            "onBeforeTalk": "",
            "onAfterTalk": "",
            "onBeforeAttack": "",
            "onAfterAttack": "",
            "onDamage": "",
            "onHeal": "",
            "onMove": "",
            "onLeave": "",
            "followPlayer": false,
            "health": 100,
            "combatSide": "neutral",
            "autoFight": false,
            "attackPower": 10,
            "defense": 0,
            "trustLevel": 50,
            "conversationEnabled": false,
            "convGreeting": "",
            "convFarewell": "",
            "convTopics": [],
            "dialogues": [
              {
                "id": "default",
                "trigger": "default",
                "body": "print \"lesson guardian looks at you in silence.\""
              }
            ]
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Sleeping Idol Chamber",
            "description": "The old exit is west. Take the stone idol to awaken the dungeon and reveal a different route.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "smartProse": {
              "description": {
                "version": 1,
                "parts": [
                  {
                    "type": "conditional",
                    "id": "lesson_dungeon_prose",
                    "when": {
                      "kind": "flag_equals",
                      "flag": "lesson_awake",
                      "value": true
                    },
                    "then": "The walls shift. The western exit is sealed and a new northern passage is open.",
                    "otherwise": "A silent chamber holds a stone idol. The western exit is open."
                  }
                ]
              }
            },
            "blockedDescriptions": {
              "west": "The old passage has sealed. Use the new northern route.",
              "north": "There is no northern passage while the dungeon sleeps."
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_old",
          "after": {
            "id": "lesson_old",
            "name": "Old Exit",
            "description": "The idol chamber is east.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_escape",
          "after": {
            "id": "lesson_escape",
            "name": "Awakened Passage",
            "description": "The idol chamber is south.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 540,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_old",
          "after": {
            "id": "lesson_route_old",
            "fromRoom": "lesson_room",
            "toRoom": "lesson_old",
            "direction": "west",
            "locked": false,
            "when": "lesson_old_open"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_back",
          "after": {
            "id": "lesson_route_back",
            "fromRoom": "lesson_old",
            "toRoom": "lesson_room",
            "direction": "east",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_escape",
          "after": {
            "id": "lesson_route_escape",
            "fromRoom": "lesson_room",
            "toRoom": "lesson_escape",
            "direction": "north",
            "locked": false,
            "when": "lesson_awake"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_return",
          "after": {
            "id": "lesson_route_return",
            "fromRoom": "lesson_escape",
            "toRoom": "lesson_room",
            "direction": "south",
            "locked": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_awake",
          "after": {
            "id": "lesson_awake",
            "name": "awake",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_old_open",
          "after": {
            "id": "lesson_old_open",
            "name": "old open",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": true
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_wake",
          "after": {
            "id": "lesson_wake",
            "name": "wake",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_idol",
              "event": "take"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_awake",
                "value": true
              },
              {
                "kind": "state",
                "target": "lesson_old_open",
                "value": false
              },
              {
                "kind": "move_npc",
                "target": "lesson_guardian",
                "destination": "lesson_room"
              },
              {
                "kind": "message",
                "value": "The idol rises from its plinth. The dungeon awakens."
              }
            ],
            "otherwise": "",
            "once": true
          }
        }
      ]
    }
  ],
  "creatorNotes": "Taking an idol awakens the dungeon. The old exit closes, a new escape route opens, an existing guardian moves into the chamber and the room description changes. Dropping the idol cannot undo the event.\nOpen Help → Cookbook → Living Dungeon / Changing Map System → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: north; west; east; take stone idol; look; west; drop stone idol; take stone idol; north; south; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Sleeping Idol Chamber",
      "description": "The old exit is west. Take the stone idol to awaken the dungeon and reveal a different route.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "smartProse": {
        "description": {
          "version": 1,
          "parts": [
            {
              "type": "conditional",
              "id": "lesson_dungeon_prose",
              "when": {
                "kind": "flag_equals",
                "flag": "lesson_awake",
                "value": true
              },
              "then": "The walls shift. The western exit is sealed and a new northern passage is open.",
              "otherwise": "A silent chamber holds a stone idol. The western exit is open."
            }
          ]
        }
      },
      "blockedDescriptions": {
        "west": "The old passage has sealed. Use the new northern route.",
        "north": "There is no northern passage while the dungeon sleeps."
      }
    },
    {
      "id": "lesson_old",
      "name": "Old Exit",
      "description": "The idol chamber is east.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    },
    {
      "id": "lesson_escape",
      "name": "Awakened Passage",
      "description": "The idol chamber is south.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 540,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_old",
      "fromRoom": "lesson_room",
      "toRoom": "lesson_old",
      "direction": "west",
      "locked": false,
      "when": "lesson_old_open"
    },
    {
      "id": "lesson_route_back",
      "fromRoom": "lesson_old",
      "toRoom": "lesson_room",
      "direction": "east",
      "locked": false
    },
    {
      "id": "lesson_route_escape",
      "fromRoom": "lesson_room",
      "toRoom": "lesson_escape",
      "direction": "north",
      "locked": false,
      "when": "lesson_awake"
    },
    {
      "id": "lesson_route_return",
      "fromRoom": "lesson_escape",
      "toRoom": "lesson_room",
      "direction": "south",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_idol",
      "name": "stone idol",
      "description": "Taking this idol changes the dungeon permanently.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "sample_field_journal",
      "name": "field journal",
      "description": "Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.",
      "article": "",
      "location": "inventory",
      "aliases": [
        "journal"
      ],
      "visible": true,
      "takeable": true,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    }
  ],
  "npcs": [
    {
      "id": "lesson_guardian",
      "name": "stone guardian",
      "description": "The awakened guardian watches the changed chamber.",
      "location": "nowhere",
      "mobile": true,
      "aliases": [],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "",
      "onAttack": "",
      "onDeath": "",
      "onFollow": "",
      "onAutoAttack": "",
      "onTrustChange": "",
      "onGive": "",
      "onBeforeTalk": "",
      "onAfterTalk": "",
      "onBeforeAttack": "",
      "onAfterAttack": "",
      "onDamage": "",
      "onHeal": "",
      "onMove": "",
      "onLeave": "",
      "followPlayer": false,
      "health": 100,
      "combatSide": "neutral",
      "autoFight": false,
      "attackPower": 10,
      "defense": 0,
      "trustLevel": 50,
      "conversationEnabled": false,
      "convGreeting": "",
      "convFarewell": "",
      "convTopics": [],
      "dialogues": [
        {
          "id": "default",
          "trigger": "default",
          "body": "print \"lesson guardian looks at you in silence.\""
        }
      ]
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "smart-prose-v1",
    "story-rules-v1"
  ]
}
