All skills
thedivergentai avatar

/godot-quest-system

@9d6e91e

Expert blueprint for quest tracking systems (objectives, progress, rewards, branching chains) using Resource-based quests, signal-driven updates, and AutoLoad managers. Use when implementing RPG quests or mission systems. Keywords quest, objectives, Quest Resource, QuestObjective, signal-driven, branching, rewards, AutoLoad.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-quest-system

This session only. Nothing lands on disk.

SKILL.md

β‰ˆ87 tokens always: the name and description. β‰ˆ2.4k when used: this file. β‰ˆ1.3k more on demand in 2 files.

MANDATORY loads

  1. quest_resource.gd β€” StringName ids, status, objectives/rewards
  2. quest_manager_singleton.gd β€” accept / progress / complete / chain

Supporting: kill_objective_trigger.gd, quest_ui_tracker.gd, branching_quest_data.gd, quest_giver_dialogue_hook.gd, quest_persistence_loader.gd, timed_quest_challenge.gd, hidden_objective_logic.gd, localized_quest_description.gd, quest_graph_manager.gd, quest_waypoint_helper.gd, quest_conflict_resolver.gd, quest_manager.gd (alt helper β€” prefer singleton).

Golden path

accept β†’ event trigger β†’ progress β†’ complete β†’ persist
Checkpoint Action
Accept QuestManager.accept_quest(quest) β€” duplicate Resource if runtime mutation; connect quest_completed once
Event trigger Kill/collect/talk via trigger nodes / bus β€” not hardcoded in enemy scripts (kill_objective_trigger.gd)
Progress update_objective(quest_id: StringName, …) β€” interned ids only
Complete Manager erases active, emits quest_completed, grants via inventory/economy signals
Disconnect Disconnect completion Callables when quest leaves active set β€” prevent double rewards
Persist Save active/completed id maps + counts (quest_persistence_loader.gd) β€” not live Resource graphs

NEVER Do in Quest Systems

  • NEVER store active quests only on the Player node β€” Autoload / persistent data.
  • NEVER use unverified plain string ids β€” StringName / registry (&"kill_slimes").
  • NEVER forget to disconnect completion signals β€” double rewards.
  • NEVER poll objectives in _process β€” signal-driven.
  • NEVER skip save/load for quest state.
  • NEVER hardcode quest logic inside enemy/item scripts β€” triggers/bus.
  • NEVER award loot inside the Quest Resource β€” emit; inventory/economy grant.
  • NEVER allow duplicate active instances of the same quest id.

Field alignment (StringName)

Across body + scripts use:

  • quest.id: StringName
  • objective_id: StringName
  • Manager dictionaries keyed by StringName
  • Dialogue/quest-giver hooks compare StringName, not free strings

Expert WHY (critical)

CAUTION: objectives.all(...) on arrays with null entries crashes β€” null-check in is_complete() (see quest_resource.gd).

Deep dive (load on demand)

Quest/Objective/Manager/UI walkthroughs and elite patterns β€” references/quest-patterns-deep.md.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain β€” do not preload the whole lattice.

Official Documentation

  • Resources β€” Why quest definitions, objectives, and reward tables belong in reusable Resource assets instead of scene-local scripts.
  • Resource β€” @export, nested Resources, and duplication rules for Inspector-authored quest data and branching chains.
  • Singletons (Autoload) β€” How to register a typed QuestManager that survives scene changes without living on the Player node.
  • Autoloads versus regular nodes β€” When global quest state is justified vs keeping progress on a scene-owned data Resource.
  • Using signals β€” Emit/connect model for quest_accepted / objective_updated without polling in _process().
  • Instancing with signals β€” Wire kill/collect/talk triggers from spawned actors into the manager without hardcoded node paths.
  • Saving games β€” Persist quest IDs and progress counts as dictionaries β€” never serialize live Quest Resource instances.
  • Internationalizing games β€” Store tr() keys on quest Resources so titles/descriptions localize without forked .tres files.
  • Timer β€” Time-limited challenge fail paths via Timer / SceneTree.create_timer timeout signals.
  • Using Containers β€” Reactive VBoxContainer quest trackers that rebuild Labels from manager signals only.
  • StringName β€” Prefer interned IDs for objectives/quests to avoid silent typo failures from plain strings.
  • Scene organization β€” Signal-up / call-down ownership so NPCs and enemies never own quest completion math.

Related Skills

Prerequisites
  • godot-resource-data-patterns β€” Custom Resources, duplication, and Inspector authoring patterns that quest definitions and objective graphs depend on.
  • godot-signal-architecture β€” Typed emit/connect, disconnect hygiene, and EventBus routing for kill/collect triggers without ghost listeners.
  • godot-autoload-architecture β€” Boot order and ownership rules for a singleton QuestManager that outlives scene swaps.
Complements
  • godot-dialogue-system β€” Quest-giver offer/reminder/thanks branches should query quest status and emit accept/complete through dialogue choices.
  • godot-inventory-system β€” Collect objectives and reward grants should delegate item mutations to inventory, not embed stacks in quest scripts.
  • godot-save-load-systems β€” Slot/versioned save pipelines that serialize active/completed quest dictionaries beside player state.
  • godot-ui-containers β€” Layout and rebuild patterns for objective trackers and journal panels driven only by manager signals.
  • godot-economy-system β€” Currency/XP reward sinks after quest completion; keep grant logic out of the Quest Resource itself.
  • godot-monte-carlo-balancer β€” Simulate reward curves, timed-fail rates, and objective difficulty before locking quest economy numbers.
Downstream / consumers
  • godot-rpg-stats β€” Level gates, XP rewards, and stat prerequisites that unlock or complete quest acceptance checks.
  • godot-combat-system β€” Death/defeat events feed kill objectives through a bus instead of enemy scripts calling QuestManager directly.
  • godot-genre-action-rpg β€” Genre composition that consumes quest tracking, dialogue hooks, and reward distribution as one RPG loop.
  • godot-navigation-pathfinding β€” Objective waypoints and compass helpers update NavigationAgent targets when objectives change.
Master
  • godot-master β€” Library router and mirrored module entry; open when discovering which Domain Skill owns quests vs dialogue, inventory, or save.

Source: SKILL.md on GitHub

1 warning16d4 checks Β· Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a robust and well-documented framework for implementing quest systems in the Godot game engine. It utilizes best practices such as Resource-based data management and signal-driven architectures. No malicious patterns, data exfiltration, or injection vulnerabilities were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW Β· No issues

  • Runlayer7mo

    3/3 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-quest-system