How to Add a Quest NPC
This guide explains how to create an NPC that can give quests to the
player using the BP_RPG_AI_Quest base class.
Prerequisites
Before you start, make sure that:
- The quest system is configured (
BP_QuestComponenton the player,DT_Questspopulated with quest data). - The quests you want this NPC to offer already exist in
DT_Quests. - For each quest you want to assign, the
QuestEngineData.ByNPCfield inDT_Questsis set totrue.
Step 1 – Create the Quest NPC Blueprint
- In the Content Browser, locate the
BP_RPG_AI_QuestBlueprint. - Right‑click on
BP_RPG_AI_Questand choose Create Child Blueprint Class. - Name the new blueprint (e.g.,
BP_NPC_Quest_Trader,BP_NPC_Quest_Guard). - Open the new child blueprint.
Step 2 – Configure the NPC Skin
- In the Components panel, select the
BP_CharacterSkinComponent. - In the Details panel, find the Start Character Skin parameter.
- Assign the desired character skin DataAsset (e.g.,
DA_CS_Guard_01,DA_CS_Villager_Female). This determines the NPC’s appearance in the world. - Compile and save the blueprint.
Step 3 – Place the NPC in the Level
- Drag your new quest NPC blueprint from the Content Browser into the level.
- Position and rotate the NPC where you want them to stand.
- With the placed actor selected, open the Details panel to configure quest‑specific settings.
Step 4 – Configure Quests in BP_QuestComponentNPC
- In the Details panel of the placed NPC actor, locate the
BP_QuestComponentNPCcomponent. - Expand it to see its parameters.
4.1. Add Quests
- Find the Quests parameter (array of
DataTableRowHandle). - Click the + button to add a new element.
- For each element:
- Set the Row Name to the RowName of the quest in
DT_Queststhat this NPC should offer.
- Set the Row Name to the RowName of the quest in
Important: Only quests with
QuestEngineData.ByNPC = trueinDT_Questswill work correctly. Quests withByNPC = falseare intended for the journal UI and may not function properly when given by an NPC.
4.2. Configure MovePlayerToSpeakerPosition
- Find the MovePlayerToSpeakerPosition parameter (bool).
- Set it to:
true– During dialogue, the player will:- Lose control of movement.
- Be automatically moved to the location of the
SpeakerPositioncomponent on this NPC.
false– The player will stay in place during dialogue (no forced movement).
The SpeakerPosition is a BillboardComponent
already present on the BP_RPG_AI_Quest parent. You can
adjust its position in the viewport to control where the player stands
when talking to this NPC.
Step 5 – Test the Quest NPC
- Start the game in PIE.
- Approach the NPC and press the interaction key.
- Verify that:
- The NPC opens the dialogue UI (if dialogue is configured).
- The quest appears in the dialogue options.
- Accepting the quest adds it to the player’s journal.
- The quest can be completed and turned in.
- If
MovePlayerToSpeakerPosition = true, confirm that the player is moved to the correct position and cannot move during the dialogue.
Summary Checklist
Related Docs
docs/systems/quests-and-dialogues.md– quest system architecture and runtime behavior.docs/how-to/progression-and-quests/how-to-add-quest.md– creating a new quest.docs/how-to/progression-and-quests/how-to-add-dialogue.md– setting up dialogue for quest NPCs.docs/reference/data-assets-reference.md– reference forDT_Questsand related structures.