Quest creation has never been easier, create all types of quests without coding.
Add the “Quest.js/.cs” script to the quest giver game object:
1/2) Quest Code and Quest Order: Each quest must have a code and an order. If it’s a side quest (it doesn’t lead to other quests or it doesn’t progress the main story of the game) then give it a unique code that you won’t repeat again and set the order to 1. But if the quest participates in the progress of the game’s story or there are other quests which require this one to be completed in order to play them. Then you’ll be using the same code for the quests that have connection between them and use different orders to determine which quest is played and must be completed to unlock the next one.
3) Quest Title: Enter the quest’s title here.
4) Quest Objective: The quest main objective, keep it short. There are some lazy players who don’t want to read the whole quest story.
5) Quest Story: Explain the quest in details here. Make it long.
6) Show When Completed: If this is the last quest that the quest giver has then you can show a short message to the player whenever he clicks on him. If not, don’t tick this option.
7) Quest Giver: Enter the quest’s giver name and the icon image that will be displayed to the player.
8) Conditions: Most important part of the quest. The condition is the objective and goal of the quest. It is what the player has to do in order to complete the quest. You can have many conditions in one quest. There are four types of conditions:
– Goto: The player will have to go to a specific place and you can choose if he have to stay there for an amount of time that you determine or just reach that place.
– Meeting: The player will have to talk to another quest giver. You simply drag and drop the quest giver that you want the player to meet/talk to.
– Collection/Elimination: The player will have to collect/eliminate items or objects that you specify. You just enter the amount and the item/object name. Currently, you will have to do some coding for these two types. The reason is because I don’t know what item system or enemies system that you are using in your game. Therefore, I created an example script to show you how you can communicate to the quest system from your own scripts. It’s called “CollectionItem”. It also shows you how to check the current player’s active quests.
10) Return To Quest Giver: Tick this option if you’d like the player to return to the quest giver after finishing all the conditions to complete the quest.
11) Reward Player: You can reward your player by experience points (works with the experience manager that is provided with the package).
If you are using S-Inventory, you need to drag and drop an S-Inventory item prefab in its field. Then add the “InventoryQuest.js/.cs” script to your scene and un-comment the “Reward” function. Then in the “QuestLogUI.cs/.js” and the “QuestUIManager.js/.cs” scripts, un-comment the whole “SetQuestReward” function.
Quest UI Settings:
Add the “QuestUIManager.js/.cs” script in your scene:
1) Canvas: Drag and drop the UI canvas of the quest panel.
2) Panel: Drag and drop the quest UI panel. The panel object should include an Image component with the quest’s backdrop sprite on it. It must also have the Graphics Raycaster component and an Event Trigger. The Event Trigger must include two types of events:
– Begin Drag event: Drag and drop the object that holds the QuestUIManager script and pick “QuestUIManager -> DragStarted()”.
– End Drag event: Drag and drop the object that holds the QuestUIManager script and pick “QuestUIManager -> DragEnded()”.
3) Quest: Create these UI elements and drag them in their respective fields.
– Quest Giver Image (Image UI object): Will display the quest giver’s image.
– Quest Giver Name (Text UI object): Will display the name of the quest giver.
– Quest Title (Text UI object): Will display the title of the quest.
– Quest Description (Text UI object): Will display the description/story/objectives of the quest.
– Quest Award Text (Text UI object): Will display the quest reward for the player.
– Quest Award Image (Image UI object): It will display the icon of the quest’s reward item. (Works only with S-Inventory, if you don’t have it then simply leave this field empty).
– Aceept Quest (Button UI object): On Click, drag and drop the object that holds the QuestUIManager script and choose “QuestUIManager -> ActivateQuest()”.
– Close Quest (Button UI object): On Click, drag and drop the object that holds the QuestUIManager script and choose “QuestUIManager -> CloseQuest()”.
– Finish Quest (Button UI object): On Click, drag and drop the object that holds the QuestUIManager script and choose “QuestUIManager -> FinishQuest()”.
– Abandon Quest (Button UI object): On Click, drag and drop the object that holds the QuestUIManager script and choose “QuestUIManager -> RemoveQuest()”.
4) Default Position: The quest window starting position, you have five options: Top-Right corner, Lower-Right corner, Top-Left corner, Lower-Left corner and screen center.
5) Is Movable: Tick this option if you want the player to drag and drop the quest window in-game and be able to change its position (The position chosen by the player during game play will not be saved, the quest window will always be created in the default position).
6) Drag Panel Slot: To drag the quest panel smoothly, you need to create an empty UI element (contains a Rect Transform only) and make it very small and place it as a child object of the UI canvas then put it in this field.
7) “Close” Button: Create a UI button and make it child of the quest UI panel object and add this event to the button on click: Drag and drop the object that holds the QuestUIManager script and choose “QuestUIManager -> CloseQuest()”.