This repository has been archived on 2022-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
texty/games/example.yml

89 lines
2.5 KiB
YAML
Raw Normal View History

2021-11-02 17:40:54 +01:00
meta: # make sure every key is in lowercase
name: "My Text Adventure" # Game name
2022-02-04 19:35:38 +01:00
id: "examplegame" # An original game ID (please try to be original)
2021-11-02 17:40:54 +01:00
creator: "hernik" # Your name as a creator
2022-04-19 12:36:05 +02:00
equippable:
- iron_sword:
atk: 3
starter: true
2022-05-16 15:56:11 +02:00
name: "Iron Sword"
- wood_sword:
atk: 1
starter: true
name: "Wooden Sword"
2022-04-19 12:36:05 +02:00
- chainmail:
def: 2
2022-05-16 15:56:11 +02:00
name: "Chainmail Armor"
2022-04-19 12:36:05 +02:00
starter: true
2022-05-02 11:32:40 +02:00
enemies:
- john:
name: "John"
hp: 20
def: 1
attacks:
- slash:
atk: 2
name: "Slash"
2022-05-04 10:20:11 +02:00
- boom:
2022-05-02 11:32:40 +02:00
atk: 1
name: "Boom"
2021-11-02 17:40:54 +01:00
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
2022-01-26 16:07:31 +01:00
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
2021-11-02 17:40:54 +01:00
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
2021-12-02 11:20:39 +01:00
text: "&bYou wave at the customers to signal your arrival. &rThey all ignore you and look away."
2021-11-02 17:40:54 +01:00
sit: # if no `actions` are supplied, the game exits
description: "Sit down"
text: "You quietly sit down and check the menu."
2022-01-26 16:07:31 +01:00
actions:
- beer
- nothing
beer:
description: "Order beer"
text: "You order some &ebeer"
2022-04-06 09:42:47 +02:00
add_item: "Beer" # add something to inventory
2022-04-05 11:59:11 +02:00
actions:
- do_something
2022-01-26 16:07:31 +01:00
nothing:
description: "Do nothing"
text: "You sit and wait..."
2022-04-06 09:42:47 +02:00
actions:
- drink
- leave
2022-04-05 11:59:11 +02:00
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"
2022-05-02 11:32:40 +02:00
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!"
2021-11-02 17:40:54 +01:00