Changeset 683 for trunk


Ignore:
Timestamp:
12/06/10 04:52:04 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Patched the dialogue files and renamed the (increase|decrease|set)_quest_value DialogueAction? keywords to (increase|decrease|set)_quest_variable. I updated the dialogueactions.py module a few patches ago, but forgot to update the dialogue files!
  • Fixed a bug in the YamlDialogueParser? class in the dialogueparsers.py module that prevented DialogueActions? with a single argument from being correctly parsed; the "keyword: argument" form for declaring DialogueActions? should now be correctly parsed.
Location:
trunk/game
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/dialogue/camilla.yaml

    r668 r683  
    121121           \ say anything about where he was going or what he was doing?" 
    122122        ACTIONS: 
    123         -   set_quest_value: 
     123        -   set_quest_variable: 
    124124                quest: fedex 
    125125                value: true 
  • trunk/game/dialogue/crazy_swede.yaml

    r668 r683  
    8686    -   REPLY: "You got a problem?  Hit in the head during the war?" 
    8787        ACTIONS: 
    88         -   set_quest_value: &id001 
     88        -   set_quest_variable: &id001 
    8989                quest: beer 
    9090                value: 0 
     
    141141    -   REPLY: "You are totally insane." 
    142142        ACTIONS: 
    143         -   set_quest_value: *id001 
     143        -   set_quest_variable: *id001 
    144144        GOTO: permanent_failure 
    145145         
     
    174174        -   take_stuff: 
    175175            - Yeast 
    176         -   set_quest_value: 
     176        -   set_quest_variable: 
    177177                quest: beer 
    178178                value: 0 
     
    192192    -   REPLY: "1000 years?" 
    193193        ACTIONS: 
    194         -   set_quest_value: *id001 
     194        -   set_quest_variable: *id001 
    195195        GOTO: permanent_failure 
    196196         
  • trunk/game/dialogue/drunkard.yaml

    r668 r683  
    166166           \ the snow melts?" 
    167167        ACTIONS: 
    168         -   set_quest_value: 
     168        -   set_quest_variable: 
    169169                quest: fedex 
    170170                value: 1 
     
    276276           \ know why." 
    277277        ACTIONS: 
    278         -   set_quest_value: &id001 
     278        -   set_quest_variable: &id001 
    279279                quest: fedex 
    280280                value: bart 
     
    296296    -   REPLY: "I don't think so, I think it was you.  The question is, why?" 
    297297        ACTIONS: 
    298         -   set_quest_value: *id001 
     298        -   set_quest_variable: *id001 
    299299        GOTO: accuse_bart 
    300300         
     
    322322        CONDITION: "not quest['fedex'].isGoalValue('got_drunkards_coat')" 
    323323        ACTIONS: 
    324         -   set_quest_value: 
     324        -   set_quest_variable: 
    325325                quest: fedex 
    326326                value: 1 
     
    410410    -   REPLY: "Alright.. What she doesn't know can't hurt her." 
    411411        ACTIONS: 
    412         -   set_quest_value: &id002 
     412        -   set_quest_variable: &id002 
    413413                quest: fedex 
    414414                value: true 
     
    425425           \ tell what really happened." 
    426426        ACTIONS: 
    427         -   set_quest_value: *id002 
     427        -   set_quest_variable: *id002 
    428428        GOTO: bart_confess 
    429429         
  • trunk/game/dialogue/farmer.yaml

    r668 r683  
    3737           \ quest['beer'].isGoalValue('farmer_beer_convinced')" 
    3838        ACTIONS: 
    39         -   set_quest_value: &id001 
     39        -   set_quest_variable: &id001 
    4040                quest: beer 
    4141                value: 1 
     
    8282    -   REPLY: "Because Jacob is the only guy here grumpier than you!" 
    8383        ACTIONS: 
    84         -   set_quest_value: *id001 
     84        -   set_quest_variable: *id001 
    8585        GOTO: help_beer 
    8686         
     
    9797        -   take_stuff: 
    9898            - Grain 
    99         -   set_quest_value: 
     99        -   set_quest_variable: 
    100100                quest: beer 
    101101                value: 0 
  • trunk/game/dialogue/fguard.yaml

    r668 r683  
    184184           \ quest['fedex'].isGoalValue('found_pekko')" 
    185185        ACTIONS: 
    186         -   set_quest_value: 
     186        -   set_quest_variable: 
    187187                quest: fedex 
    188188                value: true 
     
    200200           \ quest['fedex'].getValue('accused_of_murder')" 
    201201        ACTIONS: 
    202         -   set_quest_value: &id001 
     202        -   set_quest_variable: &id001 
    203203                quest: fedex 
    204204                value: true 
     
    295295    -   REPLY: "It was Bart." 
    296296        ACTIONS: 
    297         -   set_quest_value: 
     297        -   set_quest_variable: 
    298298                quest: fedex 
    299299                value: bart 
     
    303303    -   REPLY: "It was Matti, the Snow Shoveler!" 
    304304        ACTIONS: 
    305         -   set_quest_value: 
     305        -   set_quest_variable: 
    306306                quest: fedex 
    307307                value: matti 
     
    311311    -   REPLY: "I think it was an accident." 
    312312        ACTIONS: 
    313         -   set_quest_value: 
     313        -   set_quest_variable: 
    314314                quest: fedex 
    315315                value: '' 
     
    384384    -   REPLY: "You knew about this?  Who do you think killed him?" 
    385385        ACTIONS: 
    386         -   set_quest_value: *id001 
     386        -   set_quest_variable: *id001 
    387387        GOTO: discuss_murder 
    388388         
    389389    -   REPLY: "I think I know who killed him." 
    390390        ACTIONS: 
    391         -   set_quest_value: *id001 
     391        -   set_quest_variable: *id001 
    392392        GOTO: discuss_murder 
    393393         
  • trunk/game/dialogue/innkeeper.yaml

    r668 r683  
    233233    -   REPLY: "I think Bart, the drunkard killed him." 
    234234        ACTIONS: 
    235         -   set_quest_value: 
     235        -   set_quest_variable: 
    236236                quest: fedex 
    237237                value: bart 
     
    241241    -   REPLY: "I think that dim-witted Matti killed him." 
    242242        ACTIONS: 
    243         -   set_quest_value: 
     243        -   set_quest_variable: 
    244244                quest: fedex 
    245245                value: matti 
  • trunk/game/dialogue/leader.yaml

    r668 r683  
    4949        CONDITION: "quest['fedex'].getValue('accused_of_murder')" 
    5050        ACTIONS: 
    51         -   set_quest_value: &id001 
     51        -   set_quest_variable: &id001 
    5252                quest: fedex 
    5353                value: true 
     
    207207           \ quest['fedex'].getValue('murder_reported_to_kimmmo')" 
    208208        ACTIONS: 
    209         -   set_quest_value: &id002 
     209        -   set_quest_variable: &id002 
    210210                quest: fedex 
    211211                value: matti 
     
    366366    -   REPLY: "I mean, no one seems to know where I can find him." 
    367367        ACTIONS: 
    368         -   set_quest_value: 
     368        -   set_quest_variable: 
    369369                quest: fedex 
    370370                value: true 
     
    434434    -   REPLY: "Yes.  I am sure that Bart killed your brother." 
    435435        ACTIONS: 
    436         -   set_quest_value: 
     436        -   set_quest_variable: 
    437437                quest: fedex 
    438438                value: true 
     
    455455    -   REPLY: "I found his body in the cistern." 
    456456        ACTIONS: 
    457         -   set_quest_value: *id001 
     457        -   set_quest_variable: *id001 
    458458        GOTO: pekko_murdered 
    459459         
     
    484484    -   REPLY: "I think it must be Matti, the snow shoveler." 
    485485        ACTIONS: 
    486         -   set_quest_value: *id002 
     486        -   set_quest_variable: *id002 
    487487        GOTO: accuse_matti 
    488488         
  • trunk/game/dialogue/old_man.yaml

    r680 r683  
    1818START_SECTION: main_dialogue 
    1919SECTIONS: 
    20     - ID: main_dialogue 
    21       SAY: "The old man looks up at you from his chair with a dazed look 
    22         upon his face. 
     20-   ID: main_dialogue 
     21    SAY: "The old man looks up at you from his chair with a dazed look upon\ 
     22       \ his face.\n\"...Lucy?\"" 
     23    ACTIONS: 
     24    -   meet: 
     25        - old_man 
     26    RESPONSES: 
     27    -   REPLY: "Who's Lucy?" 
     28        GOTO: help_find_lucy 
    2329         
    24         \"...Lucy?\"" 
    25       ACTIONS: 
    26         - meet: old_man 
    27       RESPONSES: 
    28         - REPLY: "Who's Lucy?" 
    29           GOTO: help_find_lucy 
     30    -   REPLY: "I found your ring." 
     31        CONDITION: "quest.hasActiveQuest('memories') and\ 
     32           \ pc.inventory.hasItem('RustyWeddingRing')" 
     33        ACTIONS: 
     34        -   give_stuff: 
     35            - RustyWeddingRing 
     36        -   complete_quest: 
     37            - memories 
     38        GOTO: good_memories 
    3039         
    31         - REPLY: "I found your ring." 
    32           CONDITION: "quest.hasActiveQuest('memories') and 
    33             pc.inventory.hasItem('RustyWeddingRing')" 
    34           ACTIONS: 
    35             - give_stuff: 
    36                 - RustyWeddingRing 
    37             - complete_quest: memories 
    38           GOTO: good_memories 
     40    -   REPLY: "I don't have time for your delusions old man!" 
     41        GOTO: parting_shot 
    3942         
    40         - REPLY: "I don't have time for your delusions old man!" 
    41           GOTO: parting_shot 
    42      
    43     - ID: good_memories 
    44       SAY: "An intense expression of joy spreads across the old man's face 
    45         as you hand him the rusty wedding ring. He tries to mouth a 
    46         word of thanks but is so overcome that no words come out. The old 
    47         man begins caressing the ring, oblivious to the decay and rot of 
    48         the world around him." 
    49       RESPONSE: 
    50         - REPLY: "[Walk away.]" 
    51           GOTO: end 
    52      
    53     - ID: help_find_lucy 
    54       SAY: "The old man looks at you expectedly. 
     43-   ID: good_memories 
     44    SAY: "An intense expression of joy spreads across the old man's face as\ 
     45       \ you hand him the rusty wedding ring. He tries to mouth a word of\ 
     46       \ thanks but is so overcome that he cannot utter a sound. The old man\ 
     47       \ begins caressing the ring, oblivious to the decay and rot of the\ 
     48       \ world around him." 
     49    RESPONSES: 
     50    -   REPLY: "[Walk away.]" 
     51        GOTO: end 
    5552         
    56         \"Can you help me find Lucy?\"" 
    57       RESPONSES: 
    58         - REPLY: "Where is Lucy?" 
    59           GOTO: rusted_lockbox 
     53-   ID: help_find_lucy 
     54    SAY: "The old man looks at you expectedly.\n\"Can you help me find\ 
     55       \ Lucy?\"" 
     56    RESPONSES: 
     57    -   REPLY: "Where is Lucy?" 
     58        GOTO: rusted_lockbox 
    6059         
    61         - REPLY: "I have better things to do." 
    62           GOTO: parting_shot 
    63      
    64     - ID: rusted_lockbox 
    65       SAY: "The old man gazes over his shoulder to the far side of the 
    66         shanty where a metal lockbox rests on the floor. 
     60    -   REPLY: "I have better things to do." 
     61        GOTO: parting_shot 
    6762         
    68         \"Can't open it any more... rusted...\"" 
    69       RESPONSES: 
    70         - REPLY: "I'll see what I can do." 
    71           ACTIONS: 
    72             - start_quest: memories 
    73           GOTO: parting_shot 
     63-   ID: rusted_lockbox 
     64    SAY: "The old man gazes over his shoulder to the far side of the shanty\ 
     65       \ where a metal lockbox rests on the floor.\n\"Can't open it any\ 
     66       \ more... rusted...\"" 
     67    RESPONSES: 
     68    -   REPLY: "I'll see what I can do." 
     69        ACTIONS: 
     70        -   start_quest: 
     71            - memories 
     72        GOTO: parting_shot 
    7473         
    75         - REPLY: "Fix your own problems, old man!" 
    76           ACTIONS: 
    77           GOTO: parting_shot 
    78      
    79     - ID: parting_shot 
    80       SAY: "The old man sighs and begins to stare remorsefully at the 
    81         smouldering embers in the fireplace." 
    82       RESPONSES: 
    83         - REPLY: "[Walk away.]" 
    84           GOTO: end 
    85      
     74    REPLY: "Fix your own problems, old man!" 
     75        GOTO: parting_shot 
     76         
     77-   ID: parting_shot 
     78    SAY: "The old man sighs and begins to stare remorsefully at the\ 
     79       \ smouldering embers in the fireplace." 
     80    RESPONSES: 
     81    -   REPLY: "[Walk away.]" 
     82        GOTO: end 
     83         
     84... 
  • trunk/game/dialogue/quartermaster.yaml

    r668 r683  
    4343           \ quest['fedex'].isGoalValue('found_pekko')" 
    4444        ACTIONS: 
    45         -   set_quest_value: 
     45        -   set_quest_variable: 
    4646                quest: fedex 
    4747                value: true 
  • trunk/game/dialogue/quest_sample.yaml

    r668 r683  
    3838           \ quest['beer'].isGoalValue(\"beer_gathered\")" 
    3939        ACTIONS: 
    40         -   increase_quest_value: 
     40        -   increase_quest_variable: 
    4141                quest: beer 
    4242                value: 1 
  • trunk/game/dialogue/snowshoveler.yaml

    r668 r683  
    3232        CONDITION: "quest['fedex'].getValue('accused_of_murder') == 'matti'" 
    3333        ACTIONS: 
    34         -   set_quest_value: 
     34        -   set_quest_variable: 
    3535                quest: fedex 
    3636                value: '' 
     
    109109    -   REPLY: "I don't really see how it could be anyone else..." 
    110110        ACTIONS: 
    111         -   set_quest_value: 
     111        -   set_quest_variable: 
    112112                quest: fedex 
    113113                value: matti 
  • trunk/game/scripts/dialogueparsers.py

    r680 r683  
    154154                               file_contents) 
    155155        lines = file_contents.splitlines() 
    156         max_line_length = 79 
     156        max_line_length = 76 # 79 - 3 chars for escaping newlines 
    157157        for i in range(len(lines)): 
    158158            line = lines[i] 
     
    172172                ) 
    173173                new_lines = text_wrapper.wrap(line) 
    174                 new_lines = new_lines[:1] + [re.sub(r'^(\s*) (.*)$', 
    175                                                    r'\1\ \2', l) for l in 
    176                                              new_lines[1:]] 
     174                new_lines = ( 
     175                    new_lines[:1] + [re.sub(r'^(\s*) (.*)$', r'\1\ \2', l) 
     176                                     for l in new_lines[1:]] 
     177                ) 
    177178                lines[i] = '\\\n'.join(new_lines) 
    178179         
     
    409410              isinstance(arguments, basestring)): 
    410411            # Got a single positional argument. 
    411             args = (arguments) 
     412            args = (arguments,) 
    412413            kwargs = {} 
    413414        elif (not len(arguments) == 2 or not isinstance(arguments[1], dict)): 
Note: See TracChangeset for help on using the changeset viewer.