m (Add link to Activity type Step) |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | The quest system allows users to build narrative | + | 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. | + | 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. |
+ | |||
+ | ==Understanding the Quest System== | ||
+ | |||
+ | Quests are depicted by a blue exclamation mark above a '''Quest Giver''' which can be any type of clickable GameObject (with a collider component).<br \> | ||
+ | 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).<br \> | ||
+ | As soon as the user accepts the quest, next steps are shown as a blue question mark.<br \> | ||
+ | On the left of the screen, below the radar, The Quest Name ([[Components/QuestDesigner|Quest Designer Component]]) appears with the number of steps and the hint to reach the next step.<br \> | ||
+ | |||
+ | '''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.<br \> | ||
+ | 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 ... | ||
==Setting up a quest== | ==Setting up a quest== | ||
Line 7: | Line 21: | ||
'''The Quest Giver''' | '''The Quest Giver''' | ||
− | All quests are started by the user clicking an object, the so called Quest NPC which | + | All quests are started by the user clicking an object, the so called Quest NPC which presents the quest.<br \> |
− | The user | + | The user opts-in to the quest. |
To turn any object in your scene into the Quest NPC, add the [[Components/QuestNPC|Quest NPC component]] to it. <br \> | To turn any object in your scene into the Quest NPC, add the [[Components/QuestNPC|Quest NPC component]] to it. <br \> | ||
− | You | + | You can use a humanoid NPC. Use the [[Components/Statue|Statue component]] object, rendering the NPC as a character. Then add the QuestNPC component to that.<br \> |
− | You can add the [[Components/QuestNPC|Quest NPC component]] to object with a collider on it | + | You can add the [[Components/QuestNPC|Quest NPC component]] to any object with a collider on it. The user clicks on that object to start the quest.<br \> |
[[File:Questnpcscript.jpg]] | [[File:Questnpcscript.jpg]] | ||
− | Quest NPCs are | + | Quest NPCs are placed into the ''Destination NPC field'' in any Step Inspector of your quest (see below). |
'''Quest Manager''' | '''Quest Manager''' | ||
Line 37: | Line 51: | ||
Click the reserve ID button in the inspector to assign a unique id to your quest.<br /> | Click the reserve ID button in the inspector to assign a unique id to your quest.<br /> | ||
The quest ID is generated automatically when you click reserve.<br /> | The quest ID is generated automatically when you click reserve.<br /> | ||
− | Warning : '''DO NOT''' delete the Quest ID Inspector field | + | 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''' | '''Quest Dependency IDs''' | ||
− | You can chain quests using dependency | + | You can chain quests together using dependency IDs <br /> |
− | Set the size to the number of quests that need to be completed before this quest is available. <br /> | + | 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.<br /> |
− | + | To each field, add the individual quest ID of one of the quests that must already be completed by the user. <br /> | |
− | This allows you to have multiple quests initiated by the same quest NPC, in series. | + | This allows you to have multiple quests initiated by the same quest NPC, in a series. |
'''Reward ID''' | '''Reward ID''' | ||
Add the curator ID for any virtual good item you have uploaded. <br /> | Add the curator ID for any virtual good item you have uploaded. <br /> | ||
− | You can get this from the virtual goods component attached to the object once it has been | + | 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.<br /> |
+ | The reward virtual good object must be live before it can be given by a live quest. | ||
'''Open Canvas button''' | '''Open Canvas button''' | ||
− | This button | + | This button opens an Editor Window which allows you to build your quest, adding steps.<br \> |
− | Add the first step and reference the Quest NPC. | + | Add the first step and reference the Quest NPC object (place the object into the Quest NPC field). |
==Quest steps== | ==Quest steps== | ||
Line 69: | Line 84: | ||
===Delete a step=== | ===Delete a step=== | ||
− | You can delete a step within a chain | + | You can delete a step within a chain; its child will be reconnected to the parent step.<br \> |
− | You | + | You cannot delete the first step.<br \> |
===Reorder a step=== | ===Reorder a step=== | ||
− | Click on the little arrow visible at | + | Click on the little arrow visible at the top left corner in the step inspector window.<br \> |
− | You | + | You cannot reorder the first step.<br \> |
− | If there | + | If there are only 2 steps in your quest, you won't see the arrow from the second step.<br \> |
==Step Types== | ==Step Types== | ||
Line 83: | Line 98: | ||
===NPC=== | ===NPC=== | ||
− | The NPC step type is mandatory | + | The NPC step type is mandatory for starting the quest. |
− | The step 0 will be of type "NPC" and you | + | 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 [[Components/QuestNPC|Quest NPC component]] to it, placing it in the Destination NPC field. | |
===Activity=== | ===Activity=== | ||
Line 101: | Line 116: | ||
You can drag any “Startable” component into into the Activity field in this step. | 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 | + | 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 [[Quests#Startables|here]]. | For more information on startables go [[Quests#Startables|here]]. | ||
Line 108: | Line 123: | ||
'''Scripting your own startables''' | '''Scripting your own startables''' | ||
− | You can also write your own startables, which can be full game rounds or learning modules | + | 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. |
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
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:
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.
|