{
  "version": "1.1",
  "name": "Three-Number Safe Combination",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "Read a clue to learn a three-digit code, then choose it on the safe. Incorrect choices leave the real safe locked. The correct code opens it and exposes one ring inside.",
  "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  name: \"Safe Office\"\n  description: \"Read the code note, then use the number safe. Choose the code from the displayed choices.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_note.taml",
      "content": "object lesson_note\n  name: \"code note\"\n  description: \"Read this note to learn the three-digit safe code.\"\n  location: lesson_room\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_safe.taml",
      "content": "object lesson_safe\n  name: \"number safe\"\n  description: \"A locked safe with a three-digit keypad.\"\n  contents_v1: \"{\\\"version\\\":1,\\\"kind\\\":\\\"container\\\",\\\"open\\\":false,\\\"locked\\\":true,\\\"transparent\\\":false}\"\n  location: lesson_room\n  droppable: false\n  container: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_ring.taml",
      "content": "object lesson_ring\n  name: \"gold ring\"\n  description: \"A gold ring stored in the safe.\"\n  contents_v1: \"{\\\"version\\\":1,\\\"placement\\\":{\\\"parentId\\\":\\\"lesson_safe\\\",\\\"relation\\\":\\\"inside\\\"}}\"\n  takeable: true\n  use_give: true\n  weight: 0.1\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_read",
        "name": "read",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_open",
        "name": "open",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "id": "lesson_read",
        "name": "read",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_note",
          "event": "custom:read"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_read",
            "value": true
          },
          {
            "kind": "message",
            "value": "The note gives the safe code: 427."
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "id": "lesson_need_clue",
        "name": "need clue",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_safe",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_read",
            "operator": "==",
            "value": false
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "Read the code note before using the safe."
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "id": "lesson_keypad",
        "name": "keypad",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_safe",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_read",
            "operator": "==",
            "value": true
          },
          {
            "kind": "state",
            "target": "lesson_open",
            "operator": "==",
            "value": false
          }
        ],
        "actions": [
          {
            "kind": "prompt",
            "target": "lesson_combination"
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "id": "lesson_already",
        "name": "already",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_safe",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_open",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The safe is already open."
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "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_open",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The learned combination opened a real safe and its contents. 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
      }
    ],
    "features": {
      "version": 1,
      "prompts": [
        {
          "id": "lesson_combination",
          "name": "Choose the three-digit combination.",
          "enabled": true,
          "text": "Choose the three-digit combination.",
          "cancelLabel": "Leave the choice for later",
          "cancelable": true,
          "owner": {
            "kind": "object",
            "id": "lesson_safe"
          },
          "options": [
            {
              "id": "correct",
              "label": "Enter 427",
              "match": "all",
              "conditions": [],
              "actions": [
                {
                  "kind": "state",
                  "target": "lesson_open",
                  "value": true
                },
                {
                  "kind": "object_state",
                  "target": "lesson_safe",
                  "property": "locked",
                  "value": false
                },
                {
                  "kind": "object_state",
                  "target": "lesson_safe",
                  "property": "open",
                  "value": true
                },
                {
                  "kind": "message",
                  "value": "The combination is correct. The safe unlocks and opens."
                }
              ],
              "once": false,
              "unavailable": "disable"
            },
            {
              "id": "wrong0",
              "label": "Enter 538",
              "match": "all",
              "conditions": [],
              "actions": [
                {
                  "kind": "message",
                  "value": "That code is wrong. The safe stays locked."
                }
              ],
              "once": false,
              "unavailable": "disable"
            },
            {
              "id": "wrong1",
              "label": "Enter 649",
              "match": "all",
              "conditions": [],
              "actions": [
                {
                  "kind": "message",
                  "value": "That code is wrong. The safe stays locked."
                }
              ],
              "once": false,
              "unavailable": "disable"
            }
          ]
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "49-three-number-safe-combination",
        "choices": {
          "room": {
            "existing": "",
            "name": "Safe Office",
            "description": "Read the code note, then use the number safe. Choose the code from the displayed choices."
          },
          "note": {
            "existing": "",
            "name": "code note",
            "description": "Read this note to learn the three-digit safe code."
          },
          "safe": {
            "existing": "",
            "name": "number safe",
            "description": "A locked safe with a three-digit keypad."
          },
          "ring": {
            "existing": "",
            "name": "gold ring",
            "description": "A gold ring stored in the safe."
          }
        },
        "values": {
          "success": "The combination is correct. The safe unlocks and opens.",
          "wrong": "That code is wrong. The safe stays locked.",
          "missing": "Read the code note before using the safe.",
          "code": 427,
          "repeat": "The safe is already open."
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_room.taml",
          "after": {
            "path": "rooms/lesson_room.taml",
            "name": "lesson_room.taml",
            "content": "room lesson_room\n  name: \"Safe Office\"\n  description: \"Read the code note, then use the number safe. Choose the code from the displayed choices.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_note.taml",
          "after": {
            "path": "objects/lesson_note.taml",
            "name": "lesson_note.taml",
            "content": "object lesson_note\n  name: \"code note\"\n  description: \"Read this note to learn the three-digit safe code.\"\n  location: lesson_room\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_safe.taml",
          "after": {
            "path": "objects/lesson_safe.taml",
            "name": "lesson_safe.taml",
            "content": "object lesson_safe\n  name: \"number safe\"\n  description: \"A locked safe with a three-digit keypad.\"\n  contents_v1: \"{\\\"version\\\":1,\\\"kind\\\":\\\"container\\\",\\\"open\\\":false,\\\"locked\\\":true,\\\"transparent\\\":false}\"\n  location: lesson_room\n  droppable: false\n  container: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_ring.taml",
          "after": {
            "path": "objects/lesson_ring.taml",
            "name": "lesson_ring.taml",
            "content": "object lesson_ring\n  name: \"gold ring\"\n  description: \"A gold ring stored in the safe.\"\n  contents_v1: \"{\\\"version\\\":1,\\\"placement\\\":{\\\"parentId\\\":\\\"lesson_safe\\\",\\\"relation\\\":\\\"inside\\\"}}\"\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_note",
          "after": {
            "id": "lesson_note",
            "name": "code note",
            "description": "Read this note to learn the three-digit safe code.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "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": []
          }
        },
        {
          "path": "objects",
          "key": "lesson_safe",
          "after": {
            "id": "lesson_safe",
            "name": "number safe",
            "description": "A locked safe with a three-digit keypad.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "visible": true,
            "takeable": false,
            "droppable": false,
            "useGive": false,
            "container": true,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [],
            "contents": {
              "version": 1,
              "kind": "container",
              "open": false,
              "locked": true,
              "transparent": false
            }
          }
        },
        {
          "path": "objects",
          "key": "lesson_ring",
          "after": {
            "id": "lesson_ring",
            "name": "gold ring",
            "description": "A gold ring stored in the safe.",
            "article": "",
            "location": "nowhere",
            "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": [],
            "contents": {
              "version": 1,
              "placement": {
                "parentId": "lesson_safe",
                "relation": "inside"
              }
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Safe Office",
            "description": "Read the code note, then use the number safe. Choose the code from the displayed choices.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000"
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_read",
          "after": {
            "id": "lesson_read",
            "name": "read",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_open",
          "after": {
            "id": "lesson_open",
            "name": "open",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_read",
          "after": {
            "id": "lesson_read",
            "name": "read",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_note",
              "event": "custom:read"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_read",
                "value": true
              },
              {
                "kind": "message",
                "value": "The note gives the safe code: 427."
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_need_clue",
          "after": {
            "id": "lesson_need_clue",
            "name": "need clue",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_safe",
              "event": "use"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_read",
                "operator": "==",
                "value": false
              }
            ],
            "actions": [
              {
                "kind": "message",
                "value": "Read the code note before using the safe."
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_keypad",
          "after": {
            "id": "lesson_keypad",
            "name": "keypad",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_safe",
              "event": "use"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_read",
                "operator": "==",
                "value": true
              },
              {
                "kind": "state",
                "target": "lesson_open",
                "operator": "==",
                "value": false
              }
            ],
            "actions": [
              {
                "kind": "prompt",
                "target": "lesson_combination"
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_already",
          "after": {
            "id": "lesson_already",
            "name": "already",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_safe",
              "event": "use"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_open",
                "operator": "==",
                "value": true
              }
            ],
            "actions": [
              {
                "kind": "message",
                "value": "The safe is already open."
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.features.prompts",
          "key": "lesson_combination",
          "after": {
            "id": "lesson_combination",
            "name": "Choose the three-digit combination.",
            "enabled": true,
            "text": "Choose the three-digit combination.",
            "cancelLabel": "Leave the choice for later",
            "cancelable": true,
            "owner": {
              "kind": "object",
              "id": "lesson_safe"
            },
            "options": [
              {
                "id": "correct",
                "label": "Enter 427",
                "match": "all",
                "conditions": [],
                "actions": [
                  {
                    "kind": "state",
                    "target": "lesson_open",
                    "value": true
                  },
                  {
                    "kind": "object_state",
                    "target": "lesson_safe",
                    "property": "locked",
                    "value": false
                  },
                  {
                    "kind": "object_state",
                    "target": "lesson_safe",
                    "property": "open",
                    "value": true
                  },
                  {
                    "kind": "message",
                    "value": "The combination is correct. The safe unlocks and opens."
                  }
                ],
                "once": false,
                "unavailable": "disable"
              },
              {
                "id": "wrong0",
                "label": "Enter 538",
                "match": "all",
                "conditions": [],
                "actions": [
                  {
                    "kind": "message",
                    "value": "That code is wrong. The safe stays locked."
                  }
                ],
                "once": false,
                "unavailable": "disable"
              },
              {
                "id": "wrong1",
                "label": "Enter 649",
                "match": "all",
                "conditions": [],
                "actions": [
                  {
                    "kind": "message",
                    "value": "That code is wrong. The safe stays locked."
                  }
                ],
                "once": false,
                "unavailable": "disable"
              }
            ]
          }
        }
      ]
    }
  ],
  "creatorNotes": "Read a clue to learn a three-digit code, then choose it on the safe. Incorrect choices leave the real safe locked. The correct code opens it and exposes one ring inside.\nOpen Help → Cookbook → Three-Number Safe Combination → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: use number safe; take gold ring; read code note; use number safe; 2; open number safe; use number safe; 1; take gold ring from number safe; use number safe; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Safe Office",
      "description": "Read the code note, then use the number safe. Choose the code from the displayed choices.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000"
    }
  ],
  "mapExits": [],
  "objects": [
    {
      "id": "lesson_note",
      "name": "code note",
      "description": "Read this note to learn the three-digit safe code.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "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": "lesson_safe",
      "name": "number safe",
      "description": "A locked safe with a three-digit keypad.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": false,
      "container": true,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [],
      "contents": {
        "version": 1,
        "kind": "container",
        "open": false,
        "locked": true,
        "transparent": false
      }
    },
    {
      "id": "lesson_ring",
      "name": "gold ring",
      "description": "A gold ring stored in the safe.",
      "article": "",
      "location": "nowhere",
      "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": [],
      "contents": {
        "version": 1,
        "placement": {
          "parentId": "lesson_safe",
          "relation": "inside"
        }
      }
    },
    {
      "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": [],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "story-rules-v1",
    "object-contents-v1",
    "creator-features-v1"
  ]
}
