Skip to content
Pablo Rodriguez

Quest System

Create structured quest system supporting multiple objectives and progress tracking:

  • Objective_Value String: Keyword identifier for quest tracking
  • Objective_Quantity_Current Integer: Player’s current progress
  • Objective_Quantity_Max Integer: Required amount for completion
  • Description String: Objective description text
  • Name Text: Quest display name
  • Objectives Array: Array of Struct_Objective for multiple quest goals

Create quest-giving NPCs using character system:

  • Base Class: Derived from master character blueprint
  • Skeletal Mesh: X Box character for consistency
  • Animation Blueprint: Standard character animation system
  • Collision: Box collision set to block interact channel
// NPC Quest Interaction
OnInteract(PlayerCharacter) {
PlayerCharacter.Interface_Quest_Add(DataTable_Quest);
// Assigns quest to player on interaction
}

Create quest tracking display:

  • Size Box: 300x400 for quest list container
  • Scroll Box: Vertical scrolling for multiple quests
  • Vertical Box: Dynamic container for quest entries

Individual quest display component:

  • Size Box: 300x100 per quest entry
  • Text Block: Quest name display
  • Vertical Box: Container for objective list
  • Dynamic Creation: Created at runtime for each active quest

Individual objective display:

  • Text Format: “{current}/{max} {description}”
  • Color System: Green text when objective complete, normal when incomplete
  • Progress Tracking: Visual representation of completion status
// Quest Objective Display
OnObjectiveCreate(Current, Max, Description, Complete) {
display_text = Current + '/' + Max + ' ' + Description;
TextBlock.SetText(display_text);
if (Complete) {
TextBlock.SetColorAndOpacity(Green);
} else {
TextBlock.SetColorAndOpacity(Normal);
}
}

Handle quest progress from item collection and world interactions:

// Quest Progress Update
F_Quest_Update(QuestValue) {
ForEach(quest in Player_Quest_Array) {
ForEach(objective in quest.Objectives) {
if (objective.Objective_Value == QuestValue) {
objective.Objective_Quantity_Current++;
// Check if objective now complete
if (objective.Current >= objective.Max) {
objective.Complete = true;
}
}
}
}
UpdateQuestWidget();
}

Connect loot collection to quest progress:

  • Loot Actors: Each loot type has Quest_Value string
  • Matching System: Quest objectives match loot quest values
  • Automatic Updates: Collecting items automatically updates relevant quests

Handle quest completion when all objectives finished:

// Quest Completion Check
F_Check_Quest_Complete(QuestIndex) -> Bool {
quest = Player_Quest_Array[QuestIndex];
completed_objectives = 0;
ForEach(objective in quest.Objectives) {
if (objective.Current >= objective.Max) {
completed_objectives++;
}
}
return (completed_objectives == quest.Objectives.Num());
}

When quest completes:

  • Quest Removal: Remove from active quest array
  • Visual Effects: Spawn particle effects and sound
  • UI Update: Refresh quest display
  • Reward System: Could integrate with inventory for quest rewards

Connect quest progress to item collection:

  • Quest Values: Loot items have matching quest value strings
  • Automatic Tracking: Picking up items triggers quest updates
  • Multiple Quests: Single item can progress multiple quests simultaneously
  • Quest Assignment: NPCs give quests through interaction
  • Quest Validation: Prevent duplicate quest assignment
  • Completion Turn-In: Return to quest NPCs for completion
  • Root Widget: Add quest widget to main UI
  • Positioning: Middle left for visibility without obstruction
  • Persistence: Quest widget remains visible during gameplay
  • Update System: Automatic refresh on quest progress

Create sample quests for testing:

  • Objective Value: “carrot” (matches loot carrot quest value)
  • Description: “Collect carrots”
  • Quantity: Configurable based on difficulty
  • Objective Value: “potato” (matches loot potato quest value)
  • Multi-Objective: Could combine multiple collection goals

Framework supports complex quest types:

  • Kill Quests: Track enemy defeats
  • Exploration Quests: Visit specific locations
  • Crafting Quests: Create specific items
  • Delivery Quests: Transport items between NPCs

The quest system creates structured progression goals while integrating seamlessly with existing inventory and NPC interaction systems to provide clear player objectives and achievement tracking.