source: trunk/game/dialogue/camilla.yaml @ 668

Revision 668, 5.7 KB checked in by technomage, 9 years ago (diff)

Ticket #269: Patch by Technomage.

  • Working prototype of the redesigned DialogueEngine? for the upcoming Techdemo2 release; major redesign of the existing DialogueEngine? and YAML dialogue file syntax.
  • Moved the redesigned DialogueEngine? class to the more descriptive dialogueengine.py module; the DialogueEngine? is now a singleton object and provides all functionality through class methods and attributes, and thus should not be instantiated
  • Abstracted the data structures used to store dialogue data away from the YAML data structures; the relevant classes are stored in the dialogue.py module
  • Abstracted the dialogue commands/actions from the DialogueEngine? code to make modifications and maintenance of dialogue logic easier; the relevant classes are stored in the dialogueactions.py module
  • The PyYAML loader has been replaced with a more robust YamlDialogueParser? class (see the dialogueparsers.py module) that interfaces with the new dialogue data structure classes and supports the new YAML dialogue file syntax; an OldYamlDialogueParser? class is provided to support reading the old Techdemo1 syntax
  • Removed the existing dialogue validator; runtime dialogue validation is not yet implemented
  • Added the convert_dialogue script, which converts dialogue files in the old Techdemo1 format to the new format; all existing dialogue files have been converted to work with the new parser
  • Added two support modules for the new classes and script: ordereddict.py, which provides a Python 2.7-like OrderedDict? class for Python versions 2.4-2.6; optionparser.py, which is a simplified command-line option parser for writing scripts as an alternative to argparse and optparse
  • Updated the dialogue_demo.py script to work with the new DialogueEngine?
  • fixes[s:trac, t:269]
  • Property svn:eol-style set to native
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---
16NPC_NAME: Camilla Niitty
17AVATAR_PATH: gui/icons/camilla.png
18START_SECTION: main_dialog
19SECTIONS:
20-   ID: main_dialog
21    SAY: "Oh, another vagabond.  What do you want?"
22    ACTIONS:
23    -   meet:
24        - camilla
25    RESPONSES:
26    -   REPLY: "I'm looking for stuff to make beer with "
27        CONDITION: "quest.hasActiveQuest('beer') and not\
28           \ quest.hasFinishedQuest('beer') and\
29           \ quest['beer'].isGoalValue('beer_instructions')"
30        GOTO: help_beer
31       
32    -   REPLY: "I'd like a drink."
33        GOTO: buy_drink
34       
35    -   REPLY: "I like the bar.  Do you work here?"
36        GOTO: inn_background
37       
38    -   REPLY: "Who are those two women over there?"
39        GOTO: loose_women
40       
41    -   REPLY: "Your booze monopoly is over!!"
42        CONDITION: "quest['beer'].getValue('beer_quality') >= 1"
43        GOTO: ungratitude
44       
45    -   REPLY: "I'm looking for Pekko, you seen him?"
46        CONDITION: "quest.hasActiveQuest('fedex') and not\
47           \ quest.hasFinishedQuest('fedex') and not\
48           \ quest['fedex'].isGoalValue('found_pekko')"
49        GOTO: help_fedex
50       
51    -   REPLY: "Did you hear? Pekko's dead.  I found his body."
52        CONDITION: "quest['fedex'].isGoalValue('found_pekko')"
53        GOTO: pekko_dead
54       
55    -   REPLY: "You are as cold as... well, everything."
56        GOTO: end
57       
58-   ID: buy_drink
59    SAY: "I'm off duty right now.  Go talk to Jacob."
60    RESPONSES:
61    -   REPLY: "Oh, sorry to bother you."
62        GOTO: back
63       
64-   ID: inn_background
65    SAY: "It's my Dad's place.  He's kind of a big shot around here, so watch\
66       \ yourself.  Dig is a personal friend of mine."
67    RESPONSES:
68    -   REPLY: "Who's Dig?"
69        GOTO: explain_dig
70       
71    -   REPLY: "Jacob is your father?"
72        GOTO: explain_jacob
73       
74    -   REPLY: "Can you tell me anything about your sister?"
75        GOTO: explain_synnove
76       
77    -   REPLY: "OK, lady.. no need to get defensive."
78        GOTO: back
79       
80-   ID: explain_dig
81    SAY: "Dig is the badass at the end of the bar.  He eats fools and\
82       \ miscreants like you for breakfast."
83    RESPONSES:
84    -   REPLY: "Hmmm... I hope he's not hungry then"
85        GOTO: back
86       
87-   ID: explain_jacob
88    SAY: "Jacob is my father.  He runs this place.  He's basically the number\
89       \ two guy around here, after Kimmo."
90    RESPONSES:
91    -   REPLY: "Well, maybe I should talk to him if he's so important."
92        GOTO: back
93       
94-   ID: explain_synnove
95    SAY: "Ah, Synnove.  She's not really... you know.... with us.  I mean she\
96       \ is WITH us, with us, but not really all there.  But she's not crazy...\
97       \ just confused.  Oh, I probably said too much."
98    RESPONSES:
99    -   REPLY: "Sounds about par for the course."
100        GOTO: back
101       
102-   ID: help_beer
103    SAY: "Why don't you just buy... Oh.  OH.  Is that your little scheme?  If I\
104       \ were you I would just drop.  I don't think my dad will take kindly to\
105       \ competition."
106    RESPONSES:
107    -   REPLY: "Ooops."
108        GOTO: end
109       
110-   ID: loose_women
111    SAY: "Those two?  Cande and Kalli.  They're trouble.  Watch your wallet\
112       \ around them.  I mean, if we still had wallets.  And money."
113    RESPONSES:
114    -   REPLY: "Ha, I can handle myself.  Thanks for the tip though."
115        GOTO: back
116       
117-   ID: help_fedex
118    SAY: "Pekko?  Yeah, he was here a couple of nights ago.  Talking to Bart."
119    RESPONSES:
120    -   REPLY: "Really?  You are the only person who's seen him lately.  Did he\
121           \ say anything about where he was going or what he was doing?"
122        ACTIONS:
123        -   set_quest_value:
124                quest: fedex
125                value: true
126                variable: drunkard_evidence
127        GOTO: discuss_pekko
128       
129-   ID: discuss_pekko
130    SAY: "He didn't say anything directly... he mentioned getting ready to go\
131       \ out on one of his expeditions, but he wasn't going to leave until\
132       \ tomorrow.  He and Bart walked off together.  I saw them over by the\
133       \ cistern door, where that Matti guy puts all the snow."
134    RESPONSES:
135    -   REPLY: "Wow, I better check that out."
136        GOTO: back
137       
138-   ID: pekko_dead
139    SAY: "Dead?  Gee, that's awful.  I enjoyed his stories of the wilderness...\
140       \ I guess I am the last person to see him alive."
141    RESPONSES:
142    -   REPLY: "Well, maybe the second-to-last."
143        GOTO: back
144       
145    -   REPLY: "Come to think of it... were you alone here that night you last\
146           \ saw Pekko?"
147        GOTO: discuss_alibi
148       
149-   ID: discuss_alibi
150    SAY: "You think I had something to do with this?  Well... impossible... I\
151       \ was here all night.  Dig and the girls were here too.  Ask'em."
152    RESPONSES:
153    -   REPLY: "I suppose I'll do that."
154        GOTO: main_dialog
155       
156-   ID: ungratitude
157    SAY: "You little rat!!! This is our business!!  Our livelyhood!!!  I'll\
158       \ KILL You!!!1"
159    RESPONSES:
160    -   REPLY: "Hahaha... catch me if you can!!!"
161        GOTO: end
162       
163...
Note: See TracBrowser for help on using the repository browser.