88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
meta: # make sure every key is in lowercase
|
|
name: "My Text Adventure" # Game name
|
|
id: "examplegame" # An original game ID (please try to be original)
|
|
creator: "hernik" # Your name as a creator
|
|
equippable:
|
|
- iron_sword:
|
|
atk: 3
|
|
starter: true
|
|
name: "Iron Sword"
|
|
- wood_sword:
|
|
atk: 1
|
|
starter: true
|
|
name: "Wooden Sword"
|
|
- chainmail:
|
|
def: 2
|
|
name: "Chainmail Armor"
|
|
starter: true
|
|
enemies:
|
|
- john:
|
|
name: "John"
|
|
hp: 20
|
|
def: 1
|
|
attacks:
|
|
- slash:
|
|
atk: 2
|
|
name: "Slash"
|
|
- boom:
|
|
atk: 1
|
|
name: "Boom"
|
|
|
|
game: # here goes all the game logic
|
|
start: # the starting point always HAS to be named "start" (lowercase), the order and name of the rest does not matter
|
|
text: "&bYou arrive to a small tavern in the middle of nowhere.\nYou are greeted with a non-welcoming look on the faces of all the customers." # here is the text, which gets printed
|
|
actions: # here you add a list of actions that are inside of `game`, the user can select them
|
|
- wave
|
|
- sit
|
|
wave:
|
|
description: "Wave" # this appears in the selection box, if no description is supplied
|
|
text: "&bYou wave at the customers to signal your arrival. &rThey all ignore you and look away."
|
|
sit: # if no `actions` are supplied, the game exits
|
|
description: "Sit down"
|
|
text: "You quietly sit down and check the menu."
|
|
actions:
|
|
- beer
|
|
- nothing
|
|
beer:
|
|
description: "Order beer"
|
|
text: "You order some &ebeer"
|
|
add_item: "Beer" # add something to inventory
|
|
actions:
|
|
- do_something
|
|
nothing:
|
|
description: "Do nothing"
|
|
text: "You sit and wait..."
|
|
actions:
|
|
- drink
|
|
- leave
|
|
do_something:
|
|
description: "Continue"
|
|
text: "You start to feel bored."
|
|
actions:
|
|
- drink
|
|
- leave
|
|
drink:
|
|
has_item: ["Beer"] # item names are case-sensitive
|
|
description: "Drink beer"
|
|
text: "You take a sip of your cold &eBeer"
|
|
actions:
|
|
- leave
|
|
leave:
|
|
description: "Leave"
|
|
text: "You decide to leave. But John Doe blocks your way!"
|
|
fight: john
|
|
actions:
|
|
- af
|
|
af:
|
|
description: "Continue"
|
|
text: "&cJohn&r: I'm really sorry for attacking you, I don't know what I was doing!"
|
|
actions:
|
|
- idc
|
|
- ok
|
|
idc:
|
|
description: "Leave silently"
|
|
text: "You decide to turn around and leave without saying a word."
|
|
ok:
|
|
description: "Accept apology"
|
|
text: "&cJohn&r: Oh, thank you, kind sir!"
|
|
|