source: branches/active/character_customization/game/dialogue/quest_sample.yaml @ 833

Revision 699, 3.0 KB checked in by technomage, 9 years ago (diff)

Patch by Technomage

  • Renamed the default_root_section and root_sections attributes of the Dialogue class to "default_greeting" and "greetings", respectively;
  • Renamed the RootDialogueSection? class to "DialogueGreeting?" for clarity;
  • Renamed the DEFAULT_ROOT_SECTION and ROOT_SECTIONS tags in the YAML dialogue files as "DEFAULT_GREETING" and "GREETINGS", respectively;
  • 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: NPC
17AVATAR_PATH: gui/portraits/npc.png
18DEFAULT_GREETING:
19    ID: main_dialog
20    SAY: "Things are tough around here, let me tell you our problems"
21    RESPONSES:
22    -   REPLY: "Here's your beer"
23        CONDITION: "quest['beer'].isGoalValue(\"beer_gathered\") and not\
24           \ quest.hasFinishedQuest('beer')"
25        ACTIONS:
26        -   complete_quest:
27            - beer
28        GOTO: finish_quest
29       
30    -   REPLY: "No problem (finished quest)"
31        CONDITION: "quest.hasFinishedQuest('beer')"
32        GOTO: main_dialog
33       
34    -   REPLY: "Give me a beer! (Cheater!)"
35        CONDITION: "quest.hasActiveQuest('beer') and not\
36           \ quest.hasFinishedQuest('beer') and not\
37           \ quest['beer'].isGoalValue(\"beer_gathered\")"
38        ACTIONS:
39        -   increase_quest_variable:
40                quest: beer
41                value: 1
42                variable: beer_gathered
43        GOTO: give_beer
44       
45    -   REPLY: "I'm on it"
46        CONDITION: "quest.hasActiveQuest('beer') and not\
47           \ quest.hasFinishedQuest('beer')"
48        GOTO: main_dialog
49       
50    -   REPLY: "Sure, tell me all about it"
51        CONDITION: "not quest.hasActiveQuest('beer') and not\
52           \ quest.hasFinishedQuest('beer')"
53        GOTO: listen_more
54       
55    -   REPLY: "That sounds boring. Bye."
56        GOTO: end
57       
58SECTIONS:
59-   ID: listen_more
60    SAY: "Raiders stole our cattle, our well was poisoned, and the beer is all\
61       \ gone!"
62    RESPONSES:
63    -   REPLY: "I help you"
64        ACTIONS:
65        -   start_quest:
66            - beer
67        GOTO: quest_accept
68       
69    -   REPLY: "Good luck with that"
70        GOTO: end
71       
72    -   REPLY: "Fear not, gentle villager. I will return shortly with the\
73           \ antidote."
74        GOTO: listen_more
75       
76-   ID: quest_accept
77    SAY: "All your beer are belong to us!"
78    RESPONSES:
79    -   REPLY: "Right..."
80        GOTO: main_dialog
81       
82-   ID: give_beer
83    SAY: "Here's your beer..."
84    RESPONSES:
85    -   REPLY: "Thanks."
86        GOTO: main_dialog
87       
88-   ID: finish_quest
89    SAY: "This is the good stuff! *hik*"
90    RESPONSES:
91    -   REPLY: "Sigh"
92        GOTO: main_dialog
93       
94-   ID: stop_quest
95    SAY: "Jerk."
96    RESPONSES:
97    -   REPLY: "That's how they call me!"
98        GOTO: main_dialog
99       
100...
Note: See TracBrowser for help on using the repository browser.