source: trunk/game/dialogue/fguard.yaml @ 339

Revision 339, 10.0 KB checked in by Kaydeth_parpg, 10 years ago (diff)

Ticket #121. Patch by Zenbitz. I hacked up the dialogue-demo.py script so that I could test my fguard.yaml file. There were lots of bugs! I had to add several callbacks and functions to the dummy objects in the demo script. I also modified it so that it will use a .yaml file as the first command line argument instead of hard-coded dialogues/sample.yaml (still the default).

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: Janie
18AVATAR: gui/icons/fguard.png
19START: main_dialog
20
21SECTIONS:
22    main_dialog:
23        - say: "Halt, identify yourself!"
24        - responses:
25            -
26              - "Whoa, easy with that weapon, sister"
27              - first_impression
28              - not pc.met('janie')
29            -
30              - "I'm the beer savior, remember?"
31              - gratitude
32              - pc.hasSatisfiedQuest('beer')
33            -
34              - "It's me - don't you remember?"
35              - old_pals
36              - pc.met('janie')
37            # The 'end' section ends the conversation
38            -
39              - "Sorry, didn't mean to startle you. I'll just be moving along now."
40              - end
41
42    first_impression:
43        - say: "Hey Stranger.  You're new around here, I don't recognize your face..."
44        - meet: janie
45        - responses:
46            -
47              - "Yeah, just blew in with the last storm."
48              - elaborate_fedex
49              - pc.canAcceptQuest('fedex')
50            # above should always be true since there is no other way to get the quest 
51            -
52              - "But one night with me, babe, and you'll never forget it"
53              - rude_comeon
54 
55    elaborate_fedex:
56        - say: "Well, maybe you can do me a favor.   I have this package I need delivered
57        to Pekko.  But you gotta be casual about it.  No one can know you why you are looking for him."
58        - responses:
59            -
60              - "Me?  Why Me?"
61              - why_me
62            - 
63              - "Why the secrecy?"
64              - why_secret
65            -
66              - "What's in it for me?"
67              - what_do_i_get
68            -
69              - "Whatever, I need an excuse to wander around anyway."
70              - quest_fedex
71            -
72              - "Find another errand boy."
73              - end
74 
75    why_me:
76        - say: "No one knows you.  You're new here.  You can be expected to be wandering around being nosy."
77        - responses:
78           -
79             - "I'm still not convinced."
80             - back
81           -
82             - "Beats watching nuthin' on TV."
83             - quest_fedex
84 
85    why_secret:
86        - say: "Look buddy, it's no questions asked.  You think you are the only frozen bum to come wandering in here?"
87        - responses:
88           -
89             - "Bum?  You don't even know who I am."
90             - why_me
91           -
92             - "Really.  I remain unswayed by your logic, but you are pleasing to the eye so keep talking."
93             - back
94           -
95             - "No need to get testy, I'll do it."
96             - quest_fedex
97 
98    what_do_i_get:
99        - say:  "Everybody wants something, huh.  I suppose my undying gratitude won't cut it?  How about a beaver pelt?  They make great hats..."
100        - responses:
101           -
102             - "Naw, it's OK, your gratitude's enough for me."
103             - quest_fedex
104           -
105             - "A beaver pelt it is, then!"
106             - quest_fedex
107             # perhaps assign this agreed upon payment to the quest object?
108           -
109             - "I already gotta hat.  Deliver your own package."
110             - end
111       
112    quest_fedex:           
113         # Need some way of triggering the change in game state; package moving from Janie's inventory to yours]
114         - say:  "You should be able to find Pekko in the main compound area.  If anyone asks you why you are looking for him, 'say that he promised you something'.  Pekko's always making promises.  Oh, and don't open the box. [ Janie hands you the package ]"
115         - start_quest: fedex
116         - get_stuff: box
117         - responses:
118           -
119             - "Why can't I open the box?"
120             - why_no_open
121           -
122             - "You got it, boss."
123             - old_pals
124 
125    why_no_open:
126        - say: "You are the nosiest little mailman anywhere, ain'tcha?  How about 'it's private.'?  If I wanted you to know what it was, I wouldn't have wasted a perfectly good box it, now would I?"
127        - responses:
128           -
129             - "I guess not."
130             - old_pals       
131
132    old_pals:
133        - say: "So what can I do for you?"
134        - responses:
135           -
136             - "I'm trying to make beer, can you help me find some stuff?"
137             - help_beer
138             - pc.questIsCurrent("beer")
139           -
140             - "I guess I'll see if I can't find this Pekko character for you."
141             - end
142             - pc.questIsCurrent("fedex")
143           -
144             - "Uh, I opened the box."
145             - open_box
146             #- pc.questIsCurrent('fedex') and 'box' in pc.inventory and box.isOpen
147             - box.state == "open"
148           -
149             - "I have some bad news.  I found your friend, Pekko.  In the water tank.  Dead."
150             - dead_delivery_target
151             - pc.questIsCurrent('fedex')
152             # for this last conditional, we need some way of checking "partial" state of the
153             # quest - that the PC has found the dead Pekko, but for now we'll assume it's true
154
155    help_beer:
156        - say: "Well, what do you need?"
157        - responses:
158           -
159             - "Some kind of grain, or fruit or something."
160             - help_grain
161           -
162             - "I'm really looking for some brewer's yeast."
163             - help_yeast
164           -
165             - "I need a pot to cook the mash in."
166             - help_pot
167           -
168             - "It would be great if I had some bottles to put the brew in!"
169             - help_bottles
170           -
171             - "I think I can handle it from here."
172             - back
173
174    help_grain:
175        - say: "You could try the farm, and there should be some food in the storerooms"
176        - responses:
177           -
178             - "Thanks, I'll try that."
179             - back
180
181    help_yeast:
182        - say: "You got me.  I wonder if there is even any left at all."
183        - responses:
184           -
185             - "Someone must have some!"
186             - back
187
188    help_pot:
189        - say: "Did you try the kitchen?  Or the storerooms?"
190        - responses:
191           -
192             - "Uh, yeah.  I guess that was obvious."
193             - back
194
195    help_bottles:
196        - say: "All the random junk is downstairs in old parking lot.  We have our own little junkyard."
197        - responses:
198           -
199             - "Oooh... there is probably lots of good stuff down there."
200             - back
201
202    open_box:
203        - say: "What!  You little worm!  Why did you do that!"
204        - responses:
205           -
206             - "Well, I figured since Pekko was dead and all..."
207             - dead_delivery_target
208             - pc.questIsCurrent('fedex')
209             # pc.hasQuest("fedex") == "deadPekko" again might be tested here
210           -
211             - "I'm sorry, I was just curious."
212             - rewrap_box
213             
214    dead_delivery_target:
215       - say: "He's dead?  Well, I'm too late then. I guess you can keep the boots, then."
216       - responses:
217          -
218            - "What boots?"
219            - boot_gift
220            - box.state == 'closed'
221          -
222            - "Yeah, I figured he wouldn't need them.  Why did you send him boots, anyway?"
223            - explain_boots
224            - box.state == 'open' or 'boots' in pc.inventory
225   
226    boot_gift:
227       - say: "That's what was in the package. [Janie takes boots out of the package, and gives them to you]"
228       - get_stuff: boots
229       - responses:
230          -
231            - "Oh.  I must be missing something..."
232            - explain_boots
233   
234    explain_boots:
235       - say: "The boots were a signal that he should leave town... that he'd gone too far this time."
236       - complete_quest: fedex
237       - responses:
238          -
239            - "You knew about this?  Who do you think killed him?"
240            - discuss_murder
241          -
242            - "I think I know who killed him."
243            - discuss_murder
244   
245    discuss_murder:
246       - say: "Look.  Just stay out of it.  It's not really your business anyway, Stranger.  Just forget we ever talked."
247       - responses:
248          -
249            - "Alright, Alright.  But I don't like it."
250            - end
251               
252    rewrap_box:
253       - say: "Give me that back! [Janie takes boots from PC and rewraps them].  Now, here.  And don't open it again."
254       - take_stuff: boots
255       - give_stuff: box
256       - responses:
257          -
258            - "OK, It will never happen again."
259            - old_pals
260            - box.close
261            # (always returns true)
262            # PC has to get a rewrapped box, and box must be set to "closed" again.
263
264    gratitude:
265        # if pc.hasSatisfiedQuest("beer") returns an integer representing
266        # quality of beer, we can add more varied responses
267        - say: "Well aren't you just a thick slice of awesome."
268        - responses:
269           -
270             - "I try, I try."
271             - old_pals
272   
273    rude_comeon:
274        - say: "[fondles weapon] I hope you can take it as well as you give it..."
275        - responses:
276            -
277              - "Any way you want it, that's the way you need it!"
278              - end
279 
Note: See TracBrowser for help on using the repository browser.