Quest System
Quest System
Section titled “Quest System”Quest Data Structure
Section titled “Quest Data Structure”Quest Framework Design
Section titled “Quest Framework Design”Create structured quest system supporting multiple objectives and progress tracking:
Struct_Objective Components
Section titled “Struct_Objective Components”- 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
Struct_Quest Components
Section titled “Struct_Quest Components”- Name Text: Quest display name
- Objectives Array: Array of Struct_Objective for multiple quest goals
NPC Character Setup
Section titled “NPC Character Setup”Create quest-giving NPCs using character system:
bp_character_npc Configuration
Section titled “bp_character_npc Configuration”- 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 Integration
Section titled “NPC Integration”// NPC Quest InteractionOnInteract(PlayerCharacter) {PlayerCharacter.Interface_Quest_Add(DataTable_Quest);// Assigns quest to player on interaction}
Quest Widget System
Section titled “Quest Widget System”W_Questing Main Widget
Section titled “W_Questing Main Widget”Create quest tracking display:
Widget Structure
Section titled “Widget Structure”- Size Box: 300x400 for quest list container
- Scroll Box: Vertical scrolling for multiple quests
- Vertical Box: Dynamic container for quest entries
W_Quest_Entry Widget
Section titled “W_Quest_Entry Widget”Individual quest display component:
Entry Components
Section titled “Entry Components”- 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
W_Quest_Objective Widget
Section titled “W_Quest_Objective Widget”Individual objective display:
Objective Display
Section titled “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 DisplayOnObjectiveCreate(Current, Max, Description, Complete) {display_text = Current + '/' + Max + ' ' + Description;TextBlock.SetText(display_text);
if (Complete) {TextBlock.SetColorAndOpacity(Green);} else {TextBlock.SetColorAndOpacity(Normal);}}
Quest Progress System
Section titled “Quest Progress System”Quest Update Implementation
Section titled “Quest Update Implementation”Handle quest progress from item collection and world interactions:
F_Quest_Update Function
Section titled “F_Quest_Update Function”// Quest Progress UpdateF_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 completeif (objective.Current >= objective.Max) {objective.Complete = true;}}}}
UpdateQuestWidget();}
Quest Value Integration
Section titled “Quest Value Integration”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
Quest Completion System
Section titled “Quest Completion System”Handle quest completion when all objectives finished:
Completion Detection
Section titled “Completion Detection”// Quest Completion CheckF_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());}
Completion Effects
Section titled “Completion Effects”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
Quest Integration
Section titled “Quest Integration”Loot System Integration
Section titled “Loot System Integration”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
NPC Interaction System
Section titled “NPC Interaction System”- Quest Assignment: NPCs give quests through interaction
- Quest Validation: Prevent duplicate quest assignment
- Completion Turn-In: Return to quest NPCs for completion
UI Integration
Section titled “UI Integration”- 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
Quest Database Setup
Section titled “Quest Database Setup”Example Quest Configuration
Section titled “Example Quest Configuration”Create sample quests for testing:
Carrot Collection Quest
Section titled “Carrot Collection Quest”- Objective Value: “carrot” (matches loot carrot quest value)
- Description: “Collect carrots”
- Quantity: Configurable based on difficulty
Potato Collection Quest
Section titled “Potato Collection Quest”- Objective Value: “potato” (matches loot potato quest value)
- Multi-Objective: Could combine multiple collection goals
Quest Expansion Possibilities
Section titled “Quest Expansion Possibilities”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.