Quest Tree
  • Quest Tree Documentation
  • đŸ•šī¸Quick Start
    • Installation
    • Start Editing
  • 🎓Tutorials
    • Videos
    • Example Scenes
  • 🧩Components
    • Core Defaults
      • Quest Tree Initializer
      • Quest Tree Sync
      • General Dialogue
      • Default Quest Provider
    • Default UI
      • Default Choice Button
      • Default Dialogue Window
      • Default Dialogue Window Triggerer
      • Default Input Handler
      • Default Item Slot
      • Default Memorable Message
      • Default Quest Foldout
      • Default Quest Foldout Item
      • Default Quest HUD
      • Default Quest HUD Item
      • Default Quest Message UI
      • Default Quest Window
      • NPC World Canvas Handler
    • World Triggers
      • World Dialogue Trigger
      • World Quest Completer
      • World Quest Failer
      • World Quest Receiver
      • World Requirement Trigger
  • âš™ī¸Systems
    • Quest Tree
      • Editor Window
      • Quest Types Editor
      • Settings
      • Character
      • Items
        • Item
    • Dialogue Tree
      • Editor Window
        • Nodes
          • Dialogue Node
          • Choices Node
          • Receive Node
          • Complete Node
          • Trigger Node
          • Boolean (If) Node
      • Settings
      • Quest Dialogue
      • General Dialogue
  • 📄Scripting
    • Quests
      • Getting Quests
        • Quest Find Settings
      • Working with Quests
        • Quest Types
        • Child Quests
        • Quest NPCs
        • Requirements
      • Managing Quest States
    • Dialogue
      • Getting Dialogue
      • Dialogue Graph
        • Working With the Graph
    • Initialization
    • Disconnect
    • Syncing
    • Events
    • Saving/Loading
    • Player Recognition
    • Choices
    • Items
      • Rewards
        • Managing Granted Rewards
    • Characters
    • Requirements Manager
    • Procedural Generation
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
  • ⭐Rate Me?
Powered by GitBook
On this page
  • Quest States
  • Changing States
  1. Scripting
  2. Quests

Managing Quest States

PreviousRequirementsNextDialogue

Last updated 5 months ago

Quest states change the way a quest is treated. For example, a quest with the state Abandoned cannot be accepted again (unless the state is somehow changed).

Quest States

Name
Description

Locked

The quest cannot be accepted and shouldn't be viewed to the player.

Unlocked

The quest can be accepted and thus, should be viewed to the player.

Accepted

The quest should be on the players active quest list and the player must work towards completing the quest.

RequirementsComplete

All requirements of the quest are completed, but not the quest itself. This is similar to the Accepted state as the quest should still be in the players active quest list (marked as completed). The player must "hand in" the quest to an entity to officially complete the quest.

Completed

The quest is completed; rewards should be granted and it should be removed from the players active quest list.

Abandoned

The player decided to abandon this quest. removing it from their active quest list while still incomplete.

Failed

The player reached a point in the game where the quest can no longer be completed. It is removed from the players active quest list while still incomplete.

Changing States

A new quest is always in the Locked state unless altered manually. Quest states can be changed from the quest itself. Before editing quests, ensure that the quest already exists in the database (usually true unless your creating quests at runtime). If you've set up QT with the , quest states will be handled automatically. However, the below information is still good to understand.

It's recommended to use the 'Try' methods to change states, as quests may need to run some checks to see if it makes sense for the quest to change to a new state. These methods return true or false, depending on if the state was successfully changed or not.

Unlocking a Quest

Since quests have a level requirement, you may need to provide the player level.

quest.TryUnlock(myPlayerLevel);

Accepting a Quest

quest.TryAccept(myPlayerLevel);

Completing Quest Requirements

To set a quest to the RequirementComplete state, you can either literally complete all quest requirements or call ForceCompleteRequirements. If a quest has autoCompleteEnabled set to true, the state will be set to Complete rather than RequirementsComplete.

quest.ForceCompleteRequirements();

Completing a Quest

A quest may not be marked as complete if its requirements are incomplete.

quest.TryComplete();

Abandoning a Quest

quest.TryAbandon();

Failing a Quest

quest.TryFail();
📄
default method