{
  "version": "1.1",
  "name": "Scripts: Typed Calls & Accepted Delivery",
  "startRoom": "lesson_reception",
  "author": "TAGMaker",
  "description": "Set up two dials that share the same checks. Correct settings let the console release one dispatch. Deliver that real item to the archivist to finish; wrong settings and repeated actions cannot create extra rewards.",
  "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_reception.taml",
      "content": "room lesson_reception\n  exit east: lesson_signal_room\n  name: \"Archive Reception\"\n  narrative: \"The archivist needs a sealed dispatch from the signal archive. Go EAST, calibrate both dials, USE CONSOLE, collect the dispatch to the NORTH, then return and give it to the archivist. This safe workshop demonstrates shared scripts with typed arguments, local scratch values and returned results. There is no combat or time limit.\"\n  description: \"The archivist waits beside the delivery ledger. The signal room is east.\"\n  hint: \"Go EAST. READ INSTRUCTIONS for the complete route.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_signal_room.taml",
      "content": "room lesson_signal_room\n  exit north: lesson_archive when: lesson_archive_open\n  exit west: lesson_reception\n  name: \"Signal Desk\"\n  description: \"Red and blue dials share one verification routine. A test dial demonstrates a rejected setting. The console controls the archive route to the north; reception is west.\"\n  hint: \"USE RED DIAL, USE BLUE DIAL, then USE CONSOLE. USE TEST DIAL safely demonstrates failure. Go NORTH once the route opens.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_archive.taml",
      "content": "room lesson_archive\n  exit south: lesson_signal_room\n  name: \"Dispatch Archive\"\n  description: \"The console has released one sealed dispatch. The signal room is south.\"\n  hint: \"TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_instructions.taml",
      "content": "object lesson_instructions\n  name: \"instructions\"\n  description: \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\"\n  location: lesson_signal_room\n  aliases: [\"briefing\", \"note\", \"instructions\"]\n  droppable: false\n  weight: 0.1\n  on read:\n    print \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\"\n  end\nend"
    },
    {
      "path": "objects/lesson_red_dial.taml",
      "content": "object lesson_red_dial\n  name: \"red dial\"\n  description: \"USE RED DIAL calibrates the red channel to setting two. It calls the same shared verifier as the blue channel.\"\n  location: lesson_signal_room\n  aliases: [\"red control\", \"red dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_red_ready == true\n    print \"The red channel is already calibrated.\"\n    stop\n    endif\n    local accepted = false\n    run_script: lesson_verify_setting with: [entered = 2, expected = 2, label = \"red channel\"] into: accepted\n    if accepted == true\n    set lesson_red_ready = true\n    endif\n  end\nend"
    },
    {
      "path": "objects/lesson_blue_dial.taml",
      "content": "object lesson_blue_dial\n  name: \"blue dial\"\n  description: \"USE BLUE DIAL calibrates the blue channel to setting three. Each call has separate local scratch values.\"\n  location: lesson_signal_room\n  aliases: [\"blue control\", \"blue dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_blue_ready == true\n    print \"The blue channel is already calibrated.\"\n    stop\n    endif\n    local accepted = false\n    run_script: lesson_verify_setting with: [entered = 3, expected = 3, label = \"blue channel\"] into: accepted\n    if accepted == true\n    set lesson_blue_ready = true\n    endif\n  end\nend"
    },
    {
      "path": "objects/lesson_test_dial.taml",
      "content": "object lesson_test_dial\n  name: \"test dial\"\n  description: \"USE TEST DIAL deliberately submits an incorrect setting to the shared verifier. It changes no channel and costs no resources.\"\n  location: lesson_signal_room\n  aliases: [\"test control\", \"test dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    local accepted = true\n    run_script: lesson_verify_setting with: [entered = 1, expected = 2, label = \"test channel\"] into: accepted\n    if accepted == false\n    print \"The failed test returned false. Both real channels remain as they were.\"\n    endif\n  end\nend"
    },
    {
      "path": "objects/lesson_console.taml",
      "content": "object lesson_console\n  name: \"console\"\n  description: \"After both channels are calibrated, USE CONSOLE opens the archive route and reveals its existing dispatch. It never creates another dispatch.\"\n  location: lesson_signal_room\n  aliases: [\"desk\", \"signal console\", \"console\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_red_ready == false\n    print \"Calibrate the red channel first: USE RED DIAL.\"\n    stop\n    endif\n    if lesson_blue_ready == false\n    print \"Calibrate the blue channel first: USE BLUE DIAL.\"\n    stop\n    endif\n    local released = false\n    run_script: lesson_release_dispatch with: [parcel = \"lesson_sealed_dispatch\"] into: released\n    if released == true\n    set lesson_archive_open = true\n    endif\n  end\nend"
    },
    {
      "path": "objects/lesson_sealed_dispatch.taml",
      "content": "object lesson_sealed_dispatch\n  name: \"sealed dispatch\"\n  description: \"One physical sealed dispatch, released by the console. Carry it back to reception and GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  location: lesson_archive\n  aliases: [\"dispatch\", \"parcel\", \"sealed dispatch\"]\n  visible: false\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "npcs/lesson_archivist.taml",
      "content": "npc lesson_archivist\n  name: \"archivist\"\n  description: \"The archivist receives the sealed dispatch through an accepted native handover.\"\n  location: lesson_reception\n  mobile: false\n  follow: false\n  aliases: [\"clerk\", \"archivist\"]\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 \"archivist looks at you in silence.\"\n  end\n  on talk:\n    print \"Go EAST to the signal room. Calibrate both dials, USE CONSOLE, and collect the dispatch through the NORTH archive route. Return here and GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  end\nend"
    },
    {
      "path": "scripts/lesson_verify_setting.taml",
      "content": "script lesson_verify_setting\nlocal difference = entered - expected\nif difference == 0\n  print label + \": setting accepted.\"\n  return true\nendif\nprint label + \": setting rejected; no puzzle state changed.\"\nreturn false\nend"
    },
    {
      "path": "scripts/lesson_release_dispatch.taml",
      "content": "script lesson_release_dispatch\nif lesson_dispatch_issued == true\n  print \"The console has already released its one sealed dispatch.\"\n  return false\nendif\nreveal: [parcel]\nset lesson_dispatch_issued = true\nprint \"The console opens the archive route and reveals the sealed dispatch.\"\nreturn true\nend"
    }
  ],
  "playerConfig": {
    "moneyEnabled": true,
    "startingMoney": 0
  },
  "story": {
    "version": 1,
    "states": [
      {
        "id": "lesson_red_ready",
        "name": "red ready",
        "description": "Workshop puzzle state.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_blue_ready",
        "name": "blue ready",
        "description": "Workshop puzzle state.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_dispatch_issued",
        "name": "dispatch issued",
        "description": "Workshop puzzle state.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_archive_open",
        "name": "archive open",
        "description": "Workshop puzzle state.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_dispatch_delivered",
        "name": "dispatch delivered",
        "description": "Workshop puzzle state.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_workshop_complete",
        "name": "Workshop complete",
        "description": "The workshop reached its completion.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [],
    "features": {
      "version": 1,
      "commandContext": true,
      "scriptFunctions": [
        {
          "version": 1,
          "id": "lesson_verify_setting",
          "name": "Verify a channel setting",
          "description": "Editable typed helper used by the Signal Desk workshop.",
          "inputs": [
            {
              "id": "entered",
              "name": "Submitted setting",
              "type": "number",
              "required": true
            },
            {
              "id": "expected",
              "name": "Required setting",
              "type": "number",
              "required": true
            },
            {
              "id": "label",
              "name": "Channel label",
              "type": "text",
              "required": false,
              "defaultValue": "channel"
            }
          ],
          "locals": [
            {
              "id": "difference",
              "name": "Difference",
              "type": "number",
              "initial": 0
            }
          ],
          "resultType": "boolean",
          "mode": "taml",
          "steps": []
        },
        {
          "version": 1,
          "id": "lesson_release_dispatch",
          "name": "Release the existing dispatch",
          "description": "Editable typed helper used by the Signal Desk workshop.",
          "inputs": [
            {
              "id": "parcel",
              "name": "Dispatch object",
              "type": "object",
              "required": true
            }
          ],
          "locals": [],
          "resultType": "boolean",
          "mode": "taml",
          "steps": []
        }
      ],
      "recipes": [
        {
          "id": "lesson_accept_dispatch",
          "name": "Accepted archivist dispatch",
          "enabled": true,
          "verbs": [
            "give"
          ],
          "unordered": false,
          "inputs": [
            {
              "objectId": "lesson_sealed_dispatch",
              "disposition": "transfer"
            }
          ],
          "tools": [],
          "target": {
            "kind": "npc",
            "id": "lesson_archivist"
          },
          "roomId": "lesson_reception",
          "match": "all",
          "conditions": [
            {
              "kind": "state",
              "target": "lesson_archive_open",
              "operator": "==",
              "value": true
            }
          ],
          "actions": [
            {
              "kind": "state",
              "target": "lesson_dispatch_delivered",
              "value": true
            }
          ],
          "once": true,
          "success": "The archivist accepts the one sealed dispatch and signs the delivery ledger.",
          "failure": "Bring the released sealed dispatch to the archivist at reception.",
          "repeat": "The archivist has already accepted the dispatch."
        }
      ],
      "quests": [
        {
          "id": "lesson_signal_dispatch",
          "name": "Calibrate and deliver",
          "enabled": true,
          "description": "Calibrate the two real channels, release the dispatch, and make an accepted handover.",
          "stages": [
            {
              "id": "calibrate",
              "name": "Calibrate both channels",
              "description": "Both typed helper results must have been accepted.",
              "prerequisites": [],
              "optional": false,
              "automatic": true,
              "conditions": [
                {
                  "kind": "state",
                  "target": "lesson_red_ready",
                  "operator": "==",
                  "value": true
                },
                {
                  "kind": "state",
                  "target": "lesson_blue_ready",
                  "operator": "==",
                  "value": true
                }
              ],
              "match": "all",
              "completionText": "Both channels agree. The console is ready.",
              "actions": []
            },
            {
              "id": "release",
              "name": "Release the dispatch",
              "description": "Open the real route through the console.",
              "prerequisites": [
                "calibrate"
              ],
              "optional": false,
              "automatic": true,
              "conditions": [
                {
                  "kind": "state",
                  "target": "lesson_archive_open",
                  "operator": "==",
                  "value": true
                }
              ],
              "match": "all",
              "completionText": "The archive route is available.",
              "actions": []
            },
            {
              "id": "deliver",
              "name": "Make the accepted handover",
              "description": "A native Recipe must transfer the dispatch to the archivist.",
              "prerequisites": [
                "release"
              ],
              "optional": false,
              "automatic": true,
              "conditions": [
                {
                  "kind": "state",
                  "target": "lesson_dispatch_delivered",
                  "operator": "==",
                  "value": true
                }
              ],
              "match": "all",
              "completionText": "The signed handover completes the service.",
              "actions": []
            }
          ],
          "completionText": "Signal Desk service complete! Shared typed calls, a real route, one physical dispatch and its accepted handover agree. You earn 100 points and 5 archive tokens.",
          "completionActions": [
            {
              "kind": "state",
              "target": "lesson_workshop_complete",
              "value": true
            },
            {
              "kind": "score",
              "value": 100
            },
            {
              "kind": "money",
              "value": 5
            },
            {
              "kind": "end"
            }
          ]
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "scripts-workshop",
        "choices": {
          "reception": {
            "existing": "",
            "name": "Archive Reception",
            "description": "The archivist waits beside the delivery ledger. The signal room is east."
          },
          "signal_room": {
            "existing": "",
            "name": "Signal Desk",
            "description": "Red and blue dials share one verification routine. A test dial demonstrates a rejected setting. The console controls the archive route to the north; reception is west."
          },
          "archive": {
            "existing": "",
            "name": "Dispatch Archive",
            "description": "The console has released one sealed dispatch. The signal room is south."
          },
          "instructions": {
            "existing": "",
            "name": "instructions",
            "description": "SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard."
          },
          "red_dial": {
            "existing": "",
            "name": "red dial",
            "description": "USE RED DIAL calibrates the red channel to setting two. It calls the same shared verifier as the blue channel."
          },
          "blue_dial": {
            "existing": "",
            "name": "blue dial",
            "description": "USE BLUE DIAL calibrates the blue channel to setting three. Each call has separate local scratch values."
          },
          "test_dial": {
            "existing": "",
            "name": "test dial",
            "description": "USE TEST DIAL deliberately submits an incorrect setting to the shared verifier. It changes no channel and costs no resources."
          },
          "console": {
            "existing": "",
            "name": "console",
            "description": "After both channels are calibrated, USE CONSOLE opens the archive route and reveals its existing dispatch. It never creates another dispatch."
          },
          "sealed_dispatch": {
            "existing": "",
            "name": "sealed dispatch",
            "description": "One physical sealed dispatch, released by the console. Carry it back to reception and GIVE SEALED DISPATCH TO ARCHIVIST."
          },
          "archivist": {
            "existing": "",
            "name": "archivist",
            "description": "The archivist receives the sealed dispatch through an accepted native handover."
          }
        },
        "values": {
          "introduction": "The archivist needs a sealed dispatch from the signal archive. Go EAST, calibrate both dials, USE CONSOLE, collect the dispatch to the NORTH, then return and give it to the archivist. This safe workshop demonstrates shared scripts with typed arguments, local scratch values and returned results. There is no combat or time limit.",
          "enableMoney": true
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_reception.taml",
          "after": {
            "path": "rooms/lesson_reception.taml",
            "name": "lesson_reception.taml",
            "content": "room lesson_reception\n  exit east: lesson_signal_room\n  name: \"Archive Reception\"\n  narrative: \"The archivist needs a sealed dispatch from the signal archive. Go EAST, calibrate both dials, USE CONSOLE, collect the dispatch to the NORTH, then return and give it to the archivist. This safe workshop demonstrates shared scripts with typed arguments, local scratch values and returned results. There is no combat or time limit.\"\n  description: \"The archivist waits beside the delivery ledger. The signal room is east.\"\n  hint: \"Go EAST. READ INSTRUCTIONS for the complete route.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_signal_room.taml",
          "after": {
            "path": "rooms/lesson_signal_room.taml",
            "name": "lesson_signal_room.taml",
            "content": "room lesson_signal_room\n  exit north: lesson_archive when: lesson_archive_open\n  exit west: lesson_reception\n  name: \"Signal Desk\"\n  description: \"Red and blue dials share one verification routine. A test dial demonstrates a rejected setting. The console controls the archive route to the north; reception is west.\"\n  hint: \"USE RED DIAL, USE BLUE DIAL, then USE CONSOLE. USE TEST DIAL safely demonstrates failure. Go NORTH once the route opens.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_archive.taml",
          "after": {
            "path": "rooms/lesson_archive.taml",
            "name": "lesson_archive.taml",
            "content": "room lesson_archive\n  exit south: lesson_signal_room\n  name: \"Dispatch Archive\"\n  description: \"The console has released one sealed dispatch. The signal room is south.\"\n  hint: \"TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_instructions.taml",
          "after": {
            "path": "objects/lesson_instructions.taml",
            "name": "lesson_instructions.taml",
            "content": "object lesson_instructions\n  name: \"instructions\"\n  description: \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\"\n  location: lesson_signal_room\n  aliases: [\"briefing\", \"note\", \"instructions\"]\n  droppable: false\n  weight: 0.1\n  on read:\n    print \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\"\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_red_dial.taml",
          "after": {
            "path": "objects/lesson_red_dial.taml",
            "name": "lesson_red_dial.taml",
            "content": "object lesson_red_dial\n  name: \"red dial\"\n  description: \"USE RED DIAL calibrates the red channel to setting two. It calls the same shared verifier as the blue channel.\"\n  location: lesson_signal_room\n  aliases: [\"red control\", \"red dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_red_ready == true\n    print \"The red channel is already calibrated.\"\n    stop\n    endif\n    local accepted = false\n    run_script: lesson_verify_setting with: [entered = 2, expected = 2, label = \"red channel\"] into: accepted\n    if accepted == true\n    set lesson_red_ready = true\n    endif\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_blue_dial.taml",
          "after": {
            "path": "objects/lesson_blue_dial.taml",
            "name": "lesson_blue_dial.taml",
            "content": "object lesson_blue_dial\n  name: \"blue dial\"\n  description: \"USE BLUE DIAL calibrates the blue channel to setting three. Each call has separate local scratch values.\"\n  location: lesson_signal_room\n  aliases: [\"blue control\", \"blue dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_blue_ready == true\n    print \"The blue channel is already calibrated.\"\n    stop\n    endif\n    local accepted = false\n    run_script: lesson_verify_setting with: [entered = 3, expected = 3, label = \"blue channel\"] into: accepted\n    if accepted == true\n    set lesson_blue_ready = true\n    endif\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_test_dial.taml",
          "after": {
            "path": "objects/lesson_test_dial.taml",
            "name": "lesson_test_dial.taml",
            "content": "object lesson_test_dial\n  name: \"test dial\"\n  description: \"USE TEST DIAL deliberately submits an incorrect setting to the shared verifier. It changes no channel and costs no resources.\"\n  location: lesson_signal_room\n  aliases: [\"test control\", \"test dial\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    local accepted = true\n    run_script: lesson_verify_setting with: [entered = 1, expected = 2, label = \"test channel\"] into: accepted\n    if accepted == false\n    print \"The failed test returned false. Both real channels remain as they were.\"\n    endif\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_console.taml",
          "after": {
            "path": "objects/lesson_console.taml",
            "name": "lesson_console.taml",
            "content": "object lesson_console\n  name: \"console\"\n  description: \"After both channels are calibrated, USE CONSOLE opens the archive route and reveals its existing dispatch. It never creates another dispatch.\"\n  location: lesson_signal_room\n  aliases: [\"desk\", \"signal console\", \"console\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\n  on use:\n    if lesson_red_ready == false\n    print \"Calibrate the red channel first: USE RED DIAL.\"\n    stop\n    endif\n    if lesson_blue_ready == false\n    print \"Calibrate the blue channel first: USE BLUE DIAL.\"\n    stop\n    endif\n    local released = false\n    run_script: lesson_release_dispatch with: [parcel = \"lesson_sealed_dispatch\"] into: released\n    if released == true\n    set lesson_archive_open = true\n    endif\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_sealed_dispatch.taml",
          "after": {
            "path": "objects/lesson_sealed_dispatch.taml",
            "name": "lesson_sealed_dispatch.taml",
            "content": "object lesson_sealed_dispatch\n  name: \"sealed dispatch\"\n  description: \"One physical sealed dispatch, released by the console. Carry it back to reception and GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  location: lesson_archive\n  aliases: [\"dispatch\", \"parcel\", \"sealed dispatch\"]\n  visible: false\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "npcs/lesson_archivist.taml",
          "after": {
            "path": "npcs/lesson_archivist.taml",
            "name": "lesson_archivist.taml",
            "content": "npc lesson_archivist\n  name: \"archivist\"\n  description: \"The archivist receives the sealed dispatch through an accepted native handover.\"\n  location: lesson_reception\n  mobile: false\n  follow: false\n  aliases: [\"clerk\", \"archivist\"]\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 \"archivist looks at you in silence.\"\n  end\n  on talk:\n    print \"Go EAST to the signal room. Calibrate both dials, USE CONSOLE, and collect the dispatch through the NORTH archive route. Return here and GIVE SEALED DISPATCH TO ARCHIVIST.\"\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "scripts/lesson_verify_setting.taml",
          "after": {
            "path": "scripts/lesson_verify_setting.taml",
            "name": "lesson_verify_setting.taml",
            "content": "script lesson_verify_setting\nlocal difference = entered - expected\nif difference == 0\n  print label + \": setting accepted.\"\n  return true\nendif\nprint label + \": setting rejected; no puzzle state changed.\"\nreturn false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "scripts/lesson_release_dispatch.taml",
          "after": {
            "path": "scripts/lesson_release_dispatch.taml",
            "name": "lesson_release_dispatch.taml",
            "content": "script lesson_release_dispatch\nif lesson_dispatch_issued == true\n  print \"The console has already released its one sealed dispatch.\"\n  return false\nendif\nreveal: [parcel]\nset lesson_dispatch_issued = true\nprint \"The console opens the archive route and reveals the sealed dispatch.\"\nreturn true\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_instructions",
          "after": {
            "id": "lesson_instructions",
            "name": "instructions",
            "description": "SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.",
            "article": "",
            "location": "lesson_signal_room",
            "aliases": [
              "briefing",
              "note",
              "instructions"
            ],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": false,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [
              {
                "id": "read",
                "event": "read",
                "withTarget": "",
                "body": "print \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\""
              }
            ]
          }
        },
        {
          "path": "objects",
          "key": "lesson_red_dial",
          "after": {
            "id": "lesson_red_dial",
            "name": "red dial",
            "description": "USE RED DIAL calibrates the red channel to setting two. It calls the same shared verifier as the blue channel.",
            "article": "",
            "location": "lesson_signal_room",
            "aliases": [
              "red control",
              "red dial"
            ],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": true,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [
              {
                "id": "use",
                "event": "use",
                "withTarget": "",
                "body": "if lesson_red_ready == true\n  print \"The red channel is already calibrated.\"\n  stop\nendif\nlocal accepted = false\nrun_script: lesson_verify_setting with: [entered = 2, expected = 2, label = \"red channel\"] into: accepted\nif accepted == true\n  set lesson_red_ready = true\nendif"
              }
            ]
          }
        },
        {
          "path": "objects",
          "key": "lesson_blue_dial",
          "after": {
            "id": "lesson_blue_dial",
            "name": "blue dial",
            "description": "USE BLUE DIAL calibrates the blue channel to setting three. Each call has separate local scratch values.",
            "article": "",
            "location": "lesson_signal_room",
            "aliases": [
              "blue control",
              "blue dial"
            ],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": true,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [
              {
                "id": "use",
                "event": "use",
                "withTarget": "",
                "body": "if lesson_blue_ready == true\n  print \"The blue channel is already calibrated.\"\n  stop\nendif\nlocal accepted = false\nrun_script: lesson_verify_setting with: [entered = 3, expected = 3, label = \"blue channel\"] into: accepted\nif accepted == true\n  set lesson_blue_ready = true\nendif"
              }
            ]
          }
        },
        {
          "path": "objects",
          "key": "lesson_test_dial",
          "after": {
            "id": "lesson_test_dial",
            "name": "test dial",
            "description": "USE TEST DIAL deliberately submits an incorrect setting to the shared verifier. It changes no channel and costs no resources.",
            "article": "",
            "location": "lesson_signal_room",
            "aliases": [
              "test control",
              "test dial"
            ],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": true,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [
              {
                "id": "use",
                "event": "use",
                "withTarget": "",
                "body": "local accepted = true\nrun_script: lesson_verify_setting with: [entered = 1, expected = 2, label = \"test channel\"] into: accepted\nif accepted == false\n  print \"The failed test returned false. Both real channels remain as they were.\"\nendif"
              }
            ]
          }
        },
        {
          "path": "objects",
          "key": "lesson_console",
          "after": {
            "id": "lesson_console",
            "name": "console",
            "description": "After both channels are calibrated, USE CONSOLE opens the archive route and reveals its existing dispatch. It never creates another dispatch.",
            "article": "",
            "location": "lesson_signal_room",
            "aliases": [
              "desk",
              "signal console",
              "console"
            ],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": true,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [
              {
                "id": "use",
                "event": "use",
                "withTarget": "",
                "body": "if lesson_red_ready == false\n  print \"Calibrate the red channel first: USE RED DIAL.\"\n  stop\nendif\nif lesson_blue_ready == false\n  print \"Calibrate the blue channel first: USE BLUE DIAL.\"\n  stop\nendif\nlocal released = false\nrun_script: lesson_release_dispatch with: [parcel = \"lesson_sealed_dispatch\"] into: released\nif released == true\n  set lesson_archive_open = true\nendif"
              }
            ]
          }
        },
        {
          "path": "objects",
          "key": "lesson_sealed_dispatch",
          "after": {
            "id": "lesson_sealed_dispatch",
            "name": "sealed dispatch",
            "description": "One physical sealed dispatch, released by the console. Carry it back to reception and GIVE SEALED DISPATCH TO ARCHIVIST.",
            "article": "",
            "location": "lesson_archive",
            "aliases": [
              "dispatch",
              "parcel",
              "sealed dispatch"
            ],
            "visible": false,
            "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_archivist",
          "after": {
            "id": "lesson_archivist",
            "name": "archivist",
            "description": "The archivist receives the sealed dispatch through an accepted native handover.",
            "location": "lesson_reception",
            "mobile": false,
            "aliases": [
              "clerk",
              "archivist"
            ],
            "onEnter": "",
            "onExamine": "",
            "onTalk": "print \"Go EAST to the signal room. Calibrate both dials, USE CONSOLE, and collect the dispatch through the NORTH archive route. Return here and GIVE SEALED DISPATCH TO ARCHIVIST.\"",
            "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 \"archivist looks at you in silence.\""
              }
            ]
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_reception",
          "after": {
            "id": "lesson_reception",
            "name": "Archive Reception",
            "narrative": "The archivist needs a sealed dispatch from the signal archive. Go EAST, calibrate both dials, USE CONSOLE, collect the dispatch to the NORTH, then return and give it to the archivist. This safe workshop demonstrates shared scripts with typed arguments, local scratch values and returned results. There is no combat or time limit.",
            "description": "The archivist waits beside the delivery ledger. The signal room is east.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "Go EAST. READ INSTRUCTIONS for the complete route.",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_signal_room",
          "after": {
            "id": "lesson_signal_room",
            "name": "Signal Desk",
            "description": "Red and blue dials share one verification routine. A test dial demonstrates a rejected setting. The console controls the archive route to the north; reception is west.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "USE RED DIAL, USE BLUE DIAL, then USE CONSOLE. USE TEST DIAL safely demonstrates failure. Go NORTH once the route opens.",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_archive",
          "after": {
            "id": "lesson_archive",
            "name": "Dispatch Archive",
            "description": "The console has released one sealed dispatch. The signal room is south.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST.",
            "dark": false,
            "roomType": "regular",
            "x": 540,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_connection_0",
          "after": {
            "id": "lesson_route_connection_0",
            "fromRoom": "lesson_reception",
            "toRoom": "lesson_signal_room",
            "direction": "east",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_connection_1",
          "after": {
            "id": "lesson_route_connection_1",
            "fromRoom": "lesson_signal_room",
            "toRoom": "lesson_reception",
            "direction": "west",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_connection_2",
          "after": {
            "id": "lesson_route_connection_2",
            "fromRoom": "lesson_signal_room",
            "toRoom": "lesson_archive",
            "direction": "north",
            "locked": false,
            "when": "lesson_archive_open"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_connection_3",
          "after": {
            "id": "lesson_route_connection_3",
            "fromRoom": "lesson_archive",
            "toRoom": "lesson_signal_room",
            "direction": "south",
            "locked": false
          }
        },
        {
          "path": "scripts",
          "key": "lesson_verify_setting",
          "after": {
            "id": "lesson_verify_setting",
            "name": "Verify a channel setting",
            "description": "Shared numeric/text inputs, a private numeric local and Boolean result.",
            "body": "local difference = entered - expected\nif difference == 0\n  print label + \": setting accepted.\"\n  return true\nendif\nprint label + \": setting rejected; no puzzle state changed.\"\nreturn false",
            "kind": "shared"
          }
        },
        {
          "path": "scripts",
          "key": "lesson_release_dispatch",
          "after": {
            "id": "lesson_release_dispatch",
            "name": "Release the existing dispatch",
            "description": "A typed object target and saved once guard; no cloning.",
            "body": "if lesson_dispatch_issued == true\n  print \"The console has already released its one sealed dispatch.\"\n  return false\nendif\nreveal: [parcel]\nset lesson_dispatch_issued = true\nprint \"The console opens the archive route and reveals the sealed dispatch.\"\nreturn true",
            "kind": "shared"
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_red_ready",
          "after": {
            "id": "lesson_red_ready",
            "name": "red ready",
            "description": "Workshop puzzle state.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_blue_ready",
          "after": {
            "id": "lesson_blue_ready",
            "name": "blue ready",
            "description": "Workshop puzzle state.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_dispatch_issued",
          "after": {
            "id": "lesson_dispatch_issued",
            "name": "dispatch issued",
            "description": "Workshop puzzle state.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_archive_open",
          "after": {
            "id": "lesson_archive_open",
            "name": "archive open",
            "description": "Workshop puzzle state.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_dispatch_delivered",
          "after": {
            "id": "lesson_dispatch_delivered",
            "name": "dispatch delivered",
            "description": "Workshop puzzle state.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_workshop_complete",
          "after": {
            "id": "lesson_workshop_complete",
            "name": "Workshop complete",
            "description": "The workshop reached its completion.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.features.scriptFunctions",
          "key": "lesson_verify_setting",
          "after": {
            "version": 1,
            "id": "lesson_verify_setting",
            "name": "Verify a channel setting",
            "description": "Editable typed helper used by the Signal Desk workshop.",
            "inputs": [
              {
                "id": "entered",
                "name": "Submitted setting",
                "type": "number",
                "required": true
              },
              {
                "id": "expected",
                "name": "Required setting",
                "type": "number",
                "required": true
              },
              {
                "id": "label",
                "name": "Channel label",
                "type": "text",
                "required": false,
                "defaultValue": "channel"
              }
            ],
            "locals": [
              {
                "id": "difference",
                "name": "Difference",
                "type": "number",
                "initial": 0
              }
            ],
            "resultType": "boolean",
            "mode": "taml",
            "steps": []
          }
        },
        {
          "path": "manifest.story.features.scriptFunctions",
          "key": "lesson_release_dispatch",
          "after": {
            "version": 1,
            "id": "lesson_release_dispatch",
            "name": "Release the existing dispatch",
            "description": "Editable typed helper used by the Signal Desk workshop.",
            "inputs": [
              {
                "id": "parcel",
                "name": "Dispatch object",
                "type": "object",
                "required": true
              }
            ],
            "locals": [],
            "resultType": "boolean",
            "mode": "taml",
            "steps": []
          }
        },
        {
          "path": "manifest.story.features.recipes",
          "key": "lesson_accept_dispatch",
          "after": {
            "id": "lesson_accept_dispatch",
            "name": "Accepted archivist dispatch",
            "enabled": true,
            "verbs": [
              "give"
            ],
            "unordered": false,
            "inputs": [
              {
                "objectId": "lesson_sealed_dispatch",
                "disposition": "transfer"
              }
            ],
            "tools": [],
            "target": {
              "kind": "npc",
              "id": "lesson_archivist"
            },
            "roomId": "lesson_reception",
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_archive_open",
                "operator": "==",
                "value": true
              }
            ],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_dispatch_delivered",
                "value": true
              }
            ],
            "once": true,
            "success": "The archivist accepts the one sealed dispatch and signs the delivery ledger.",
            "failure": "Bring the released sealed dispatch to the archivist at reception.",
            "repeat": "The archivist has already accepted the dispatch."
          }
        },
        {
          "path": "manifest.story.features.quests",
          "key": "lesson_signal_dispatch",
          "after": {
            "id": "lesson_signal_dispatch",
            "name": "Calibrate and deliver",
            "enabled": true,
            "description": "Calibrate the two real channels, release the dispatch, and make an accepted handover.",
            "stages": [
              {
                "id": "calibrate",
                "name": "Calibrate both channels",
                "description": "Both typed helper results must have been accepted.",
                "prerequisites": [],
                "optional": false,
                "automatic": true,
                "conditions": [
                  {
                    "kind": "state",
                    "target": "lesson_red_ready",
                    "operator": "==",
                    "value": true
                  },
                  {
                    "kind": "state",
                    "target": "lesson_blue_ready",
                    "operator": "==",
                    "value": true
                  }
                ],
                "match": "all",
                "completionText": "Both channels agree. The console is ready.",
                "actions": []
              },
              {
                "id": "release",
                "name": "Release the dispatch",
                "description": "Open the real route through the console.",
                "prerequisites": [
                  "calibrate"
                ],
                "optional": false,
                "automatic": true,
                "conditions": [
                  {
                    "kind": "state",
                    "target": "lesson_archive_open",
                    "operator": "==",
                    "value": true
                  }
                ],
                "match": "all",
                "completionText": "The archive route is available.",
                "actions": []
              },
              {
                "id": "deliver",
                "name": "Make the accepted handover",
                "description": "A native Recipe must transfer the dispatch to the archivist.",
                "prerequisites": [
                  "release"
                ],
                "optional": false,
                "automatic": true,
                "conditions": [
                  {
                    "kind": "state",
                    "target": "lesson_dispatch_delivered",
                    "operator": "==",
                    "value": true
                  }
                ],
                "match": "all",
                "completionText": "The signed handover completes the service.",
                "actions": []
              }
            ],
            "completionText": "Signal Desk service complete! Shared typed calls, a real route, one physical dispatch and its accepted handover agree. You earn 100 points and 5 archive tokens.",
            "completionActions": [
              {
                "kind": "state",
                "target": "lesson_workshop_complete",
                "value": true
              },
              {
                "kind": "score",
                "value": 100
              },
              {
                "kind": "money",
                "value": 5
              },
              {
                "kind": "end"
              }
            ]
          }
        },
        {
          "path": "manifest.playerConfig.moneyEnabled",
          "key": "$value",
          "after": true
        },
        {
          "path": "manifest.playerConfig.startingMoney",
          "key": "$value",
          "after": 0
        },
        {
          "path": "manifest.story.features.commandContext",
          "key": "$value",
          "after": true
        }
      ]
    }
  ],
  "creatorNotes": "Set up two dials that share the same checks. Correct settings let the console release one dispatch. Deliver that real item to the archivist to finish; wrong settings and repeated actions cannot create extra rewards. Open this recipe in Help to inspect its saved settings.",
  "mapRooms": [
    {
      "id": "lesson_reception",
      "name": "Archive Reception",
      "narrative": "The archivist needs a sealed dispatch from the signal archive. Go EAST, calibrate both dials, USE CONSOLE, collect the dispatch to the NORTH, then return and give it to the archivist. This safe workshop demonstrates shared scripts with typed arguments, local scratch values and returned results. There is no combat or time limit.",
      "description": "The archivist waits beside the delivery ledger. The signal room is east.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "Go EAST. READ INSTRUCTIONS for the complete route.",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    },
    {
      "id": "lesson_signal_room",
      "name": "Signal Desk",
      "description": "Red and blue dials share one verification routine. A test dial demonstrates a rejected setting. The console controls the archive route to the north; reception is west.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "USE RED DIAL, USE BLUE DIAL, then USE CONSOLE. USE TEST DIAL safely demonstrates failure. Go NORTH once the route opens.",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    },
    {
      "id": "lesson_archive",
      "name": "Dispatch Archive",
      "description": "The console has released one sealed dispatch. The signal room is south.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST.",
      "dark": false,
      "roomType": "regular",
      "x": 540,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_connection_0",
      "fromRoom": "lesson_reception",
      "toRoom": "lesson_signal_room",
      "direction": "east",
      "locked": false
    },
    {
      "id": "lesson_route_connection_1",
      "fromRoom": "lesson_signal_room",
      "toRoom": "lesson_reception",
      "direction": "west",
      "locked": false
    },
    {
      "id": "lesson_route_connection_2",
      "fromRoom": "lesson_signal_room",
      "toRoom": "lesson_archive",
      "direction": "north",
      "locked": false,
      "when": "lesson_archive_open"
    },
    {
      "id": "lesson_route_connection_3",
      "fromRoom": "lesson_archive",
      "toRoom": "lesson_signal_room",
      "direction": "south",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_instructions",
      "name": "instructions",
      "description": "SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.",
      "article": "",
      "location": "lesson_signal_room",
      "aliases": [
        "briefing",
        "note",
        "instructions"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "read",
          "event": "read",
          "withTarget": "",
          "body": "print \"SIGNAL DESK WORKSHOP: USE TEST DIAL shows a rejected call without changing the puzzle. USE RED DIAL and USE BLUE DIAL calibrate the two channels through the same typed shared helper, each with its own arguments, local value and returned result. USE CONSOLE then opens the NORTH archive route and reveals one existing sealed dispatch through an object-typed helper. Go NORTH, TAKE SEALED DISPATCH, SOUTH, WEST, then GIVE SEALED DISPATCH TO ARCHIVIST. A real native Recipe must accept the handover before the Quest awards 100 points and 5 archive tokens. Repeated calibration and console use are harmless. SAVE, LOAD and UNDO can be tried before the final delivery. There is no combat, random gate or timed hazard.\""
        }
      ]
    },
    {
      "id": "lesson_red_dial",
      "name": "red dial",
      "description": "USE RED DIAL calibrates the red channel to setting two. It calls the same shared verifier as the blue channel.",
      "article": "",
      "location": "lesson_signal_room",
      "aliases": [
        "red control",
        "red dial"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "use",
          "event": "use",
          "withTarget": "",
          "body": "if lesson_red_ready == true\n  print \"The red channel is already calibrated.\"\n  stop\nendif\nlocal accepted = false\nrun_script: lesson_verify_setting with: [entered = 2, expected = 2, label = \"red channel\"] into: accepted\nif accepted == true\n  set lesson_red_ready = true\nendif"
        }
      ]
    },
    {
      "id": "lesson_blue_dial",
      "name": "blue dial",
      "description": "USE BLUE DIAL calibrates the blue channel to setting three. Each call has separate local scratch values.",
      "article": "",
      "location": "lesson_signal_room",
      "aliases": [
        "blue control",
        "blue dial"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "use",
          "event": "use",
          "withTarget": "",
          "body": "if lesson_blue_ready == true\n  print \"The blue channel is already calibrated.\"\n  stop\nendif\nlocal accepted = false\nrun_script: lesson_verify_setting with: [entered = 3, expected = 3, label = \"blue channel\"] into: accepted\nif accepted == true\n  set lesson_blue_ready = true\nendif"
        }
      ]
    },
    {
      "id": "lesson_test_dial",
      "name": "test dial",
      "description": "USE TEST DIAL deliberately submits an incorrect setting to the shared verifier. It changes no channel and costs no resources.",
      "article": "",
      "location": "lesson_signal_room",
      "aliases": [
        "test control",
        "test dial"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "use",
          "event": "use",
          "withTarget": "",
          "body": "local accepted = true\nrun_script: lesson_verify_setting with: [entered = 1, expected = 2, label = \"test channel\"] into: accepted\nif accepted == false\n  print \"The failed test returned false. Both real channels remain as they were.\"\nendif"
        }
      ]
    },
    {
      "id": "lesson_console",
      "name": "console",
      "description": "After both channels are calibrated, USE CONSOLE opens the archive route and reveals its existing dispatch. It never creates another dispatch.",
      "article": "",
      "location": "lesson_signal_room",
      "aliases": [
        "desk",
        "signal console",
        "console"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "use",
          "event": "use",
          "withTarget": "",
          "body": "if lesson_red_ready == false\n  print \"Calibrate the red channel first: USE RED DIAL.\"\n  stop\nendif\nif lesson_blue_ready == false\n  print \"Calibrate the blue channel first: USE BLUE DIAL.\"\n  stop\nendif\nlocal released = false\nrun_script: lesson_release_dispatch with: [parcel = \"lesson_sealed_dispatch\"] into: released\nif released == true\n  set lesson_archive_open = true\nendif"
        }
      ]
    },
    {
      "id": "lesson_sealed_dispatch",
      "name": "sealed dispatch",
      "description": "One physical sealed dispatch, released by the console. Carry it back to reception and GIVE SEALED DISPATCH TO ARCHIVIST.",
      "article": "",
      "location": "lesson_archive",
      "aliases": [
        "dispatch",
        "parcel",
        "sealed dispatch"
      ],
      "visible": false,
      "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": []
    }
  ],
  "npcs": [
    {
      "id": "lesson_archivist",
      "name": "archivist",
      "description": "The archivist receives the sealed dispatch through an accepted native handover.",
      "location": "lesson_reception",
      "mobile": false,
      "aliases": [
        "clerk",
        "archivist"
      ],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "print \"Go EAST to the signal room. Calibrate both dials, USE CONSOLE, and collect the dispatch through the NORTH archive route. Return here and GIVE SEALED DISPATCH TO ARCHIVIST.\"",
      "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 \"archivist looks at you in silence.\""
        }
      ]
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [
    {
      "id": "lesson_verify_setting",
      "name": "Verify a channel setting",
      "description": "Shared numeric/text inputs, a private numeric local and Boolean result.",
      "body": "local difference = entered - expected\nif difference == 0\n  print label + \": setting accepted.\"\n  return true\nendif\nprint label + \": setting rejected; no puzzle state changed.\"\nreturn false",
      "kind": "shared"
    },
    {
      "id": "lesson_release_dispatch",
      "name": "Release the existing dispatch",
      "description": "A typed object target and saved once guard; no cloning.",
      "body": "if lesson_dispatch_issued == true\n  print \"The console has already released its one sealed dispatch.\"\n  return false\nendif\nreveal: [parcel]\nset lesson_dispatch_issued = true\nprint \"The console opens the archive route and reveals the sealed dispatch.\"\nreturn true",
      "kind": "shared"
    }
  ],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "story-rules-v1",
    "creator-features-v1",
    "script-functions-v1"
  ]
}
