source: trunk/game/dialogue/old_man.yaml @ 680

Revision 680, 2.8 KB checked in by technomage, 9 years ago (diff)

Patch by Technomage

  • Updated/wrote code documentation for the core dialogue subsystem modules dialogue.py, dialogueengine.py, dialogueactions.py, and dialogueparsers.py.
  • Updated/created flowcharts and UML diagrams explaining the new DialogueEngine? and how it functions.
  • Made a few minor changes to the dialoguegui.py module to make the class logger less visible.
  • Removed the "this is a sample dialogue file" crud from the old_man.yaml test dialogue file.
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: Old Man
17AVATAR_PATH: gui/icons/crazy_swede.png
18START_SECTION: main_dialogue
19SECTIONS:
20    - ID: main_dialogue
21      SAY: "The old man looks up at you from his chair with a dazed look
22        upon his face.
23       
24        \"...Lucy?\""
25      ACTIONS:
26        - meet: old_man
27      RESPONSES:
28        - REPLY: "Who's Lucy?"
29          GOTO: help_find_lucy
30       
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
39       
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.
55       
56        \"Can you help me find Lucy?\""
57      RESPONSES:
58        - REPLY: "Where is Lucy?"
59          GOTO: rusted_lockbox
60       
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.
67       
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
74       
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   
Note: See TracBrowser for help on using the repository browser.