What fun is a quest without rewards? Now keep in mind this is just a Quest system, so you won’t find an experience system, currency system, reputation system, or item system included with it, but I’ve gone ahead and created the framework for you to easily plug in to those other systems and use them as rewards for completing quests.
Integration into Custom Systems
Please note, this Quest System is not currently replicated. If you are working on a multiplayer project you will need to handle setting up replication on this system before you can properly integrate it into your other game systems.
Integrate Dynomega’s Item + Inventory System
If you are using version 2.0 of my Inventory System in a single player game I have prepared a video to walk you through integrating this quest system into it:
Quest System (v1) + Inventory System (v2) integration guide — 11:50
Integrate a Custom System
To integrate your own systems there are a few different functions you must take care of. Below is a breakdown of each and their location:
Item Related Rewards
AC_Quest_PlayerState : getItemInfo This should return the ItemIcon (Texture2D), and ItemName (Text) for the provided ItemID (Name).
AC_Quest_PlayerState : giveQuestRewardItem This function has no return, and is called when it is time to give the player a quest related reward. Input for this function is ItemRowName (Name) and Quantity (int). It is at this point that you should add the item to your player’s inventory in your system.
AC_QuestObjective_Inventory : getInventoryItemQuantity This function should return the Quantity (Integer) found in the player’s inventory for the provided ItemRowName (Name).
AC_QuestObjective_Inventory : takeInventory This function is called when the player clicks the button to give items through the quest window, if all valid items are found in the inventory via the getInventoryItemQuantity method. At this point you should remove the items from the player’s inventory.
BP_QuestEvents_GiveQuestItems : HandleEvent This QuestEvent is used to give quest items to the player. Often used when the quest is accepted. Make sure you also create an event to remove the items!
Numeric Related Rewards
AC_Quest_PlayerState : giveQuestRewardExperience This is where you would reward experience to the player. The input is a float, the value comes from the value set in the Quest Data Table.
AC_Quest_PlayerState : giveQuestRewardCurrency This is where you would reward currency to the player. The input is a float, the value comes from the value set in the Quest Data Table.
AC_Quest_PlayerState : giveQuestRewardReputation This is where you would reward reputation to the player. The input is a float, the value comes from the value set in the Quest Data Table.
QuestRewards Structure
The F_QuestRewards structure located at Blueprints/Variables/Structures is how you define the rewards for your Quest in the data table.
ItemsGuaranteed These items (all) will be rewarded to the player upon completing this quest. The key is the ItemRowName that will be passed to your item system. The value is the quantity of the item that will be given.
ItemsChoice The player gets to choose one of the items in this list upon completing the quest. The data for this variable works the same as the ItemsGuaranteed, the only difference is the player will only get one of the rewards instead of all of the rewards.
Numeric Rewards This is where you would reward the player with experience, currency, or reputation. If you want to add more numeric rewards see the F_QuestRewards Blueprints/Varaibles/Structures structure, as well as the giveQuestRewards function inside of the AC_Quest_PlayerState blueprint found in Blueprints/Components component, finally you will want to look at the build function inside the UI_QuestWindow_Details UIs/QuestWindow.