wyrt_quests

v1.0.0Progression

Generic quest system with objectives, rewards, and progress tracking

Features

  • YAML-based quest definitions
  • Multiple objective types (kill, collect, talk, explore)
  • Automatic progress tracking
  • Quest chains and prerequisites
  • Reward distribution (XP, items, currency)
  • Quest log with active/completed states
  • Custom objective handlers via registry

Quick Start

// In your game module's initialize():
const questModule = context.getModule('wyrt_quests');
this.questManager = questModule.createQuestManager(context, {
  tableName: 'my_game_quests',
  characterIdField: 'character_id'
});

// Start a quest
await this.questManager.startQuest(playerId, 'first_steps');

// Update objective progress
await this.questManager.updateObjective(playerId, 'kill', 'goblin', 1);

Exports

QuestManager

Main quest management class

ObjectiveRegistry

Register custom objective types

RewardRegistry

Register custom reward handlers

YAMLQuestLoader

Load quests from YAML files