The quest system allows users to build narrative structures in space.
Usually driven by interactions with NPCs in your regions, quests can lead users through gameplay or learning and training modules, or through tours, stories or other step-based user engagements.
Quests are depicted by a blue exclamation mark above a Quest Giver which can be any type of clickable GameObject (with a collider component). Clicking on the Quest Giver shows the first Quest Dialog Box (the first Step, numbered 0 in Unity) with a Start / Cancel option.
Quest Dialog Box shows the Name and the Description of the Step (see below). As soon as the user accepts the quest, next steps are shown as a blue question mark. On the left of the screen, below the radar, The Quest Name (Quest Designer Component) appears with the number of steps and the hint to reach the next step.
Hints are related to a future step the user needs to reach (usually the next step). So the hint needs to be written on the Step the user needs to reach. For that reason, there is no need to write a hint inside step 0 (the opening step), unless for some reason the quest brings the user back to the Quest Giver.
More to come ...
The Quest Giver
All quests are started by the user clicking an object, the so called Quest NPC which presents the quest. The user opts-in to the quest.
To turn any object in your scene into the Quest NPC, add the Quest NPC component to it. You can use a humanoid NPC. Use the Statue component object, rendering the NPC as a character. Then add the QuestNPC component to that. You can add the Quest NPC component to any object with a collider on it. The user clicks on that object to start the quest.
Quest NPCs are placed into the Destination NPC field in any Step Inspector of your quest (see below).
Quest Manager
Create an empty game object in your scene, set it to location 0,0,0 and add the Quest Designer game component to it. Give the quest a name and a description.
Quest type
Daily : users can play it once every day.
Main : users can play the quest only once.
Side : can only be triggered by another quest.
Activity : users can replay continually.
Temporary : ?
Quest ID
Click the reserve ID button in the inspector to assign a unique id to your quest. The quest ID is generated automatically when you click reserve. Warning: DO NOT delete the Quest ID Inspector field. If you don't remember that number, you will need to reserve a new one. If this quest is a used in a dependency list, you will have to edit all the quests that depend on it...
Quest Dependency IDs
You can chain quests together using dependency IDs Set the size to the number of quests that need to be completed before this quest is available. Hit 'enter' and that number of fields will appear. To each field, add the individual quest ID of one of the quests that must already be completed by the user. This allows you to have multiple quests initiated by the same quest NPC, in a series.
Reward ID
Add the curator ID for any virtual good item you have uploaded. You can get this from the virtual goods component attached to the reward object (once it has been uploaded), or from the item list in your account at curator.sine.space. The reward virtual good object must be live before it can be given by a live quest.
Open Canvas button
This button opens an Editor Window which allows you to build your quest, adding steps. Add the first step and reference the Quest NPC object (place the object into the Quest NPC field).
You can add quest steps one at a time, building your story. Each time you add a step it will duplicate your last step.
Open the Quest Designer Canvas. Clic Add Step button.
You can delete a step within a chain; its child will be reconnected to the parent step. You cannot delete the first step.
Click on the little arrow visible at the top left corner in the step inspector window. You cannot reorder the first step. If there are only 2 steps in your quest, you won't see the arrow from the second step.
The NPC step type is mandatory for starting the quest. The step 0 will be of type "NPC" and you cannot edit it to make it a different type.
Other steps can be of type NPC: use a GameObject (or any object) and attach the Quest NPC component to it, placing it in the Destination NPC field.
The activity step is a general step which you can use to deploy a wide range of activities which the user must complete before the next step initiates.
Activity
You can drag any “Startable” component into into the Activity field in this step.
The space quest system includes a range of standard startables you might want to use; for example, you might require a user to wear a particular clothing item or sit on a particular furniture item.
For more information on startables go here.
Scripting your own startables
You can also write your own startables, which can be full game rounds or learning modules; the user has to complete each one before moving on with the quest.
Autoplay
Tick autoplay if you want this step to start immediately as the prior step completes. If you leave autoplay unticked the user will need to click the quest NPC to start the step.
You may need to leave the Autoplay unticked if your prior step is one that is registered as complete at the start of the step and the user will still engaged in an unrecorded activity before needing to move on.
For instance if the prior step was an activity step using the StartableGestureRequirement, the quest system will register the user as having completed the step when they initiate a gesture but that gesture may take 30 seconds to play, during which you may not want the next step to initiate.
Replay Discussion NPC
The Replay Discussion NPC is the object in the scene the user needs to click if they have failed to complete the quest step. This may be because the quest step is a game component which can be failed; or a learning component with a passing grade. Or it may be because they logged out or were disconnected half way through the deployment of the startable.
The replay NPC can be your original Quest NPC but if that is geographically some distance from the relevant quest step you may chose to put another object near the quest step activity which the user can click to restart the step.
This can be any object with the Quest NPC component added to it, dragged into the Replay Discussion NPC field in the step.
Area Hint
If you are using a navmesh to guide your users around the quest, the area hint will tell them where to go. It might usually be the same object as the Replay Discussion NPC but it can be any game object you drag into the field.
The quest step allows you to embed one quest inside another. This is a great way to move users from one region to another. (You can also use the Quest Game Object component to spawn teleportation portals at the right moment in front of the user, leading them to the next region.)
Subquest ID
Paste the ID of the child quest here.
The visit location step requires the user to go to a specific place in your region to continue the quest.
Area to Visit
Drag any game object including any NPC into this field to require the user to visit this location before the quest continues.
This step can be used in conjunction with the navmesh to lead them there via a visible path.
For more information on setting up the navmesh in your region go here. (need link)
Proximity (meters)
Set the proximity in meters to the selected game objects.
The collection step requires the user to click on and collect a specific game object in the scene.
Collectible Item
Add the Quest NPC component to the object you want the user to click on and collect. Drag the object into the Collectible Item field in the quest step. Make sure it has a collider on it so the user can click it.
Area Hint
If you want the navmesh to lead the user to the collectible, you can drag it into the Area Hint field. If you want them to have to search without a hint leave it empty or add your original Quest NPC to guide users back to the quest area in the event they leave the region during this step.
Counter
The counter step requires users to collect a defined number of counters.
Use this step in conjunction with objects in the scene that have either the Quest Counter Clickable or Quest Counter Proximity component attached.
You may also want to use the Startable Timed Counter which offers similar functionality to this step, when added to the Activity step, but on a timed basis.
Number required
Specify the number of counters the user needs to collect. This can match the total number available in the scene or there can be far more in the scene than the required number, depending on the nature of your game.
Quick ID Picker/Token ID
Add whatever ID you have manually applied to the Counter ID field of the Quest Counter Clickable or Quest Counter Proximity component attached to your counters.
Area Hint
Use this in conjunction with the navmesh feature to guide people to an area, or drag your Quest giving NPC here to guide users back to the start of the step should they relog before completion.
The conversation step allows you to build cut scenes in the quest, with successive combinations of dialogue, camera, audio and animation on the NPC and the player.
To edit the conversation step open the Quest Canvas (from the button at the bottom of the quest chain in the inspector window).
Conversation Actors
The conversation actors can be one or more NPCs and the play themselves.
Add an actor and drag any object with the Quest NPC component attached to it to the NPC Object field.
Actor Name
This will appear in dialogue panels during the conversation.
Is Player
Tick this to use the player as your actor. Add %PLAYER% to the Actor Name field to use the username in dialogue.
Move to location
Add an empty game object in the scene to this field to move your player to this location for the duration of the conversation.
This allows you to align the player with specific camera shots defined by you during the conversation.
Conversation dialogues
Once you have defined the actors in your conversation you can add as many steps to the conversation as you want.
Actor
Choose the actor narrating the dialogue step.
Text
Enter the text as it should appear in the dialogue panel.
Animations
You can add an animation to the NPC or the player during the step.
Wait for continue?
Tick this if you want the dialogue step to remain on the screen until the user clicks continue.
Wait timeout
Define a time in seconds if you want the dialogue to end and the next to start automatically without the user clicking continue.
Camera angle
Create an empty game object in your scene and position it so that it looks where you want the user's camera to look during the dialogue.
You can position your view in the scene view in the Unity editor and then highlight the game object and in the top menu go to GameObject / Align with view to move the position and rotation of the game object to your view.
Dialogue Audio
You can add audio clips to the dialogue by dragging an audio file from your project to this field.
Use Lip Sync
Tick this if you want the mouth of the actor to be animated by your audio file.
Cutscene Dialogue Canvas
To use the conversation step you need to drag the Cutscene Dialogue Canvas prefab into your scene.
This screenspace canvas displays the dialogue during cut scenes and offers the continue button to users if you are using that function in your dialogues.
Make sure the Panel, which is a child of the Canvas, is disabled (the tick box in the top of the Inspector).
This ensures the panel will only be visible to users during the conversation steps of a quest; left on it will be permanently applied to the screen of everyone in the region.
Avoid putting the Cutscene Dialogue Canvas into a parent object, or if you do ensure the parent object is located at 0,0,0 in your scene or the canvas will be offset or invisible to the players.
Branch NPC allows the user to setup several option for player to choose. It will lead to different quest steps based on the user's choice.
Startables are components you can drag into the Activity step of a quest.
You attach the startable component to the relevant game object; it some cases it might be an empty game object created just to house the startable; and then drag that object into the Activity field of an Activity type step in your quest.
Startable Components:
Add the Quest Counter Clickable component to counters the user must click on to collect.
Counter ID
Enter an ID of your own creation to the Counter ID field and add the same ID to the Counter ID field of the Counter quest step or the Startable Timed Counter component.
Add the Quest Counter Proximity component to counters the user must be within a certain proximity of in order to collect.
Counter ID
Enter an ID of your own creation to the Counter ID field and add the same ID to the Counter ID field of the Counter quest step or the Startable Timed Counter component.
Trigger Distance
Specify the distance from the object that will trigger a successful collection.
This allows you to rez and and derez items in your scene during specified quest steps.
Configurable parameters:
QuestID
MinStep
MaxStep
Attach to other objects (preferably a parent group, if you're updating multiple in a single step)
It enables or disables the object it is on, based on whether the user is inclusively on any step between Min and Max.
Objects can only be seen by the player.
This will place an object at the origin of the avatar; 0,0,0 relative to that avatar, non-attached.
To offset, place empty parent object with PlaceAtOrigin script and then offset visible object from invisible parent.
Use in quest text fields to add player name to dialogue.
If it's possible to fail an activity step drag the quest NPC into the “Replay NPC” field. It will show a "!" asking the user to repeat the step.
Apply to NPCs designed to automatically accept gesture invites.
Two step quests are usually used for creating quests which give out Silver, making item hunts or giving gifts. Here we will be showing how to set up the quest and how to place a quest like this is a region you upload and also how to make the quest into an item you can upload as a virtual good.
The clickable object is the object the user will click on to receive the gift or silver. You can use any item you want for this.
You need to set up this object so it can be clicked on. The clickable object needs a collider on it, and a Box Collider is fine most of the time for this. Click on the object, and then click on Component, Physics and Box Collider if it isn't already on the object.
Next thing you need to do is add the Quest NPC script to the object. Make sure you have the object selected, and click on Add Component, then search for Quest NPC and add it. This will add the script to the object.
You can check Hide Dialogue for hunts and gift giving quests. Hide Quest Bang can make the quest a little harder as it won't show the quest '!' mark above the quest items.
Next thing to do is add the Quest Designer Script to the object. Make sure it is selected, click on Add Component and search for Quest Designer then add it. The quest designer script is where you can set the settings for the quest.
Quest Name - This is where you will add the name of the quest.
Description - This is where a small description of the quest can go.
Type - This is what type of quest it is. The options for type of quest are:
Daily Quest - This is a quest which will be active daily, so users can complete this every day they log in.
Main Quest - This is a quest which will only be available once for the user to complete.
Side Quest - This is a side quest, which will only be available once.
Activity Quest - This is a quest used for activities, such as an in-world game or a hunt quest and can be repeated.
Temporary Quest - This is for a quest which will be temporarily available to users.
Quest ID - This is the ID of the quest. You need to click on Reserve to get the quest ID.
Quest Dependency IDs - You can ignore this for a two step quest.
Suppress reward and end dialogue - Again, we don't need this for this type of quest, but this just stops the reward from being granted.
Reward ID - This is the important thing to note: The reward ID is where you will enter the ID of the reward item. If you are making a repeatable quest, like an activity quest, leave the reward ID at 0, as this will give the user Silver. It will give Silver again after a cool-down period.
Fill in the quest name, description and type. If you want users to be able to get the reward only once, set the type to Main Quest. If you want the quest to be repeated, set it to Activity.
Click on the Reserve button next to the Quest ID to get the ID of the quest.
Click on the Open Canvas button. This will open the quest canvas, and this is where you will add all the details for the quest.
As said above, this is where you actually add the details for the quest.
As you can see, it has copied over the information from the Quest Designer. But, you still need to add steps to the quest.
Click on the Add Step button, to make the first step in the quest, and then click on the Add Step button again to add the second step. Move the second quest step box over so you can see both boxes.
In the first quest step box, copy the name over from the Quest Name box to the Name box.
In the Dialogue box, type out the dialogue you want the Quest UI to say, for example, if you have set it up to be a hunt quest, you might put something like 'You have found the Easter Egg!'
If you need to put a hint, you can, but this is usually used for longer stepped quests.
In the second quest step box, name it something like Give Prize, then go back to the first step box, and choose the Next Step to be the Give Prize step.
In the second quest step box, check the Supress Nav Line because the user does not need to go to a different location to finish the quest.
In both of the step boxes, set the Destination NPC to be the clickable object you made at the beginning.
You can do this by dragging the item from the hierarchy to the Destination NPC boxes.
Note: Leave the Reward item ID box at 0 if you want the user to get Silver. Leave it blank in both the Quest Designer and Quest Canvas for now if you want to reward the user with an item, as you need to get the ID first.
If you are making a quest which only gives users Silver, in the Quest canvas and Quest Designer, leave the Reward Item ID at 0.
If you want to give the user an actual item as a reward, you will first need to upload this item. Upload it as you usually would, for example, if it is an item of clothing, upload it using the clothing item settings and the virtual good component. If it is furniture, upload it as a furniture item with the Room Furniture component added to it. If you want it to be spawnable, set it as a Generic upload in the virtual good component.
Once the item is uploaded, take note of the item ID. This is the ID you will need to put in the Reward item ID box.
You only need to put the item ID in the Quest Designer, as it will automatically copy it over to the quest canvas.
To upload the quest as a virtual good which can be placed anywhere, you need to set it up as a Furniture item. To do this, add the Room Furniture component to the quest object.
You can set the placement of the item to be placed on the floor, walls or ceiling. Under collider, you want to drag the Collider of the object into Main Collider.
Once this is set up, you can add the Virtual good component. Under basic, set the content type to furniture, then give it a furniture category. Usually Decoration is a good category for this.
Fill in the rest of the virtual good, and then upload the item to Sinespace.
To upload the quest within a region, you need to only add the Quest Designer component to the quest clickable object. The Quest NPC can then be any other object in the scene. You can upload the region as you normally would, and the quest will be uploaded in the region.