Add YAML-driven quest system with context-aware offering:
Core Implementation:
- Quest data models (Quest, QuestObjective, QuestReward, QuestTriggers)
- QuestService for YAML loading and caching
- QuestEligibilityService with level, location, and probability filtering
- LoreService stub (MockLoreService) ready for Phase 6 Weaviate integration
Quest Content:
- 5 example quests across difficulty tiers (2 easy, 2 medium, 1 hard)
- Quest-centric design: quests define their NPC givers
- Location-based probability weights for natural quest offering
AI Integration:
- Quest offering section in npc_dialogue.j2 template
- Response parser extracts [QUEST_OFFER:quest_id] markers
- AI naturally weaves quest offers into NPC conversations
API Endpoints:
- POST /api/v1/quests/accept - Accept quest offer
- POST /api/v1/quests/decline - Decline quest offer
- POST /api/v1/quests/progress - Update objective progress
- POST /api/v1/quests/complete - Complete quest, claim rewards
- POST /api/v1/quests/abandon - Abandon active quest
- GET /api/v1/characters/{id}/quests - List character quests
- GET /api/v1/quests/{quest_id} - Get quest details
Frontend:
- Quest tracker sidebar with HTMX integration
- Quest offer modal for accept/decline flow
- Quest detail modal for viewing progress
- Combat service integration for kill objective tracking
Testing:
- Unit tests for Quest models and serialization
- Integration tests for full quest lifecycle
- Comprehensive test coverage for eligibility service
Documentation:
- Reorganized docs into /docs/phases/ structure
- Added Phase 5-12 planning documents
- Updated ROADMAP.md with new structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
144 lines
4.7 KiB
YAML
144 lines
4.7 KiB
YAML
# Missing Shipment - Investigation and exploration quest
|
|
quest_id: quest_missing_shipment
|
|
name: "The Missing Shipment"
|
|
description: |
|
|
A shipment of dwarven goods, including rare ale and tools, never
|
|
arrived from the mountain passes. The merchant who was transporting
|
|
it has not been seen in days. Something must have happened on the road.
|
|
difficulty: medium
|
|
|
|
# NPC Quest Givers
|
|
quest_giver_npc_ids:
|
|
- npc_grom_ironbeard
|
|
- npc_blacksmith_hilda
|
|
quest_giver_name: "Grom Ironbeard"
|
|
|
|
# Location context
|
|
location_id: crossville_tavern
|
|
region_id: crossville
|
|
|
|
# Offering conditions
|
|
offering_triggers:
|
|
location_types: ["tavern", "shop"]
|
|
specific_locations: ["crossville_tavern", "crossville_forge"]
|
|
min_character_level: 4
|
|
max_character_level: 10
|
|
required_quests_completed:
|
|
- quest_cellar_rats # Must have helped Grom before
|
|
probability_weights:
|
|
tavern: 0.30
|
|
shop: 0.25
|
|
|
|
# NPC-specific offer dialogue
|
|
npc_offer_dialogues:
|
|
npc_grom_ironbeard:
|
|
dialogue: |
|
|
*polishes glass nervously* My cousin Durgin was supposed to
|
|
arrive three days ago with a shipment from the mountain holds.
|
|
Dwarven stout, quality ore, fine tools. He's never late.
|
|
*voice drops* Something's happened on the mountain road.
|
|
I'm too old to go myself, but I'll pay well for news of him.
|
|
conditions:
|
|
min_relationship: 50
|
|
required_flags: ["completed_cellar_rats"]
|
|
forbidden_flags: []
|
|
|
|
npc_blacksmith_hilda:
|
|
dialogue: |
|
|
*frowns at empty shelves* My shipment of dwarven ore never
|
|
arrived. Durgin Stonefoot was bringing it - he's Grom's cousin.
|
|
Without that ore, I can't forge anything worth selling.
|
|
The mountain road can be dangerous... would you look into it?
|
|
conditions:
|
|
min_relationship: 40
|
|
required_flags: []
|
|
forbidden_flags: []
|
|
|
|
# What NPCs know
|
|
npc_quest_knowledge:
|
|
npc_grom_ironbeard:
|
|
- "Durgin always takes the north pass - it's longer but safer"
|
|
- "He travels with two guards and a pack mule"
|
|
- "The shipment is worth at least 500 gold"
|
|
- "There have been rumors of strange creatures in the mountains lately"
|
|
npc_blacksmith_hilda:
|
|
- "Durgin is reliable - never missed a delivery in 15 years"
|
|
- "The ore he brings is from the deep mines - best quality"
|
|
- "Grom is worried sick about his cousin"
|
|
|
|
# Embedded lore
|
|
lore_context:
|
|
backstory: |
|
|
Durgin Stonefoot has been making the mountain crossing for years,
|
|
bringing goods from the dwarven holds to the human settlements
|
|
below. He's a seasoned traveler who knows every rock and crevice
|
|
of the mountain road.
|
|
world_connections:
|
|
- "The mountain passes have seen increased monster activity"
|
|
- "Trade routes between dwarves and humans are vital to both economies"
|
|
regional_hints:
|
|
- "The north pass winds through old ruins from the First Age"
|
|
- "Travelers speak of hearing strange howls at night"
|
|
|
|
# Narrative hooks
|
|
dialogue_templates:
|
|
narrative_hooks:
|
|
- "mentions family connection to the missing merchant"
|
|
- "worries about more than just the lost goods"
|
|
- "offers personal items as a bonus reward"
|
|
- "knows something about the mountain dangers"
|
|
ambient_hints:
|
|
- "Empty barrels line the cellar where shipments should be"
|
|
- "Other merchants discuss avoiding the mountain road"
|
|
|
|
# Objectives
|
|
objectives:
|
|
- objective_id: search_road
|
|
description: "Search the mountain road for signs of the shipment"
|
|
objective_type: travel
|
|
required_progress: 1
|
|
target_location_id: mountain_pass
|
|
|
|
- objective_id: find_durgin
|
|
description: "Discover what happened to Durgin"
|
|
objective_type: discover
|
|
required_progress: 1
|
|
target_location_id: durgin_campsite
|
|
|
|
- objective_id: recover_goods
|
|
description: "Recover the missing goods (if possible)"
|
|
objective_type: collect
|
|
required_progress: 1
|
|
target_item_id: dwarven_shipment
|
|
|
|
# Rewards
|
|
rewards:
|
|
gold: 150
|
|
experience: 300
|
|
items:
|
|
- dwarven_ale_keg
|
|
relationship_bonuses:
|
|
npc_grom_ironbeard: 15
|
|
npc_blacksmith_hilda: 10
|
|
unlocks_quests: ["quest_mountain_menace"]
|
|
reveals_locations: ["mountain_pass", "durgin_campsite"]
|
|
|
|
# Completion dialogue
|
|
completion_dialogue:
|
|
npc_grom_ironbeard: |
|
|
*relief floods his face* Durgin is alive? Thank the ancestors!
|
|
*takes the recovered goods* And you brought back what you could.
|
|
You've done more than I could ask. Here's your payment, and...
|
|
*pulls out a small flask* ...my personal reserve. Drink it in
|
|
good health, friend.
|
|
|
|
npc_blacksmith_hilda: |
|
|
*examines the recovered ore* This will do nicely. Thank you
|
|
for finding out what happened. Poor Durgin - I hope he recovers.
|
|
You've earned both coin and my gratitude.
|
|
|
|
tags:
|
|
- investigation
|
|
- exploration
|
|
- story
|