source: trunk/game/dialogue/sample.yaml @ 351

Revision 288, 5.4 KB checked in by orlandov, 10 years ago (diff)

Ticket 101: Load NPC avatar image filename from the YAML dialogue file. fixes[s:trac, t:101]

Line 
1#   This file is part of PARPG.
2
3#   PARPG is free software: you can redistribute it and/or modify
4#   it under the terms of the GNU General Public License as published by
5#   the Free Software Foundation, either version 3 of the License, or
6#   (at your option) any later version.
7
8#   PARPG is distributed in the hope that it will be useful,
9#   but WITHOUT ANY WARRANTY; without even the implied warranty of
10#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11#   GNU General Public License for more details.
12
13#   You should have received a copy of the GNU General Public License
14#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>.
15
16---
17NPC: Friendly NPC
18AVATAR: gui/icons/npc.png
19START: main_dialog
20
21SECTIONS:
22    main_dialog:
23        - say: "Things are tough around here, let me tell you our problems"
24        - responses:
25            -
26              - "Sure, tell me all about it"
27              - listen_more
28              - not set(pc.finished_quests).intersection(['raiders','well','beer'])
29
30            # The 'end' section ends the conversation
31            -
32              - "That sounds boring. Bye."
33              - end
34
35    listen_more:
36        - say: "Raiders stole our cattle, our well was poisoned, and the beer is all gone!"
37        - responses:
38            # Raiders quest
39            -
40              - "Tell me about the raiders"
41              - elaborate_raiders
42              - pc.canAcceptQuest('raiders')
43            -
44              - "I've taken care of the raiders"
45              - complete_raiders
46              - pc.hasSatisfiedQuest('raiders')
47
48            # Well quest
49            -
50              - "Tell me about the well"
51              - elaborate_well
52              - pc.canAcceptQuest('well')
53            -
54              - "I have returned with the antidote"
55              - complete_well
56              - pc.hasSatisfiedQuest('well')
57
58            # Beer quest
59            -
60              - "Tell me about the beer"
61              - elaborate_beer
62              - pc.canAcceptQuest('beer')
63            -
64              - "Three cheers the beer is here!"
65              - complete_beer
66              - pc.hasSatisfiedQuest('beer')
67
68            # Reward for solving the three "quests"
69            -
70              - "Guard, I have solved all your problems"
71              - all_done
72              - pc.finished_quests == set(['raiders','well','beer'])
73
74            -
75              - "Good luck with that"
76              - end
77
78    # Raiders quest
79    elaborate_raiders:
80        - say: "They mostly come at night... mostly."
81        - responses:
82            -
83              - "I can help you, for a price"
84              - quest_raiders
85              - pc.canAcceptQuest('raiders')
86            -
87              - "What was that other stuff you were talking about again?"
88              - back
89            -
90              - "That sounds too dangerous for me, good luck!"
91              - end
92
93    quest_raiders:
94        - say: "Thank you so much, these raiders have terrified our village for too long!"
95        - start_quest: raiders
96        - responses:
97            -
98              - "Quit your yammering, those raiders won't be a problem anymore."
99              - back listen_more
100
101    complete_raiders:
102        - say: "Thank you for defeating those evil doers"
103        - complete_quest: raiders
104        - responses:
105            -
106              - "Pffft, it was easy"
107              - back listen_more
108
109    # Well quest
110    elaborate_well:
111        - say: "A foul and dreadful toxin has contaminated our water well. Rumors tell of an antidote. If only someone could find it."
112        - responses:
113            -
114              - "Wait a second... I'm someone! I will fix your well."
115              - quest_well
116              - pc.canAcceptQuest('well')
117            -
118              - "Tell me about that other stuff"
119              - back
120            -
121              - "You're scaring me, bye"
122              - end
123
124    quest_well:
125        - start_quest: well
126        - say: "You are a brave hero indeed, water bringer."
127        - responses:
128            -
129              - "Fear not, gentle villager. I will return shortly with the antidote."
130              - back listen_more
131
132    complete_well:
133        - say: "Thank heavens now the orphans will have water to drink"
134        - complete_quest: well
135        - dialogue: back
136
137    # Beer quest
138    elaborate_beer:
139        - say: "After this keg, and that keg, there is only one keg left! Something must be done."
140        - responses:
141            -
142              - "Running out of beer is no laughing matter. I'll run to the brewery for more"
143              - quest_beer
144              - pc.canAcceptQuest('beer')
145
146            -
147              - "Tell me about all that other stuff"
148              - back
149
150    quest_beer:
151        - start_quest: beer
152        - say: "I do not know what we would have done without you."
153        - responses:
154            -
155              - "It's my pleasure"
156              - back listen_more
157
158    complete_beer:
159        - say: "Thank heavens now the orphans will have beer to drink"
160        - complete_quest: beer
161        - responses:
162            -
163              - "All in a day's work, now gimme some! *glug*"
164              - back listen_more
165
166    # Final reward
167    all_done:
168        - say: "For saving our village, I will give you the prized McGuffin. Thank you, Player Character"
169        - responses:
170            -
171              - "I am so awesome"
172              - end
Note: See TracBrowser for help on using the repository browser.