Ignore:
Timestamp:
11/17/10 21:44:05 (9 years ago)
Author:
technomage
Message:

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]
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        44.settings 
        55Thumbs.db 
         6 
         7.externalToolBuilders 
         8 
         9.cproject 
  • trunk/game/dialogue/fguard.yaml

    r613 r668  
    1313#   You should have received a copy of the GNU General Public License 
    1414#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    15  
    1615--- 
    17 NPC: Janie 
    18 AVATAR: gui/icons/fguard.png 
    19 START: main_dialog 
    20  
     16NPC_NAME: Janie 
     17AVATAR_PATH: gui/icons/fguard.png 
     18START_SECTION: main_dialog 
    2119SECTIONS: 
    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, baby!" 
    31               - gratitude 
    32               - quest['beer'].getValue('beer_quality') >= 1 
    33             -  
    34               - "It's me - don't you remember?" 
    35               - old_pals 
    36               - pc.met('janie') 
    37             - 
    38               - "Sorry, didn't mean to startle you. I'll just be moving along now." 
    39               - end 
    40  
    41     first_impression: 
    42         - say: "Hey Stranger.  You're new around here, I don't recognize your face..." 
    43         - meet: janie 
    44         - responses: 
    45             - 
    46               - "Yeah, just blew in with the last storm." 
    47               - elaborate_fedex 
    48               - not quest.hasActiveQuest('fedex') and not quest.hasFinishedQuest('fedex') 
    49             # above should always be true since there is no other way to get the quest   
    50             - 
    51               - "But one night with me, babe, and you'll never forget it" 
    52               - rude_comeon 
    53   
    54     elaborate_fedex: 
    55         - say: "Well, maybe you can do me a favor.   I have this package I need delivered 
    56         to Pekko.  But you gotta be casual about it.  No one can know you why you are looking for him." 
    57         - responses:  
    58             -  
    59               - "Me?  Why Me?" 
    60               - why_me 
    61             -   
    62               - "Why the secrecy?" 
    63               - why_secret 
    64             - 
    65               - "What's in it for me?" 
    66               - what_do_i_get 
    67             - 
    68               - "Whatever, I need an excuse to wander around anyway." 
    69               - quest_fedex 
    70             -  
    71               - "Find another errand boy." 
    72               - end 
    73   
    74     why_me: 
    75         - say: "No one knows you.  You're new here.  You can be expected to be wandering around being nosy." 
    76         - responses: 
    77            - 
    78              - "I'm still not convinced." 
    79              - back 
    80            -  
    81              - "Beats watching nuthin' on TV." 
    82              - quest_fedex 
    83   
    84     why_secret: 
    85         - say: "Look buddy, it's no questions asked.  You think you are the only frozen bum to come wandering in here?" 
    86         - responses: 
    87            - 
    88              - "Bum?  You don't even know who I am." 
    89              - why_me 
    90            -  
    91              - "Really.  I remain unswayed by your logic, but you are pleasing to the eye so keep talking." 
    92              - back  
    93            - 
    94              - "No need to get testy, I'll do it." 
    95              - quest_fedex 
    96   
    97     what_do_i_get: 
    98         - say:  "Everybody wants something, huh.  I suppose my undying gratitude won't cut it?  How about a beaver pelt?  They make great hats..." 
    99         - responses: 
    100            -  
    101              - "Naw, it's OK, your gratitude's enough for me." 
    102              - quest_fedex 
    103            -  
    104              - "A beaver pelt it is, then!" 
    105              - quest_fedex 
    106              # This can never get delivered, since the delivery target is dead 
    107            -  
    108              - "I already gotta hat.  Deliver your own package." 
    109              - end 
    110          
    111     quest_fedex:            
    112          # Need some way of triggering the change in game state; package moving from Janie's inventory to yours] 
    113          - 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 ]" 
    114          # above line cuts off after 'making promises' 
    115          # get_stuff is broken, that's why! 
    116          - start_quest: fedex 
    117          - get_stuff: Box 
    118          # I suspect the "get_box" should be rolled into start_quest 
    119          - responses: 
    120              -  
    121                - "Why can't I open the box?" 
    122                - why_no_open 
    123              -  
    124                - "You got it, boss." 
    125                - old_pals 
    126   
    127     why_no_open: 
    128         - 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?" 
    129         - responses: 
    130            - 
    131              - "I guess not." 
    132              - old_pals         
    133  
    134     old_pals: 
    135         - say: "So what can I do for you?" 
    136         - responses: 
    137            - 
    138              - "I'm trying to make beer, can you help me find some stuff?" 
    139              - help_beer 
    140              - quest.hasActiveQuest('beer') and quest['beer'].isGoalValue('beer_instructions') and not quest.hasFinishedQuest('beer') and quest['beer'].getValue('beer_quality') < 1 
    141            - 
    142              - "I guess I'll see if I can't find this Pekko character for you." 
    143              - end 
    144              - quest.hasActiveQuest('fedex') and not quest.hasFinishedQuest('fedex') and not quest['fedex'].isGoalValue('found_pekko') 
    145            - 
    146              - "So long, Janie.  Catch you later." 
    147              - end 
    148              - not quest.hasActiveQuest('fedex') or quest.hasFinishedQuest('fedex') 
    149            - 
    150              - "Uh, I opened the box." 
    151              - open_box 
    152              - quest['fedex'].getValue('open_box') 
    153            - 
    154              - "Hey, some folks seem to think Pekko left the compound.  Would you have seen him?" 
    155              - pekko_left 
    156              - quest['fedex'].getValue('check_pekko_left') and not quest['fedex'].isGoalValue('found_pekko') 
    157            - 
    158              - "I have some bad news.  I found your friend, Pekko.  In the water tank.  Dead." 
    159              - dead_pekko 
    160              - quest['fedex'].isGoalValue('found_pekko') and not quest['fedex'].getValue('accused_of_murder') 
    161            - 
    162              - "What are we going to do about Pekko's murder?" 
    163              - discuss_murder 
    164              - quest.hasActiveQuest('fedex') and quest['fedex'].getValue('accused_of_murder') 
    165  
    166     help_beer: 
    167         - say: "Well, what do you need?" 
    168         - responses: 
    169            - 
    170              - "Where do you folks get water from.  The more pure, the better." 
    171              - help_water 
    172            - 
    173              - "Some kind of grain, or fruit or something." 
    174              - help_grain 
    175            - 
    176              - "I'm really looking for some brewer's yeast." 
    177              - help_yeast 
    178            - 
    179              - "I need a pot to cook the mash in." 
    180              - help_pot 
    181            - 
    182              - "It would be great if I had some bottles to put the brew in!" 
    183              - help_bottles 
    184            -  
    185              - "I think I can handle it from here." 
    186              - back 
    187  
    188     help_water: 
    189         - say: "Oh, that is the one thing we have plenty of.  We have an old tanker trunk that we shovel the snow in and melt it.  You can see it from up here, but you have to go downstairs to tap it.  But the water's been tasting a little funny lately." 
    190         - responses: 
    191            - 
    192              - "Great, that's a huge help." 
    193              - back 
    194  
    195     help_grain: 
    196         - say: "You could try the farm, and there should be some food in the storerooms" 
    197         - responses: 
    198            - 
    199              - "Thanks, I'll try that." 
    200              - back 
    201  
    202     help_yeast: 
    203         - say: "You got me.  I wonder if there is even any left at all." 
    204         - responses: 
    205            - 
    206              - "Someone must have some!" 
    207              - back 
    208  
    209     help_pot: 
    210         - say: "Did you try the kitchen?  Or the storerooms?" 
    211         - responses: 
    212            - 
    213              - "Uh, yeah.  I guess that was obvious." 
    214              - back 
    215  
    216     help_bottles: 
    217         - say: "All the random junk is downstairs in old parking lot.  We have our own little junkyard." 
    218         - responses: 
    219            - 
    220              - "Oooh... there is probably lots of good stuff down there." 
    221              - back 
    222  
    223     open_box: 
    224         - say: "What!  You little worm!  Why did you do that!" 
    225         - responses: 
    226            - 
    227              - "Well, I figured since Pekko was dead and all..." 
    228              - dead_pekko 
    229              - quest['fedex'].isGoalValue('found_pekko') 
    230            - 
    231              - "I'm sorry, I was just curious." 
    232              - give_back_boots 
    233               
    234     boot_gift: 
    235        - say: "That's what was in the package. [Janie takes boots out of the package, and gives them to you]" 
    236        - get_stuff: boots 
    237        - responses: 
    238           - 
    239             - "Oh.  I must be missing something..." 
    240             - explain_boots 
    241   
    242     pekko_left: 
    243        - say: "Left?  No, he's here.  I didn't see him leave, and there's no entry in the log.  He's definitly here.  I'd know." 
    244        - set_value: 
    245             quest: 'fedex' 
    246             variable: 'check_pekko_left' 
    247             value: True 
    248        - responses: 
    249           - 
    250             - "Boy, that's strange." 
    251             - back 
    252   
    253     discuss_murder: 
    254        - say: "Look.  Just stay out of it.  It's not really your business anyway, Stranger.  Just forget we ever talked." 
    255        - set_value: 
    256             quest: 'fedex' 
    257             variable: 'report_murder_to_janie' 
    258             value: True 
    259        - responses: 
    260            - 
    261              - "Alright, Alright.  But I don't like it." 
    262              - give_up_quest 
    263            - 
    264              - "It was Bart." 
    265              - accuse_bart 
    266            -  
    267              - "It was Matti, the Snow Shoveler!" 
    268              - accuse_matti 
    269            -  
    270              - "I think it was an accident." 
    271              - report_accident 
    272            -  
    273              - "Well, I'm going to talk to the boss about it." 
    274              - report_to_boss 
    275  
    276     give_up_quest: 
    277        - say: "You are making the right decision." 
    278        - responses: 
    279            - 
    280              - "If you want me to drop it, I'll drop it." 
    281              - drop_quest 
    282            - 
    283              - "No, I can't drop it.  I have to talk to the authorities" 
    284              - report_to_boss 
    285      
    286     drop_quest: 
    287        - fail_quest: fedex 
    288        - say: "Drop it.  It's bigger than than both of us." 
    289        - responses: 
    290            - 
    291              - "Consider it dropped.  How about a date?" 
    292              - end 
    293      
    294     accuse_bart: 
    295        - say: "The town drunk???  ...really?  Anyway... I don't want to know.  He's dead.  I knew his big mouth and goofy ideas were going to get him in trouble.  Just drop it, please." 
    296        - set_value: 
    297             quest: 'fedex' 
    298             variable: 'accused_of_murder' 
    299             value: 'bart' 
    300        - responses: 
    301            - 
    302              - "You can't just allow folks to murder people! It's wrong!  Someone must be informed!" 
    303              - report_to_boss 
    304            - 
    305              - "If you want me to, I'll forget about the whole thing..." 
    306              - give_up_quest 
    307  
    308     accuse_matti: 
    309        - say: "Matti?  He looks mean, but I don't think he would hurt a fly.  Anyway...  I don't want to know.  He's dead. He saved me you, know.  I guess he needed to pay more attention to himself.  Just drop it, please." 
    310        - set_value: 
    311             quest: 'fedex' 
    312             variable: 'accused_of_murder' 
    313             value: 'matti' 
    314        - responses: 
    315            - 
    316              - "You can't just allow folks to murder people! It's wrong!  Someone must be informed!" 
    317              - report_to_boss 
    318            - 
    319              - "If you want me to, I'll forget about the whole thing..." 
    320              - give_up_quest 
    321  
    322     report_accident: 
    323        - say: "An accident?  That's... convenient.  For someone." 
    324        - set_value: 
    325             quest: 'fedex' 
    326             variable: 'accused_of_murder' 
    327             value: '' 
    328        - responses: 
    329            - 
    330              - "Well, uh, you know.  It's a dangerous world.  I guess he slipped and fell in the cistern." 
    331              - old_pals 
    332               
    333     report_to_boss: 
    334        - say: "You can talk to Kimmo, but I don't think you'll find the justice you are looking for." 
    335        - responses: 
    336            - 
    337              - "Maybe.  But I have to try, right?  Otherwise, we are no better than wild animals." 
    338              - end 
    339  
    340     explain_boots: 
    341        - say: "The boots were a signal that he should leave town... that he'd gone too far this time." 
    342        - responses: 
    343            - 
    344              - "You knew about this?  Who do you think killed him?" 
    345              - discuss_murder 
    346            - 
    347              - "I think I know who killed him." 
    348              - discuss_murder 
    349                 
    350     dead_pekko: 
    351        - say: "He's dead?  Well, I'm too late then. I guess you can keep the boots, then." 
    352        - responses: 
    353           - 
    354             - "What boots?" 
    355             - boot_gift 
    356             - not quest['fedex'].getValue('open_box') 
    357           - 
    358             - "Yeah, I figured he wouldn't need them.  Why did you send him boots, anyway?" 
    359             - explain_boots 
    360             - quest['fedex'].getValue('open_box') 
    361           - 
    362             - "Does this mean no beaver pelt?" 
    363             - no_beaver_pelt 
    364      
    365     no_beaver_pelt: 
    366        - say: "No pelt." 
    367        - responses: 
    368           - 
    369             - "Awwwwww..." 
    370             - back 
    371  
    372     give_back_boots: 
    373         - say: "Give me that back!" 
    374         - responses: 
    375            - 
    376              - "Here" 
    377              - rewrap_box 
    378              - pc.hasItem("Boots") 
    379            - 
    380              - "I seem to have... misplaced them..." 
    381              - lost_boots 
    382              - not pc.hasItem("Boots")                          
    383          
    384     lost_boots: 
    385         - say: "WHAT!?" 
    386         - responses: 
    387            - 
    388              - "I, uh, go search them"  
    389              - end 
    390          
    391     rewrap_box: 
    392        - say: "[Janie takes boots from PC and rewraps them].  Now, here.  And don't open it again." 
    393        # reset the quest: Note we need to make sure we don't generate an infinite supply of combat boots! 
    394        - restart_quest: fedex 
    395        - replace_thing: 
    396           who: pc 
    397           old_item: Boots 
    398           new_item: Box         
    399        # I suspect this should be rolled into "start_quest" 
    400        - responses: 
    401           - 
    402             - "OK, It will never happen again." 
    403             - old_pals 
    404  
    405     gratitude:  
    406         - say: "Well aren't you just a thick slice of awesome." 
    407         - responses: 
    408            -  
    409              - "I try, I try." 
    410              - old_pals 
    411      
    412     rude_comeon: 
    413         - say: "[fondles weapon] I hope you can take it as well as you give it..." 
    414         - responses: 
    415             - 
    416               - "Any way you want it, that's the way you need it!" 
    417               - end 
    418   
     20-   ID: main_dialog 
     21    SAY: "Halt, identify yourself!" 
     22    RESPONSES: 
     23    -   REPLY: "Whoa, easy with that weapon, sister" 
     24        CONDITION: "not pc.met('janie')" 
     25        GOTO: first_impression 
     26         
     27    -   REPLY: "I'm the beer savior, baby!" 
     28        CONDITION: "quest['beer'].getValue('beer_quality') >= 1" 
     29        GOTO: gratitude 
     30         
     31    -   REPLY: "It's me - don't you remember?" 
     32        CONDITION: "pc.met('janie')" 
     33        GOTO: old_pals 
     34         
     35    -   REPLY: "Sorry, didn't mean to startle you. I'll just be moving along\ 
     36           \ now." 
     37        GOTO: end 
     38         
     39-   ID: first_impression 
     40    SAY: "Hey Stranger.  You're new around here, I don't recognize your\ 
     41       \ face..." 
     42    ACTIONS: 
     43    -   meet: 
     44        - janie 
     45    RESPONSES: 
     46    -   REPLY: "Yeah, just blew in with the last storm." 
     47        CONDITION: "not quest.hasActiveQuest('fedex') and not\ 
     48           \ quest.hasFinishedQuest('fedex')" 
     49        GOTO: elaborate_fedex 
     50         
     51    -   REPLY: "But one night with me, babe, and you'll never forget it" 
     52        GOTO: rude_comeon 
     53         
     54-   ID: elaborate_fedex 
     55    SAY: "Well, maybe you can do me a favor.   I have this package I need\ 
     56       \ delivered to Pekko.  But you gotta be casual about it.  No one can know\ 
     57       \ you why you are looking for him." 
     58    RESPONSES: 
     59    -   REPLY: "Me?  Why Me?" 
     60        GOTO: why_me 
     61         
     62    -   REPLY: "Why the secrecy?" 
     63        GOTO: why_secret 
     64         
     65    -   REPLY: "What's in it for me?" 
     66        GOTO: what_do_i_get 
     67         
     68    -   REPLY: "Whatever, I need an excuse to wander around anyway." 
     69        ACTIONS: 
     70        -   start_quest: 
     71            - fedex 
     72        -   take_stuff: 
     73            - Box 
     74        GOTO: quest_fedex 
     75         
     76    -   REPLY: "Find another errand boy." 
     77        GOTO: end 
     78         
     79-   ID: why_me 
     80    SAY: "No one knows you.  You're new here.  You can be expected to be\ 
     81       \ wandering around being nosy." 
     82    RESPONSES: 
     83    -   REPLY: "I'm still not convinced." 
     84        GOTO: back 
     85         
     86    -   REPLY: "Beats watching nuthin' on TV." 
     87        ACTIONS: 
     88        -   start_quest: 
     89            - fedex 
     90        -   take_stuff: 
     91            - Box 
     92        GOTO: quest_fedex 
     93         
     94-   ID: why_secret 
     95    SAY: "Look buddy, it's no questions asked.  You think you are the only\ 
     96       \ frozen bum to come wandering in here?" 
     97    RESPONSES: 
     98    -   REPLY: "Bum?  You don't even know who I am." 
     99        GOTO: why_me 
     100         
     101    -   REPLY: "Really.  I remain unswayed by your logic, but you are pleasing\ 
     102           \ to the eye so keep talking." 
     103        GOTO: back 
     104         
     105    -   REPLY: "No need to get testy, I'll do it." 
     106        ACTIONS: 
     107        -   start_quest: 
     108            - fedex 
     109        -   take_stuff: 
     110            - Box 
     111        GOTO: quest_fedex 
     112         
     113-   ID: what_do_i_get 
     114    SAY: "Everybody wants something, huh.  I suppose my undying gratitude won't\ 
     115       \ cut it?  How about a beaver pelt?  They make great hats..." 
     116    RESPONSES: 
     117    -   REPLY: "Naw, it's OK, your gratitude's enough for me." 
     118        ACTIONS: 
     119        -   start_quest: 
     120            - fedex 
     121        -   take_stuff: 
     122            - Box 
     123        GOTO: quest_fedex 
     124         
     125    -   REPLY: "A beaver pelt it is, then!" 
     126        ACTIONS: 
     127        -   start_quest: 
     128            - fedex 
     129        -   take_stuff: 
     130            - Box 
     131        GOTO: quest_fedex 
     132         
     133    -   REPLY: "I already gotta hat.  Deliver your own package." 
     134        GOTO: end 
     135         
     136-   ID: quest_fedex 
     137    SAY: "You should be able to find Pekko in the main compound area.  If\ 
     138       \ anyone asks you why you are looking for him, 'say that he promised you\ 
     139       \ something'.  Pekko's always making promises.  Oh, and don't open the\ 
     140       \ box. [ Janie hands you the package ]" 
     141    RESPONSES: 
     142    -   REPLY: "Why can't I open the box?" 
     143        GOTO: why_no_open 
     144         
     145    -   REPLY: "You got it, boss." 
     146        GOTO: old_pals 
     147         
     148-   ID: why_no_open 
     149    SAY: "You are the nosiest little mailman anywhere, ain'tcha?  How about\ 
     150       \ 'it's private.'?  If I wanted you to know what it was, I wouldn't have\ 
     151       \ wasted a perfectly good box it, now would I?" 
     152    RESPONSES: 
     153    -   REPLY: "I guess not." 
     154        GOTO: old_pals 
     155         
     156-   ID: old_pals 
     157    SAY: "So what can I do for you?" 
     158    RESPONSES: 
     159    -   REPLY: "I'm trying to make beer, can you help me find some stuff?" 
     160        CONDITION: "quest.hasActiveQuest('beer') and\ 
     161           \ quest['beer'].isGoalValue('beer_instructions') and not\ 
     162           \ quest.hasFinishedQuest('beer') and\ 
     163           \ quest['beer'].getValue('beer_quality') < 1" 
     164        GOTO: help_beer 
     165         
     166    -   REPLY: "I guess I'll see if I can't find this Pekko character for you." 
     167        CONDITION: "quest.hasActiveQuest('fedex') and not\ 
     168           \ quest.hasFinishedQuest('fedex') and not\ 
     169           \ quest['fedex'].isGoalValue('found_pekko')" 
     170        GOTO: end 
     171         
     172    -   REPLY: "So long, Janie.  Catch you later." 
     173        CONDITION: "not quest.hasActiveQuest('fedex') or\ 
     174           \ quest.hasFinishedQuest('fedex')" 
     175        GOTO: end 
     176         
     177    -   REPLY: "Uh, I opened the box." 
     178        CONDITION: "quest['fedex'].getValue('open_box')" 
     179        GOTO: open_box 
     180         
     181    -   REPLY: "Hey, some folks seem to think Pekko left the compound.  Would\ 
     182           \ you have seen him?" 
     183        CONDITION: "quest['fedex'].getValue('check_pekko_left') and not\ 
     184           \ quest['fedex'].isGoalValue('found_pekko')" 
     185        ACTIONS: 
     186        -   set_quest_value: 
     187                quest: fedex 
     188                value: true 
     189                variable: check_pekko_left 
     190        GOTO: pekko_left 
     191         
     192    -   REPLY: "I have some bad news.  I found your friend, Pekko.  In the\ 
     193           \ water tank.  Dead." 
     194        CONDITION: "quest['fedex'].isGoalValue('found_pekko') and not\ 
     195           \ quest['fedex'].getValue('accused_of_murder')" 
     196        GOTO: dead_pekko 
     197         
     198    -   REPLY: "What are we going to do about Pekko's murder?" 
     199        CONDITION: "quest.hasActiveQuest('fedex') and\ 
     200           \ quest['fedex'].getValue('accused_of_murder')" 
     201        ACTIONS: 
     202        -   set_quest_value: &id001 
     203                quest: fedex 
     204                value: true 
     205                variable: report_murder_to_janie 
     206        GOTO: discuss_murder 
     207         
     208-   ID: help_beer 
     209    SAY: "Well, what do you need?" 
     210    RESPONSES: 
     211    -   REPLY: "Where do you folks get water from.  The more pure, the better." 
     212        GOTO: help_water 
     213         
     214    -   REPLY: "Some kind of grain, or fruit or something." 
     215        GOTO: help_grain 
     216         
     217    -   REPLY: "I'm really looking for some brewer's yeast." 
     218        GOTO: help_yeast 
     219         
     220    -   REPLY: "I need a pot to cook the mash in." 
     221        GOTO: help_pot 
     222         
     223    -   REPLY: "It would be great if I had some bottles to put the brew in!" 
     224        GOTO: help_bottles 
     225         
     226    -   REPLY: "I think I can handle it from here." 
     227        GOTO: back 
     228         
     229-   ID: help_water 
     230    SAY: "Oh, that is the one thing we have plenty of.  We have an old tanker\ 
     231       \ trunk that we shovel the snow in and melt it.  You can see it from up\ 
     232       \ here, but you have to go downstairs to tap it.  But the water's been\ 
     233       \ tasting a little funny lately." 
     234    RESPONSES: 
     235    -   REPLY: "Great, that's a huge help." 
     236        GOTO: back 
     237         
     238-   ID: help_grain 
     239    SAY: "You could try the farm, and there should be some food in the\ 
     240       \ storerooms" 
     241    RESPONSES: 
     242    -   REPLY: "Thanks, I'll try that." 
     243        GOTO: back 
     244         
     245-   ID: help_yeast 
     246    SAY: "You got me.  I wonder if there is even any left at all." 
     247    RESPONSES: 
     248    -   REPLY: "Someone must have some!" 
     249        GOTO: back 
     250         
     251-   ID: help_pot 
     252    SAY: "Did you try the kitchen?  Or the storerooms?" 
     253    RESPONSES: 
     254    -   REPLY: "Uh, yeah.  I guess that was obvious." 
     255        GOTO: back 
     256         
     257-   ID: help_bottles 
     258    SAY: "All the random junk is downstairs in old parking lot.  We have our\ 
     259       \ own little junkyard." 
     260    RESPONSES: 
     261    -   REPLY: "Oooh... there is probably lots of good stuff down there." 
     262        GOTO: back 
     263         
     264-   ID: open_box 
     265    SAY: "What!  You little worm!  Why did you do that!" 
     266    RESPONSES: 
     267    -   REPLY: "Well, I figured since Pekko was dead and all..." 
     268        CONDITION: "quest['fedex'].isGoalValue('found_pekko')" 
     269        GOTO: dead_pekko 
     270         
     271    -   REPLY: "I'm sorry, I was just curious." 
     272        GOTO: give_back_boots 
     273         
     274-   ID: boot_gift 
     275    SAY: "That's what was in the package. [Janie takes boots out of the\ 
     276       \ package, and gives them to you]" 
     277    RESPONSES: 
     278    -   REPLY: "Oh.  I must be missing something..." 
     279        GOTO: explain_boots 
     280         
     281-   ID: pekko_left 
     282    SAY: "Left?  No, he's here.  I didn't see him leave, and there's no entry\ 
     283       \ in the log.  He's definitly here.  I'd know." 
     284    RESPONSES: 
     285    -   REPLY: "Boy, that's strange." 
     286        GOTO: back 
     287         
     288-   ID: discuss_murder 
     289    SAY: "Look.  Just stay out of it.  It's not really your business anyway,\ 
     290       \ Stranger.  Just forget we ever talked." 
     291    RESPONSES: 
     292    -   REPLY: "Alright, Alright.  But I don't like it." 
     293        GOTO: give_up_quest 
     294         
     295    -   REPLY: "It was Bart." 
     296        ACTIONS: 
     297        -   set_quest_value: 
     298                quest: fedex 
     299                value: bart 
     300                variable: accused_of_murder 
     301        GOTO: accuse_bart 
     302         
     303    -   REPLY: "It was Matti, the Snow Shoveler!" 
     304        ACTIONS: 
     305        -   set_quest_value: 
     306                quest: fedex 
     307                value: matti 
     308                variable: accused_of_murder 
     309        GOTO: accuse_matti 
     310         
     311    -   REPLY: "I think it was an accident." 
     312        ACTIONS: 
     313        -   set_quest_value: 
     314                quest: fedex 
     315                value: '' 
     316                variable: accused_of_murder 
     317        GOTO: report_accident 
     318         
     319    -   REPLY: "Well, I'm going to talk to the boss about it." 
     320        GOTO: report_to_boss 
     321         
     322-   ID: give_up_quest 
     323    SAY: "You are making the right decision." 
     324    RESPONSES: 
     325    -   REPLY: "If you want me to drop it, I'll drop it." 
     326        ACTIONS: 
     327        -   fail_quest: 
     328            - fedex 
     329        GOTO: drop_quest 
     330         
     331    -   REPLY: "No, I can't drop it.  I have to talk to the authorities" 
     332        GOTO: report_to_boss 
     333         
     334-   ID: drop_quest 
     335    SAY: "Drop it.  It's bigger than than both of us." 
     336    RESPONSES: 
     337    -   REPLY: "Consider it dropped.  How about a date?" 
     338        GOTO: end 
     339         
     340-   ID: accuse_bart 
     341    SAY: "The town drunk???  ...really?  Anyway... I don't want to know.  He's\ 
     342       \ dead.  I knew his big mouth and goofy ideas were going to get him in\ 
     343       \ trouble.  Just drop it, please." 
     344    RESPONSES: 
     345    -   REPLY: "You can't just allow folks to murder people! It's wrong!\ 
     346           \ Someone must be informed!" 
     347        GOTO: report_to_boss 
     348         
     349    -   REPLY: "If you want me to, I'll forget about the whole thing..." 
     350        GOTO: give_up_quest 
     351         
     352-   ID: accuse_matti 
     353    SAY: "Matti?  He looks mean, but I don't think he would hurt a fly.\ 
     354       \ Anyway...  I don't want to know.  He's dead. He saved me you, know.  I\ 
     355       \ guess he needed to pay more attention to himself.  Just drop it,\ 
     356       \ please." 
     357    RESPONSES: 
     358    -   REPLY: "You can't just allow folks to murder people! It's wrong!\ 
     359           \ Someone must be informed!" 
     360        GOTO: report_to_boss 
     361         
     362    -   REPLY: "If you want me to, I'll forget about the whole thing..." 
     363        GOTO: give_up_quest 
     364         
     365-   ID: report_accident 
     366    SAY: "An accident?  That's... convenient.  For someone." 
     367    RESPONSES: 
     368    -   REPLY: "Well, uh, you know.  It's a dangerous world.  I guess he\ 
     369           \ slipped and fell in the cistern." 
     370        GOTO: old_pals 
     371         
     372-   ID: report_to_boss 
     373    SAY: "You can talk to Kimmo, but I don't think you'll find the justice you\ 
     374       \ are looking for." 
     375    RESPONSES: 
     376    -   REPLY: "Maybe.  But I have to try, right?  Otherwise, we are no better\ 
     377           \ than wild animals." 
     378        GOTO: end 
     379         
     380-   ID: explain_boots 
     381    SAY: "The boots were a signal that he should leave town... that he'd gone\ 
     382       \ too far this time." 
     383    RESPONSES: 
     384    -   REPLY: "You knew about this?  Who do you think killed him?" 
     385        ACTIONS: 
     386        -   set_quest_value: *id001 
     387        GOTO: discuss_murder 
     388         
     389    -   REPLY: "I think I know who killed him." 
     390        ACTIONS: 
     391        -   set_quest_value: *id001 
     392        GOTO: discuss_murder 
     393         
     394-   ID: dead_pekko 
     395    SAY: "He's dead?  Well, I'm too late then. I guess you can keep the boots,\ 
     396       \ then." 
     397    RESPONSES: 
     398    -   REPLY: "What boots?" 
     399        CONDITION: "not quest['fedex'].getValue('open_box')" 
     400        ACTIONS: 
     401        -   take_stuff: 
     402            - boots 
     403        GOTO: boot_gift 
     404         
     405    -   REPLY: "Yeah, I figured he wouldn't need them.  Why did you send him\ 
     406           \ boots, anyway?" 
     407        CONDITION: "quest['fedex'].getValue('open_box')" 
     408        GOTO: explain_boots 
     409         
     410    -   REPLY: "Does this mean no beaver pelt?" 
     411        GOTO: no_beaver_pelt 
     412         
     413-   ID: no_beaver_pelt 
     414    SAY: "No pelt." 
     415    RESPONSES: 
     416    -   REPLY: "Awwwwww..." 
     417        GOTO: back 
     418         
     419-   ID: give_back_boots 
     420    SAY: "Give me that back!" 
     421    RESPONSES: 
     422    -   REPLY: "Here" 
     423        CONDITION: "pc.hasItem(\"Boots\")" 
     424        ACTIONS: 
     425        -   restart_quest: 
     426            - fedex 
     427        GOTO: rewrap_box 
     428         
     429    -   REPLY: "I seem to have... misplaced them..." 
     430        CONDITION: "not pc.hasItem(\"Boots\")" 
     431        GOTO: lost_boots 
     432         
     433-   ID: lost_boots 
     434    SAY: "WHAT!?" 
     435    RESPONSES: 
     436    -   REPLY: "I, uh, go search them" 
     437        GOTO: end 
     438         
     439-   ID: rewrap_box 
     440    SAY: "[Janie takes boots from PC and rewraps them].  Now, here.  And don't\ 
     441       \ open it again." 
     442    RESPONSES: 
     443    -   REPLY: "OK, It will never happen again." 
     444        GOTO: old_pals 
     445         
     446-   ID: gratitude 
     447    SAY: "Well aren't you just a thick slice of awesome." 
     448    RESPONSES: 
     449    -   REPLY: "I try, I try." 
     450        GOTO: old_pals 
     451         
     452-   ID: rude_comeon 
     453    SAY: "[fondles weapon] I hope you can take it as well as you give it..." 
     454    RESPONSES: 
     455    -   REPLY: "Any way you want it, that's the way you need it!" 
     456        GOTO: end 
     457         
     458... 
Note: See TracChangeset for help on using the changeset viewer.