QQ_QuestHandler

QQ_QuestHandler keeps track of a character's current quests.

public QQ_QuestDB questDB The database with all of the quest templates.
public Dictionary<string, QQ_Quest> Quests The list of assigned/given quests, whether inactive, active, completed, or failed.

Assigns a quest from the database to this quest handler.

string name The name of the quest.
handlerReference.AssignQuest("Quest Name");

Returns the quest with the given name.

string name The name of the quest.
QQ_Quest quest = handlerReference.GetQuest("Quest Name");

Returns the task with the given name.

string questName The name of the quest.
string taskName The name of the task.
QQ_Task task = handlerReference.GetTask("Quest Name", "Task Name");

Returns the task with the given id.

string questName The name of the quest.
int id The id of the task.
QQ_Task task = handlerReference.GetTask("Quest Name", 1);

Increases the progress of the task with the given name.

string questName The name of the quest.
string taskName The name of the task.
float amount The amount to progress by.
handlerReference.ProgressTask("Quest Name", "Task Name", 1);

Completes the task with the given name.

string questName The name of the quest.
string taskName The name of the task.
handlerReference.CompleteTask("Quest Name", "Task Name");

Sets the state to completed, and marks the quest as complete.

string questName The name of the quest.
handlerReference.CompleteQuest("Quest Name");

Sets the state to active.

string questName The name of the quest.
handlerReference.CompleteQuest("Quest Name");

Sets the state to inactive.

string questName The name of the quest.
handlerReference.CompleteQuest("Quest Name");

Sets the state to failed.

string questName The name of the quest.
handlerReference.CompleteQuest("Quest Name");

QQ_Quest

QQ_Quest represents a quest given by an NPC in the world.

public int ID The ID of the quest, used in the node editor.
public string Name The name of the quest.
public string NPCName The name of the NPC who gave the quest.
public string Description The description of the quest.
public QQ_QuestStatus Status The quest's current status.
public int RequiredCompleted The current number of required tasks that are completed.
public int MaxRequired The number of required tasks to complete the quest. This is auto calculated each time it is asked for.
public bool Completed Whether or not the quest has been completed.
public List<QQ_Task> Tasks The list of all the tasks in the quest.
public List<int> FirstTasks The list of all the tasks given when the quest is given.

Returns the task with the given name.

string taskName The name of the task.
QQ_Task task = handlerReference.GetTask("Quest Name", "Task Name");

Returns the task with the given id.

int id The id of the task.
QQ_Task task = handlerReference.GetTask("Quest Name", 1);

Increases the progress of the task with the given name.

string taskName The name of the task.
float amount The amount to progress by.
handlerReference.ProgressTask("Quest Name", "Task Name", 1);

Completes the task with the given name.

string taskName The name of the task.
handlerReference.CompleteTask("Quest Name", "Task Name");

Sets the state to completed, and marks the quest as complete.

handlerReference.CompleteQuest("Quest Name");

Sets the state to active.

handlerReference.CompleteQuest("Quest Name");

Sets the state to inactive.

handlerReference.CompleteQuest("Quest Name");

Sets the state to failed.

handlerReference.CompleteQuest("Quest Name");

QQ_Task

QQ_Task represents a part of a quest, such as collect 3 apples.

public int ID The ID of the task, used by the node editor.
public string Name The name of the task.
public string Description The description of the task.
public List<int> NextTasks The list of IDs belonging to the tasks after this.
public float Progress The task's current progress.
public float MaxProgress The task's maximum progress.
public bool Optional Whether or not the task is optional.
public bool Completed Whether or not the task is completed.

Marks the task as Complete.

taskReference.Complete();

Increases the progress of the task, and completes it if there is enough progress.

float amount The amount to increase the progress by.
taskReference.Complete(1);

QQ_QuestSO

QQ_QuestSO is a quest in a scriptable object form.

public QQ_Quest Quest The quest this scriptable object uses.

QQ_QuestDB

QQ_QuestDB is a list of quests.

public List<QQ_QuestSO> Quests The list of quests.

Returns the quest with the given name.

string name The name of the quest.
handlerReference.GetQuest("Quest Name");