How-To: React to Quest Changes
Goal: refresh a quest log, and hand quest rewards to your own systems.
Prerequisites
Quick Start.
1. Bind the subsystem events
| Event (Blueprint / native) | Payload | Use |
|---|---|---|
OnQuestStateChanged / OnQuestStateChangedNative | FCrimsonQuestStateChangedMessage (QuestId, OldState, NewState) | Quest log, notifications |
OnGrantItemRequested / ...Native | FCrimsonGrantItemRequest (ItemDefinition, Count, ...) | Give the item through your inventory |
OnGrantXPRequested / ...Native | FCrimsonGrantXPRequest | Award XP through your progression |
OnMessageBroadcast / ...Native | FInstancedStruct (from the Broadcast Message action) | Custom quest-driven messages |
OnEventReported / ...Native | Channel + FInstancedStruct | Every reported event |
Event BeginPlay -> Get For World (Crimson Quest Subsystem) -> Bind Event to On Quest State Changed -> rebuild the quest log.
Verify
Completing a quest with an item reward calls your handler once, on the server.
2. Per-player updates
For one player's own UI, the progression component exposes native OnQuestStateChanged(FPrimaryAssetId) and OnObjectiveProgressed, fired on the owning client, plus the read API (GetQuestState, IsQuestActive, IsQuestComplete, IsEventSatisfied, HasFact).
Verify
Play As Client: the client's quest log updates when the server completes an objective.
See also
- How-To: Save and Restore Quests
- API Reference