MVVM & UI

Table of Contents

  1. Overview
  2. Getting the View Model
  3. View Model Hierarchy
  4. UMVVMPulseQuestManager
  5. UMVVMPulseQuest
  6. UMVVMPulseObjective
  7. UMVVMPulseQuestManagerData
  8. Binding in UMG

Overview

The module PulseQuestMVVM has UMVVMViewModelBase view models (plugin ModelViewViewModel) for the runtime objects. They follow the quest manager on every machine, including clients. The core module does not know them; they listen to the events of the runtime, quest data, objectives and manager data.

C++ users add PulseQuestMVVM to their module dependencies.


Getting the View Model

Get Quest Manager View Model (Quest Manager)  →  UMVVMPulseQuestManager

UMVVMPulseQuestManager::GetQuestManagerViewModel creates the view model on the first call and keeps it as long as the quest manager lives, so every widget gets the same one. Use it in the view model creation of a widget (“Create Instance” with a Blueprint function or “Resolver”).


View Model Hierarchy

UMVVMPulseQuestManager
 ├─ QuestManagerData: UMVVMPulseQuestManagerData   history, story flags, tracked quest
 ├─ ActiveQuestsMap: tag → UMVVMPulseQuest
 │   └─ ObjectivesMap: handle → UMVVMPulseObjective
 └─ TrackedQuest: UMVVMPulseQuest

The classes are set in Project Settings → Pulse → Quest → UI (UPulseQuestMVVMSettings). Empty uses the base class.


UMVVMPulseQuestManager

Field notify Description
QuestManagerData View model of the manager data (null on clients until the data arrived)
ActiveQuestsMap / Get Active Quests Running quests
Get Active Objectives Objectives of all running quests, e.g. for a HUD tracker
TrackedQuest The quest the player tracks

Find Quest(Tag). Events: OnQuestStartedEvent, OnQuestFinishedEvent (the quest view model is removed from the active quests after it). Blueprint overrides: Initialize, On Quest Started, On Quest Finished.


UMVVMPulseQuest

Field notify Description
DisplayName / Description Texts of the quest asset
FinishResult / Is Finished Result, None while the quest runs
bTracked Whether the player tracks this quest
ObjectivesMap / Get Objectives / Get Visible Objectives Running objectives (visible: without bHidden)

Get Quest, Get Quest Tag, Get Quest Manager, Find Objective(Handle), QuestData. Events: OnObjectiveStartedEvent, OnObjectiveCompletedEvent. Blueprint overrides: Initialize, On Objective Started, On Objective Completed.


UMVVMPulseObjective

Field notify Description
CompletionStatus / Is Completed InProgress, Success, Failure, Stopped
DisplayText Display text with {Progress} and {Target} applied
Progress / TargetProgress / Get Progress Ratio / Has Progress Progress of the objective
bOptional / bHidden UI hints
Targets Marker targets (actor or location, radius) for compass and map

Get Objective Handle, Get Quest Data, Objective. Blueprint override: Initialize. RefreshFromObjective is virtual for own fields in a subclass.


UMVVMPulseQuestManagerData

Field notify Description
QuestHistory Finished quests
StoryFlags Story flags
TrackedQuest Tag of the tracked quest

Get Finished Quests(Results) filters the history, e.g. for a list of completed quests.


Binding in UMG

Blueprint: Quest list widget with MVVM

  1. Optional: set own view model classes in Project Settings → Pulse → Quest UI.
  2. Widget: add a view model of type MVVMPulse Quest Manager, creation type Manual; on construct: Find Quest Manager (owning player) → Get Quest Manager View Model → Set View Model.
  3. Bind a list view to Get Active Quests; each entry widget gets its MVVMPulse Quest, bind texts to Display Name and Description.
  4. Objectives: entry widget bound to Get Visible Objectives of the quest view model, Display Text, Get Progress Ratio and Is Completed for the state.
  5. HUD tracker: bind to Tracked Quest of the manager view model.

The player chooses the tracked quest in the UI: call a server RPC of your player controller that calls Set Tracked Quest on the manager data.


Back to top

Copyright © 2026 LuQ Studios. Distributed under the MIT License.

This site uses Just the Docs, a documentation theme for Jekyll.