## Complete Quest Example: "Clear the Rats" > **Filenames are IDs.** Every mob/object/room file below has no `id:` field — its filename is its ID (e.g. `quest_giver.yaml` → `quest_giver`). Nested `- id:` under a room's `objects:`/`mobs:` are references and stay. ### 1. Quest giver mob (`data/mobs/quest_giver.yaml`) ```yaml name: "Elder" unique: true protected: true idle_descriptions: - "mutters about the rat infestation" 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.\"" 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.\"" 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!\"" ``` Talk configs are inline on the mob under the `talk:` key. No separate behavior file needed. ### 2. Rat mobs (`data/mobs/rat.yaml`) ```yaml name: "giant rat" combat: kind: combat aggressive: true attack_types: [crush] respawn_ticks: 60 stats: attack: 2 strength: 1 defense: 1 hp: 3 speed: 4 drops: remains: "rat bones" ``` ### 3. Cellar room (`data/rooms/20.yaml`) ```yaml name: "Cellar" description: "A damp, dark cellar. The floor scuttles with movement." exits: east: 1 mobs: - "rat" - "rat" - "rat" - "rat" - "rat" ``` ### 4. Room 1 with quest giver (`data/rooms/1.yaml`) ```yaml name: "Town Square" description: "Cobblestone paths lead in all directions. The Elder stands near the fountain." exits: west: 20 north: 2 mobs: - "quest_giver" objects: - id: lumby_fountain ``` ---