diff options
Diffstat (limited to 'worldbuilding_guide/quests.md')
| -rw-r--r-- | worldbuilding_guide/quests.md | 88 |
1 files changed, 42 insertions, 46 deletions
diff --git a/worldbuilding_guide/quests.md b/worldbuilding_guide/quests.md index 443aa6b..b5f18fa 100644 --- a/worldbuilding_guide/quests.md +++ b/worldbuilding_guide/quests.md @@ -4,9 +4,45 @@ ```yaml id: "quest_giver" name: "Elder" -behavior: rat_quest_talk unique: true protected: true +talk: + nodes: + start: + message: "\"Rats! Rats everywhere in the cellar. Clear them out and I'll reward you.\"" + options: + - text: "\"I'll handle it.\"" + goto: accept_quest + condition: + player_flag: rat_quest + not: true + - text: "\"I killed the rats.\"" + goto: turn_in + condition: + player_flag: rat_quest + value: started + - text: "\"Goodbye.\"" + end: true + + accept_quest: + message: "\"Good lad. The cellar is west of here. Come back when they're dead.\"" + action: + set_player_flags: + rat_quest: started + options: + - text: "\"On my way.\"" + end: true + + turn_in: + message: "\"You did it! The village owes you a debt. Here — take this.\"" + action: + give_item: rusty_sword + set_player_flags: + rat_quest: complete + heal: 10 + options: + - text: "\"Thanks!\"" + end: true attack: 1 strength: 1 defense: 1 @@ -14,52 +50,12 @@ hp: 20 speed: 5 aggressive: false idle_descriptions: - - "mutters about the rat infestation" + - "mutters about the rat infestation" ``` -### 2. Dialog behavior (`data/behaviors/rat_quest_talk.yaml`) -```yaml -id: rat_quest_talk -type: talk -nodes: - start: - message: "\"Rats! Rats everywhere in the cellar. Clear them out and I'll reward you.\"" - options: - - text: "\"I'll handle it.\"" - goto: accept_quest - condition: - player_flag: rat_quest - not: true - - text: "\"I killed the rats.\"" - goto: turn_in - condition: - player_flag: rat_quest - value: started - - text: "\"Goodbye.\"" - end: true - - accept_quest: - message: "\"Good lad. The cellar is west of here. Come back when they're dead.\"" - action: - set_player_flags: - rat_quest: started - options: - - text: "\"On my way.\"" - end: true - - turn_in: - message: "\"You did it! The village owes you a debt. Here — take this.\"" - action: - give_item: rusty_sword - set_player_flags: - rat_quest: complete - heal: 10 - options: - - text: "\"Thanks!\"" - end: true -``` +Talk configs are inline on the mob under the `talk:` key. No separate behavior file needed. -### 3. Rat mobs (`data/mobs/rat.yaml`) +### 2. Rat mobs (`data/mobs/rat.yaml`) ```yaml id: "rat" name: "giant rat" @@ -74,7 +70,7 @@ drops: remains: "rat bones" ``` -### 4. Cellar room (`data/rooms/20.yaml`) +### 3. Cellar room (`data/rooms/20.yaml`) ```yaml id: 20 name: "Cellar" @@ -89,7 +85,7 @@ mobs: - "rat" ``` -### 5. Room 1 with quest giver (`data/rooms/1.yaml`) +### 4. Room 1 with quest giver (`data/rooms/1.yaml`) ```yaml id: 1 name: "Town Square" |
