Quest System Overview

Version 1.1 is available. Main feature - Quest Branching. Enjoy!

Version 1.13 is available. New objectives blocking handling

Version 1.1 - Release NotesVersion 1.13 - Release Notes

Ultimate Quest System - Solution that allows to easy implement Quest System to your own project. Plugin has very understandable, flexible and customizeable structure. You can implement it to your project for few minutes.

Main Features:

  • Use C++ or Blueprints to work with system

  • Flexible structure, easy integrate to any project

  • Quest Branching Supports

  • Dynamic Objectives and Rewards

  • Unlimited quests

  • Unlimited objectives for each quest

  • Quest Objectives can be completed parallel or in a sequence

  • Event based quest objective tracking system. It allow integrate it to any project for few minutes

  • Very flexible class structure, easy to customize any quest, objectives or rewards

  • Example Project with examples of usage system

  • Ready to use Save/Load system to Unreal Saves or Json format

  • Add your own data to save for quests.

  • Quest Giver implementation in Example Project

  • 5 Different types of quests and UI implementation in example project

Basically, to implement quest system to project you need:

UQSQuestComponent/UQSQuestStorage

Add UQSQuestComponent to entity which will be store and handle quests (e.g. character, game state, etc.).

Quest Component contains QuestStorage object.

Quest Storage contains quests, you may have unlimited count of storages if you need it (e.g. for global quests, quests specific on game session etc.)

Storage Tag - Need to get access to quest storage from QuestSubsystem

CanBeSaved - if this parameter is false - this storage won't save.

Load After Registered - need or not to load this storage after owned actor spawned in world

Each quest storage register to Quest Subsytem

In subsystem you can get any registered quest storage by tag, take quest to storage with tag, add objective counter value. Also it have events on register/unregister of quest storages

Quest Storage have next events and functions:

Take Quest - takes quest to selected storage. Return dynamic quest object

Add Objective Counter Value - add value to objective with tag. After all objective is done - quest will be marked as ready to finish

Finish Quest - allow to finish quest and get reward for it. IgnoreReadyToFinishState - allow to ignore unfinished objectives and finish quest forced. You can finish quest by DataAsset of quest or by DynamicQuest Object

Also it have getters for all, active or finished quests.

Also it has events for quests after it finished, ready to finish states changed or when new quest has taken.

UQSQuestDataAsset/Dynamic UQSQuest Object

To create new quest - just create new data asset based on UQSQuestDataAsset class.

QuestObject

After quest has taken - quest system creates UQSQuest object for each quest. If you need to have custom quest logic (e.g. in example project quest have track state), or make specific handling for quest states - you can use your own quest class.

UQSQuest functions

To save custom data for quest - override WaitForSaveDataFromQuest function and call AddDataToSave function. It data will be saved and loaded when you need it. On this moment it support only String, float and int32 types. Arrays and structures is not supported.

Also it has events after quest taken, loaded after save, finished or rewards was given.

UIData

For Quest or QuestObjective you may have UIData - it instanced object you need to display any quest data in your UI implementation. You can use default ui data or create own like in Example Project

To get ui data casted to selected class use GetTypedUIData function.

Rewards

Each Quest may to have unlimited count of rewards. To handle reward - just create UQSQuestReward class and override HandleReward function. It will be called after quest will be finished.

Objectives

Each Quest may have unlimited count of objectives.

Objective must have tag - it need to use functions, like add counter value to objective. Also objectives will be found by this tag.

InitialCounter value - value of counter after quest has taken. After all objective counters == requered values - quest will be marked as ready to finish.

BlockNextObjectivesBeforeCompleteThis - If you need to sequence objectives execution - set this parameted on objectives and next objectives after selected will be ignored for changing before it will be completed

CanBeChangedAfterComplete - if you need to revert some objective value after it already completed - set this parameter to true. All next blockable objectives will be blocked to change.

Objective example:

To complete quest you need to pick 3 apples. It's mean - you need to add new objective. E.g. tag wil be Pick.Item.Apple.

And next step - after you picked up apple call add objective counter value with same tag and value 1. Afer current value wil be == to requered value - objective will be completed. After all objective is completed - quest will be marked as ready to finish. Final step - finish quest by using function FinishQuest from quest storage.

Quest Object has next functions and events:

Objective Watcher - allows to track when seletcted objective is changes value

FinishObjective - allows to finish objective immediately

GetObjectives - get all objectives, all but not blocked, or just not complited without blocked objectives

And events - after objective changed value, objective complete, quest finished/ready to finish, ready to finish canceled or reward received.

QuestSubsystem

To get access to subsystem just call UQSQuestSystemSubsystem function

Subsystem contains all quest storages.

You can get access to specific storage by tag

Also you can take quest to storage with tag, or add objective counter value to all storages

Quest subsystem has event after new quest storage was registered

And finaly you can get access to QuestSaver object to save or load your quests.

Save/Load

You can provide save/load quests and quest data to two formats - used unreal save system, or to Json format. You can change format in ProjectSettings - UltimateQuestSytem. Also you can change default name of save slot.

To save or load specific or all storages use next functions:

If save slot name is empty - will be used last saved save slot name.

To change last save slot name use this function:

To get access to last save slot use this:

After new quest storage will be registered, it will be used last slot name to load quest data.

To reset name to name from project settings use this:

To delete saved game use this:

To get saved games use this function. Optionaly you can set name prefix to filter another saved games

After quest storage loaded this event will be called:

If you use custom quest type and you need to save your quest data you need to override WaitForSaveDataFromQuest function and call AddDataToSave function. It data will be saved and loaded when you need it. On this moment it supports only FString, float and int32 types. Arrays and structures is not supported.

Loading process is fully automated, you dont need to do nothing, saved data will be found by name and saved value will be applied.

Last updated