Skip to content

LEGACY: Quests

Tyler edited this page Feb 6, 2021 · 1 revision

Quests can be relatively simple or as complex as you want. They have a few different pieces which work together:

1.) Details - The name of the quest, key items, journal entry tag, etc.

2.) Prerequisites - The quests a player must have completed in order to accept this quest.

3.) States - The "stages" of each quest. Maybe the first objective is to talk to an NPC, the second to kill 5 enemies, and the third to speak to another NPC.

4.) Rewards - Credits, items, fame, etc given to players after completing the quest.

All of the above can be edited on the website. You'll need permission first, though.

After you've established the basic quest details you need to create a journal entry for each state of the quest. See the below screenshot for an example.

Make sure that the ID on the journal entry matches the data entered on the website. See the below screenshot as an example.

After you've configured the quest you need to actually implement it. This will change depending on what you're trying to create.

Most of the time quests will be progressed via conversation. A bunch of conversation scripts have been added to ease this process. The following is a table of the available scripts you can use for quest creation. These should -only- be used in conversations. Any other use of them isn't supported and will probably break.

Name Description Variable 1 Variable 2 Variable Location Node Type Remarks
any_keyitems_# Player must have one or more of the key items listed. KEY_ITEM_#_REQ_# Quest Giver Appears When The first # is the quest number (1-10) and the second # is a sequential number starting at 1.
has_keyitems_# Player must have ALL of the key items listed. KEY_ITEM_#_REQ_# Quest Giver Appears When The first # is the quest number (1-10) and the second # is a sequential number starting at 1.
accept_quest_# Accepts a quest assigned to the quest giver's local variables. QUEST_ID_# Quest Giver Actions Taken The # is the quest number (1-10)
next_state_# Progresses the player to the next quest state. QUEST_ID_# Quest Giver Actions Taken Ensure the quest type is specified on the website or you might encounter errors when progressing a player.
can_accept_# Displays node if player can accept the quest. QUEST_ID_# Quest Giver Appears When The # is the quest number (1-10)
collect_item_# Makes player open a container to submit items. QUEST_ID_# Quest Giver Actions Taken The # is the quest number (1-10). Quest state should be marked as "Collect Items".
finish_quest_# Completes a quest for player. QUEST_ID_# Quest Giver Actions Taken The # is the quest number (1-10). You should use next_state_# in most cases but there might be a scenario when you want to complete a quest earlier than the final state.
fin_qst#_rule# Completes a quest for player and also runs a custom rule. QUEST_ID_# QUEST_ID_#_RULE_# Quest Giver Actions Taken The first # is the quest number (1-10). The second # is the rule number.
has_quest_# Displays node if player has accepted the quest. Doesn't care what state the player is on. QUEST_ID_# Quest Giver Appears When The # is the quest number (1-10).
on_qst#_state_# Displays node if player is on a specific state of a quest. QUEST_ID_# Quest Giver Appears When The first # is the quest number (1-10). The second # is the state number (1-9).
quest_done_# Displays node if player has completed the quest. QUEST_ID_# Quest Giver Appears When The # is the quest number (1-10)

The following is an example of what the local variables on a quest giver might look like:

The values of each quest are linked to the quest ID listed on the website.

When setting up conversations, you need to structure the nodes in such a way that the highest requirement is at the top of the list. For example, if your NPC offers four quests which build on each other you should have the highest node have an "Appears When" script of "quest_done_4", which is what is displayed when a player has finished all of the quests.

Use the NPC dialogue "halronlinth" as a good example of how to structure an NPC's quest dialogue. See this screenshot for a glimpse: