How to Add a New Quest

This guide explains how to create a new quest in RPG Engine v6 by adding a row to DT_Quests, configuring its stages, conditions, and rewards, and connecting it to an NPC for delivery.


Prerequisites

Before you start, make sure that:

  • The quest system is set up and working (BP_QuestComponent on the player, BP_QuestComponentNPC on NPCs that give quests).
  • DT_Quests is accessible in the Content Browser.
  • You have a clear idea of the quest structure: name, description, stages (FindItem / ReachZone / Go back to NPC), and rewards.
  • You have any required item DataAssets (BP_ItemData) and dialogue tables ready (or know they will be created later).

For detailed information on creating dialogue tables, see how-to-add-dialogue.md.


Step 1 – Add a New Row to DT_Quests

All quests are defined in the DT_Quests DataTable.

  1. Open DT_Quests in the Content Browser.
  2. Add a new row.
  3. Give the row a unique Row Name (e.g., Quest_01_Intro, Quest_Side_FindBandages).
  4. Begin filling the fields as described below.

Step 2 – Fill General Data (S_QuestGeneralData)

This section contains the basic information about the quest.

FieldValue / Notes
NameThe display name of the quest. Can use ST_Localize for localization.
DescriptionA short description shown in the quest journal. Can use ST_Localize.
UniqueIDA unique integer identifier for this quest. This must be different from all other quests.
ComplexityChoose Easy, Medium, or Hard. This is a visual marker only, no gameplay impact.
ApproximateTimeEstimated time to complete the quest (e.g., 00:05:00 for 5 minutes). Used for UI.
Visual TipA texture (e.g., screenshot of the location) displayed in the quest journal.
Give Quest DialogueReference to the dialogue DataTable used when the NPC offers the quest. Leave empty if no dialogue is needed.
Give Quest Dialogue Stop And TalkSet to true if the player should be locked in place during the quest‑giving dialogue.
End Quest DialogueReference to the dialogue DataTable used when the player turns in the completed quest.
End Quest Dialogue Stop And TalkSet to true if the player should be locked during the completion dialogue.
Quest not Finished DialogueDialogue shown if the player tries to turn in the quest before completing it.
Quest not Finished Dialogue Stop And TalkSet to true if the player should be locked during this dialogue.

Step 3 – Fill Category (S_QuestCategory)

FieldValue / Notes
CategoryChoose Main Quest or Side Quest. This determines grouping in the journal UI.

Step 4 – Fill Conditions (S_QuestConditions)

These fields control when the quest becomes available.

FieldValue / Notes
MinimalLevelMinimum player level required to start this quest. Set to 0 if no level requirement.
Finished Quests Unique IDArray of UniqueID values of quests that must be completed before this quest becomes available. Leave empty if no prerequisites.

Step 5 – Fill Stages (S_QuestStages)

This is the core of the quest. Each stage is one step the player must complete.

5.1. Add Stages to the Array

In the Stages array, add as many S_QuestStage entries as needed.

5.2. Configure Each Stage (S_QuestStage)

FieldValue / Notes
StageTypeChoose the type of stage: FindItem, ReachZone, or Go back to NPC.
NameA short name for debugging and logs.
DescriptionThe objective text shown to the player (e.g., “Find 5 bandages”, “Reach the abandoned tower”).
Visual TipOptional texture shown for this stage in the quest journal (e.g., a map screenshot).

For StageType = FindItem:

Fill the Required Quantity Of Specified Item With Tag (S_ReqItemCustomTag) struct:

FieldValue / Notes
ActorImportant: Must be a child class of BP_Inter_Master_Quest. You cannot use regular item actors directly.
1. Create a new Blueprint class derived from BP_Inter_Master_Quest.
2. In this new actor, set its Data Asset field to the BP_ItemData of the item the player must collect (e.g., the grenade’s item data).
3. Assign this new actor class to the Actor field.
QuantityHow many of this item must be collected.
TagGameplay Tag that the actor must have (optional).
SpawnTransformTransform where the item actor should be spawned if it does not already exist in the world.

Why use BP_Inter_Master_Quest children?
The quest system needs a special actor class that can properly integrate with quest stage tracking. By creating a child of BP_Inter_Master_Quest and assigning the item’s BP_ItemData to it, you ensure that collecting the item correctly updates DynamicQuantity and triggers stage completion.

For StageType = ReachZone:

Fill the Required tagged zone achievement (S_ReqZone) struct:

FieldValue / Notes
TagGameplay Tag of the zone actor that the player must enter.
SpawnTransformTransform where the zone actor will be spawned.
BP QuestZoneSoft reference to the actor class of the zone (e.g., BP_QuestZone_Master).

The zone actor is spawned automatically when the stage becomes active. You do not need to place it in the level manually.

For StageType = Go back to NPC:

  • No additional fields are needed.
  • The system uses the NPC Tag from the runtime quest data (set when the NPC gives the quest) to determine which NPC the player must return to.

Step 6 – Fill Rewards (S_QuestReward)

FieldValue / Notes
ItemData/QuantityMap where the key is a soft reference to a BP_ItemData and the value is the quantity. This is the primary way to give item rewards.
ExperienceAmount of XP awarded on quest completion.
ItemsName/QuantityAlternative reward map. Key is the RowName in DT_ItemData, value is the quantity. Use this if you prefer to reference items by row name instead of direct asset reference.

You can use both reward channels simultaneously if needed.


Step 7 – Fill ExtraData (Optional)

FieldValue / Notes
ExtraDataA map of Name → int used to store lightweight metadata about rewards. This avoids loading full reward structures during quest selection. Usually left empty.

Step 8 – Configure QuestEngineData

FieldValue / Notes
QuestEngineData.ByNPCThis field must be filled.
– Set to true if the quest is only available from an NPC (it will not appear in the “all quests” journal UI).
– Set to false if the quest is always visible in the journal and can be started from the UI without an NPC.
QuestEngineData.FinishedDo not fill. This is updated at runtime when the quest is completed.
QuestEngineData.NPC TagDo not fill. This is set at runtime when an NPC gives the quest.

To make the quest available from an NPC:

  1. Open the NPC Blueprint (e.g., a child of BP_RPG_AI_NPC or BP_RPG_AI_NPC_Shop).
  2. Locate the BP_QuestComponentNPC component.
  3. In the Quests array, add a new element.
  4. Set the Quests element to the RowName of your new quest in DT_Quests.

The NPC will now offer this quest (in order of the array priority) when the player interacts and the conditions (MinimalLevel, Finished Quests Unique ID) are met.


Step 10 – Test the Quest

  1. Start the game in PIE.
  2. Approach the NPC that gives the quest.
  3. Interact to start the dialogue and accept the quest.
  4. Open the quest journal (if configured) to verify:
    • The quest appears with the correct name, description, and stages.
    • The Visual Tip texture is displayed.
  5. Complete the stages:
    • For FindItem: collect the required items (using the BP_Inter_Master_Quest actors you created).
    • For ReachZone: enter the spawned zone.
    • For Go back to NPC: return to the quest‑giver and interact.
  6. Verify that rewards (items, XP) are granted correctly.
  7. Check the journal again to ensure the quest is marked as completed.

If the quest does not appear or behave as expected: — Verify UniqueID is unique. — Check that MinimalLevel and Finished Quests Unique ID conditions are satisfied. — Ensure the NPC’s BP_QuestComponentNPC.Quests array contains the correct RowName. — Confirm that ByNPC is set correctly (true if the quest is NPC‑only, false if it should appear in the journal). — For FindItem stages, double‑check that the actor assigned to Actor is a child of BP_Inter_Master_Quest and that its Data Asset points to the correct BP_ItemData.


Summary Checklist

Use this checklist when adding a new quest:


  • docs/systems/quests-and-dialogues.md – detailed quest system architecture and runtime behavior.
  • docs/how-to/progression-and-quests/how-to-add-dialogue.md – creating dialogue tables for quests.
  • docs/how-to/progression-and-quests/how-to-add-quest-npc.md – setting up an NPC as a quest giver.
  • docs/reference/data-assets-reference.md – reference for DT_Quests, S_QuestContainerData, and related structures.