Quest Chains
Overview
Section titled “Overview”Quest chains are sequences of quests that must be completed in order. Each quest in a chain can require completion of a previous quest before it becomes available to the player. This is controlled through the requiredQuestId field, which links quests together into a progression.
Quest Structure
Section titled “Quest Structure”Quests link together through their IDs:
- questId: Unique identifier for the quest
- requiredQuestId: The quest that must be completed before this one unlocks
When a quest has a requiredQuestId, it remains hidden or unavailable until the player completes the prerequisite quest.
Creating a Chain
Section titled “Creating a Chain”- Plan your sequence: Determine the order of quests and their narrative flow
- Assign sequential IDs: Use a consistent ID range for related quests (e.g., 90001, 90002, 90003)
- Set prerequisites: Each subsequent quest references the previous quest’s ID via
requiredQuestId - Define tasks: Specify what the player must do in each quest
- Add strings: Provide localized names and descriptions
Task Types
Section titled “Task Types”Common task types for quest chains:
- visit: Player must travel to a specific area
- hunt: Player must defeat a number of enemies
- collect: Player must gather items
- deliver: Player must bring an item to an NPC
String Associations
Section titled “String Associations”Each quest can have associated strings for localization:
- name: The quest title shown in the quest log
- description: Detailed instructions or narrative text
Strings are defined inline with the quest data and automatically generate the appropriate string sheet entries.
Example: Three-Quest Chain
Section titled “Example: Three-Quest Chain”This example creates a simple quest chain: an introduction quest leads to a hunting quest, which leads to a reward quest.
spec: version: "1.0"
quests: upsert: # Quest 1: Introduction - questId: 90001 type: normal startNpcId: 1001 completeNpcId: 1001 tasks: - type: visit areaNameId: 1 strings: name: "Welcome to the Village" description: "Speak with the village elder."
# Quest 2: The Hunt (requires Quest 1) - questId: 90002 type: normal requiredQuestId: 90001 tasks: - type: hunt npcId: 2001 amount: 10 strings: name: "Clear the Fields" description: "Defeat 10 wolves threatening the village."
# Quest 3: Reward (requires Quest 2) - questId: 90003 type: normal requiredQuestId: 90002 tasks: - type: deliver itemId: 3001 strings: name: "Claim Your Reward" description: "Return to the elder for your reward."Using upsert ensures the operation is idempotent—running the same file multiple times will update existing quests rather than creating duplicates.
Related Documentation
Section titled “Related Documentation”- Quest Data Schema - Complete field reference for quest definitions
- Quest Strings Schema - String sheet format for quest localization