Quests&Objectives

Build the tracker in your HUD.

The plugin zip does not include Widget Blueprints. The sample project includes an example HUD. These steps are for widgets that you own. This page is for Standalone PIE. Events fire on this machine.

Get the component

On the local player, get PlayerState, then get Quest Component.

Quest tracker

Layout:

  1. On Construct, get the Quest Component from PlayerState.
  2. Call a Refresh function once. The first paint then uses the current state.
  3. Bind OnQuestStarted, OnObjectiveProgress, OnPhaseCompleted, and OnQuestCompleted to Refresh.
  4. In Refresh, call GetQuestsByStatus(Active). Take the first quest, or your pinned quest.
  5. Use FindQuestState plus the definition phases to list objectives for CurrentPhaseIndex.
  6. Skip a row when ShouldDisplayObjective is false.
  7. Show CurrentCount / RequiredCount from ObjectiveProgress and the definition.
  8. Load each objective Icon when you draw the row.
Blueprint: Get Quests By Status (Active) on the Quest Component.

If you want Optional objectives to look different, use the Optional flag on the definition.

Bind OnObjectiveFailTimerStarted. Then poll GetObjectiveFailTimeRemaining.

Quest log

SectionAPI
AvailableGetQuestsByStatus(Available)
ActiveGetQuestsByStatus(Active)
CompletedGetQuestsByStatus(Completed) or Times Completed > 0

Do not use Failed or Abandoned as log tabs. Those statuses are transitions. The quest becomes Available at once.

Resolve Title and Icon with UQuestSubsystem::GetQuestById.

Fill a List View or Scroll Box. Refresh on Available, Started, and Completed. Refresh again when you open the log.

Vendor / NPC board

NeedAPI
Available quests this NPC offersGetQuestsByStatusForGiver(Available, GiverId)
Active quests this NPC acceptsGetQuestsByStatusForTurnIn(Active, TurnInId)
Status list for this vendorGetQuestsByStatusForVendor(Status, VendorId)

If you need definition lists without player state, use subsystem GetQuestsByGiverId, GetQuestsByTurnInId, or GetQuestsByVendorId.

Icons and sounds

Load UQuestDefinition::Icon, each objective Icon, and each reward Icon in your HUD.

When a quest completes, fails, or an objective completes, load the matching USoundCue from the definition. Then play it in your game.