Skip to content

Instantly share code, notes, and snippets.

@pikapower9080
Created August 27, 2022 19:09
Show Gist options
  • Save pikapower9080/febce2fc9b4c69649d14fbad7a6bb08d to your computer and use it in GitHub Desktop.
Save pikapower9080/febce2fc9b4c69649d14fbad7a6bb08d to your computer and use it in GitHub Desktop.
Text adventure engine example story
{
"comment": "This is an example story! Feel free to use this as your base!",
"meta": {
"title": "Space Vacation",
"author": "pikapower9080",
"description": "An example story"
},
"options": {
"hasEndingItem": true,
"endingItemId": "flashlight",
"endingItemDurability": 30,
"endingItemGameOverText": "Your flashlight ran out!",
"sfx": true,
"winText": "You win!",
"inventorySlots": 5
},
"entrance": "sleeper",
"intro": [
"You are in your space ship going on an interplanetary vacation with your family.",
"You and your family are sleeping. Your mom and dad take shifts with the controls. Currently, your dad is awake and flying the ship.",
"In the morning you decide to walk around your family's luxurious ship since you haven't gotten a chance to explore much yet. The lights are out so you grab a flashlight and hope it doesn't run out."
],
"goalText": "Have every item in your inventory at once, you may need some help to carry all of them!",
"items": {
"candy": {"name": "Candy Bar", "canDrop": true, "tooltip": "What does this do exactly?"},
"broom": {"name": "Broom", "canDrop": true, "tooltip": "This might come in handy!"},
"toilet-paper": {"name": "Toilet Paper", "canDrop": true, "tooltip": "An essential! I don't see why I would need it at the moment though..."},
"flashlight": {"name": "Flashlight", "canDrop": false, "tooltip": "If this runs out it's game over for me! I better use it sparingly."},
"keycard1": {"name": "Level 1 Keycard", "canDrop": true, "tooltip": "I bet it unlocks that door"},
"omnibox": {"name": "OmniBox™", "canDrop": false, "addInventorySlots": 5, "tooltip": "Provides +5 inventory space"},
"blueprint": {"name": "Blueprint", "canDrop": true, "tooltip": "It shows a map of the facility. There are other wings but they are locked behind big doors requiring high level keycards."},
"keycard2": {"name": "Level 2 Keycard", "canDrop": true, "tooltip": "That's weird... did someone drop this?"}
},
"rooms": {
"sleeper": {
"name": "Sleeper Cabin",
"description": "The family sleeps here. There are bunk beds and a closet, your see your brother's candy bar collection",
"items": ["candy"],
"adjacent": ["cockpit-hall", "lavatory", "kitchen"]
},
"cleaning": {
"name": "Cleaning Room",
"description": "A closet with cleaning equipment along with a helper robot to use them. A large cabinet can be found as well as a weird looking and very large door.",
"items": ["broom"],
"adjacent": ["lavatory", "the-door", "strange-hallway"]
},
"cockpit-hall": {
"name": "Hallway",
"description": "A hallway leading to the cockpit with nothing other than portholes looking out into open space.",
"items": [],
"adjacent": ["cockpit", "sleeper"]
},
"cockpit": {
"name": "Cockpit",
"description": "Your dad is at the controls, he seems spaced out. Nothing but an abundance of buttons and dials.",
"items": ["keycard2"],
"adjacent": ["cockpit-hall", "viewing-deck", "captain-quarters"]
},
"captain-quarters": {
"name": "Captain's Quarters",
"description": "The master bedroom of the ship, your dad sleeps here. You shouldn't take any of his things.",
"items": [],
"adjacent": ["cockpit"]
},
"lavatory": {
"name": "Lavatory",
"description": "It's much better than the bathrooms on commercial ships, that's for sure...",
"items": ["toilet-paper"],
"adjacent": ["cleaning", "sleeper"]
},
"kitchen": {
"name": "Kitchen",
"description": "A small kitchen with a robot to do the cooking. The robot is carrying an egg beater.",
"items": [],
"adjacent": ["sleeper"]
},
"viewing-deck": {
"name": "Viewing Deck",
"description": "A large room with a full wall window of bulletproof glass that looks out into open space. You hope it's safe...",
"items": [],
"adjacent": ["cockpit"]
},
"the-door": {
"name": "The Door",
"shortname": "Strange Door",
"description": "You open the door and look inside. It's big enough for you to walk in.",
"items": [],
"adjacent": ["cleaning"],
"requires": ["keycard1"],
"requiredText": "The door is locked, it looks like you need a keycard.",
"requiredAdjacent": ["the-facility"]
},
"strange-hallway": {
"name": "Strange Passageway",
"shortname": "Look in the cabinet",
"description": "You enter the cabinet which leads to a secret passageway. There are way too many cobwebs! You use the broom to clear out the many cobwebs and after a while you finally get to the end of the tunnel. You find a keycard labeled \"Level 1\". Your gut says you should pick it up.",
"adjacent": ["cleaning"],
"requires": ["broom"],
"requiredText": "You open up the cabinet to find a long passageway filled with cobwebs! you seriously can't walk through that thing, you'll need a broom or something.",
"items": ["keycard1"]
},
"the-facility": {
"name": "The Facility",
"description": "You find yourself in a strange place, it looks like it could be a facility or lab of some kind. You are in a large hallway. The walls are sterile white.",
"items": [],
"adjacent": ["wing-a", "cleaning"]
},
"wing-a": {
"name": "Wing A",
"description": "Another hallway with lots and lots of doors. Most doors are protected with a magnetic lock. Looking through the many bulletproof windows you can see offices and storage spaces, an open door catches your eye.",
"items": [],
"adjacent": ["office", "the-facility"]
},
"office": {
"name": "Office",
"shortname": "Office Door",
"description": "A small office space with a few items lying around. There is a door on the other side of the room, it's locked but you can unlock it from inside.",
"items": ["omnibox"],
"adjacent": ["wing-a", "wing-b"]
},
"wing-b": {
"name": "Wing B",
"description": "The walls are lined with indicator lights for whatever systems they have. There are a few locked doors. There is a logo depicting an atom projected on the far end of the hallway.",
"items": ["blueprint"],
"adjacent": ["wing-c", "office"]
},
"wing-c": {
"name": "Wing C",
"shortname": "Wing C Door",
"description": "???",
"requires": ["keycard2"],
"requiredText": "The door is huge! A keycard reader sits nearby. It's labeled \"Level 2\"",
"items": []
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment