If you want to create fun events or gamify user engagement, Breakroom's Quest System can help you get started. Learn how to set up a quest, activate NPCs, and more.
Breakroom's Quest System allows you to build narrative structures in your virtual spaces. Usually driven by interactions with NPCs, quests can lead users through gameplay-driven socialization, learning, or training modules. You can also use them to guide tours, tell stories, or create other step-based user points of engagement.
Setting up a custom quest is an advanced Breakroom customization option. Therefore, the instructions below assume you are already familiar with the use of Unity and uploading region items.
Only World Owners, World Administrators, and World Developers can upload custom items to Breakroom.
In order to follow the steps outlined below, you must already have Unity and the Breakroom SDK installed on your computer.
Quests are depicted by a blue exclamation mark located above a Quest Giver, which can be any type of clickable game object equipped with a collider component. Clicking on a Quest Giver object calls up the first Quest Dialog Box (this step is numbered 0 in Unity), along with Start and Cancel options.
The Quest Dialog Box displays the Name and the Description of the current step (see below). As soon as a user accepts the quest, their next steps will be indicated by blue question marks.
Below the mini map, the Quest Name (Quest Designer Component) will appear, along with the number of steps included in the quest and a hint for the user. Hints are related to a future step the user needs to take (usually the very next step). Therefore, the hint will need to be entered into the next step the user needs to reach.
For this reason, there is no need to write a hint inside step 0 (the opening step), unless the quest brings the user back to the Quest Giver.
All quests are started by a user clicking on a particular object—the so-called Quest Giver, or Quest NPC. After reviewing the quest information, the user has the option to continue or to cancel the quest.
To turn any object in your scene into a Quest NPC, add the Quest NPC component to it. You can use a humanoid NPC if you wish, but you can add the Quest NPC component to any object with a collider on it. Using the Statue component object, render the NPC as a character, and then add the Quest NPC component.
Quest NPCs are placed into the Destination NPC field in any Step Inspector of your quest (see below).
Create an empty game object in your scene, set its location to 0,0,0, and then add the Quest Designer component to it. Give the quest a name and a description, and then customize the fields that follow to meet your specifications.
Daily: Users can play through the quest once every day.
Main: Users can play the quest only once.
Side: This quest can only be triggered by another quest.
Activity: Users can replay the quest continually.
Temporary: (This function is not currently supported.)
Click the Reserve ID button in the Inspector to assign a unique ID to your quest. The quest ID is generated automatically.
Warning: DO NOT delete the quest ID Inspector field. If you don't remember the quest ID number, you will need to reserve a new one. If a particular quest is a used in a dependency list, you will need to edit all of the quests that depend on it after you change the quest ID.
You can chain quests together using Quest Dependency IDs. To get started, click the arrow to the left of the field to expand this section. Set the Size field to the number of quests that will need to be completed before this quest is available. Click Enter, and that number of fields will appear. In each empty field, add the individual quest ID of one of the quests that must be completed by the user prior to the start of this particular quest.
This option allows you to have multiple quests initiated by the same quest NPC, in a series.
You can set a reward for successful completion of a quest using the Reward ID field. Simply enter the Curator ID for any virtual good item you have uploaded. You can get this from the Virtual Good component attached to the reward object (once it has been uploaded), or from the Item panel in Curator.
Please note that the reward virtual good object must be live before it can be distributed by a live quest.
The Open Canvas button opens a Quest Designer Canvas, which allows you to build your quest by adding steps. To get started, add the first step, and reference the Quest NPC object (by placing the object into the Quest NPC field).
After you've set up your Quest Giver object and customized your basic quest functionality, you can add quest steps one at a time in order to flesh out your story. Each time you add a step, it will duplicate your last step.
Open the Quest Designer Canvas, as described above. Click the Add Step button.
You can delete any step within a chain; its children will be reconnected to the parent step. You cannot delete the first step.
Click the arrow at the top left corner in the Step Inspector window to reorder your steps. You cannot reorder the first step. If there are only two steps in your quest, you won't see the arrow for the second step.
The NPC step type is mandatory for starting the quest. Step 0 will always be an NPC step, and you cannot edit it to make it a different type.
Other steps can also be NPC steps. Simply use a Game Object (or any object) and attach the Quest NPC component to it, placing it in the Destination NPC field.
Activity steps are general steps which you can use to deploy a wide range of activities the user must complete before the next step initiates. Here is a breakdown of the various fields.
You can drag any Startable component into into the Activity field in this step.
The 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. You can also write your own startables, which can be full game rounds or learning modules. After proper setup, the user will need to complete each one before moving on with the quest.
For more information on startables, please see the additional documentation available here.
Check the "Autoplay" option if you want this step to start immediately after the prior step is completed. If you leave the Autoplay option unchecked, the user will need to click the quest NPC to cue the next step.
You may need to leave Autoplay unchecked if your prior step is one that is registered as complete at the start of the step, and the user will still be engaged in an unrecorded activity. For instance, if the prior step was an activity step using StartableGestureRequirement, the quest system will register the user as having completed the step when they initiate a gesture—but that gesture may take thirty seconds to play, during which you may not want the next step to initiate.
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, such as a learning component with a passing grade. Or it may be because they logged out, or were disconnected halfway through the deployment of the startable.
The Replay NPC can be your original Quest NPC—but if that is geographically some distance away 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.
If you are using NavMesh to guide your users around the quest, the area hint will tell them where to go. This might be the same object as the Replay Discussion NPC, but it can also be any game object you drag into the field.
Quest steps allow 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.)
This is the field where you will paste the ID of the child quest.
Visit location steps require the user to go to a specific place in your region to continue the quest.
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 NavMesh to lead users to their goal via a visible path.
This creates a "proximity halo" around the target objects, within which a user's presence will be registered. For instance, you may want to specify that users must travel within one meter of an object.
A Collection step requires the user to click on and "collect" a specific game object in the scene.
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 on it.
If you want NavMesh to lead a user to the collectible, you can drag it into the Area Hint field. If you want users 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.
A 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.
This field specifies 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.
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.
Use this field in conjunction with the NavMesh feature to guide people to an area, or drag your Quest NPC here to guide users back to the start of the step should they relog before completion.
Conversation steps allow you to build cutscenes into the quest, with successive combinations of dialogue, camera, audio, and animation assigned to both the NPC and the player.
To edit a conversation step, open the Quest Designer Canvas (using the Open Canvas button at the bottom of the quest chain in the Inspector window). Then look for and edit the following fields.
The conversation actors can be one or more NPCs and the player themselves. Add an actor and drag any object with the Quest NPC component attached to it to the NPC Object field.
Actor Name
This name will appear in dialogue panels during the conversation.
Check this box to use the player as your actor. Enter %PLAYER% into the Actor Name field to use the player's own username in dialogue.
Add an empty game object in the scene to this field to move your player to the location of that object for the duration of the conversation. This allows you to align the player with specific camera shots defined by you during the conversation.
Once you have defined the actors in your conversation, you can add as many steps to the conversation as you like.
Choose the actor narrating the dialogue step.
Enter the text as it should appear in the dialogue panel.
Add an animation to the NPC or the player.
Check this box if you want the dialogue step to remain on the screen until the user clicks Continue.
Define a time in seconds if you want one set of dialogue to end and the next to start automatically without the user clicking Continue.
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 within Unity, and then highlight the game object. In the top menu, go to GameObject > Align with view to move the position and rotation of the game object to your view.
You can add audio clips to the dialogue by dragging an audio file from your project into this field.
Check this box if you want the mouth of the actor to be animated by your audio file.
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 contains the Continue button users can access if you decide to include that function in your dialogues.
Make sure the Panel, which is a child of the Canvas, is disabled (the checkbox at the top of the Inspector). This ensures that 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. Otherwise the canvas will be offset or invisible to the players.
Branch NPC steps allow you to set up several options from which your players can choose. This can lead to different quest steps based on the user's choice.
Startables are components that you can drag into the Activity step of a quest. You must attach the startable component to a relevant game object; it some cases, this might be an empty game object created just to house the startable. You can then drag that object into the Activity field of an Activity step.
This startable will require the user to play a specific gesture in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Item ID
This field contains the item ID number for the specific gesture you want the user to play. You can get this ID number from the VirtualGood component attached to the gesture once it has been submitted, or from your item list in Curator.
Any
If you are willing to accept any gesture to complete the quest step (as opposed to a specific one), you may check this box.
Min Participants
This option defines the minimum number of gesture participants required to complete the step. For instance, you can set this option to "2" and tick Any to require the user to do any two person gesture with another user.
This startable will require the user to wear a specific clothing item in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
These fields allow you to specify two items of clothing that can be worn to fulfill the requirement. For instance, you may specify one male and one female clothing item. You can get this ID number from the VirtualGood component attached to the clothing item once it has been submitted, or from your item list in Curator.
This startable will require the user to sit on a specific furniture item in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Add the SeatImproved component to any game object in your scene, and then drag that game object into the Target Object field. Remember that this item can also be animated—so you could, for instance, use this step to fly someone from one part of your region to another.
The quest step will complete as soon as the user sits down. If sitting down initiates a sequence that you want to play out before the next quest step launches, you may want to make the next step not initiate automatically. Instead, you might require the user to click another Quest NPC object to continue.
This startable will require the user to have a specific item in their inventory in order to continue the quest. They do not need to use the item, merely possess it. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
This is the item you want the user to possess in order to continue. You can get this ID number from the VirtualGood component attached to the item once it has been submitted, or from your item list in Curator.
This startable will require the user to visit a specific region in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Put the region ID in this field to specify where the user needs to go. If you own the region, you can find this ID number in Curator.
This startable will require the user to take a snapshot with the in-world snapshot feature in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Here you can specify the number of snapshots the user needs to take in order to complete the step.
This startable will teleport the user to a specific location in the same region in order to continue the quest. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Drag any game object in your scene into the target field to teleport the user to the location of that object in-world. To ensure that users do not arrive on top of a tree or similar, it usually makes sense to create an empty game object exactly where you want them to arrive.
This option allows you to add a time delay before the teleportation takes place. A small delay (around 1 second) is recommended to ensure all actions as part of the prior step have time to complete. A longer delay might, for instance, be used in conjunction with a specific gesture playing in the prior step.
Startable Timed Counter is a game component you can add to your quest, requiring the user to collect a number of counters inside a specified time frame. Use this startable in conjunction with objects in the scene that have either the Quest Counter Clickable or Quest Counter Proximity component attached. The individual fields are detailed below.
This option is available on all startable components. Checking this box will make it so that a user cannot initiate the specified activity if another activity is already in progress. For example, if one quest is waiting for a user to press a button, then they will not be able to initiate this quest at the same time—they will need to complete the button-pressing quest first.
Number Required
Here you can 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.
Seconds Limited
This option defines the duration of the round. If the user fails, they can re-click the NPC to try again.
Counter ID
In this field, 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.
The Statue component is most commonly used for creating NPCs within a scene. It allows you to dress your NPC using any clothing or accessory items you can own in-world—both your own virtual goods, as well any items you buy or receive from another creator.
To use the script, apply it to an empty capsule collider in your scene, or use the NPC template prefab in your Space Editor Pack. You can then edit the fields that appear, which are described in more detail below.
NPCs are easily distinguished from real avatars in-world, seeing as they do not have hover text displaying their name overhead. However, you can still give your NPC a name using this field. This name will appear in quest dialogue steps.
In Breakroom, every saved avatar or avatar look has an associated outfit ID number. You can use this number to apply a saved avatar look to any NPC.
To do so, note the outfit ID number that you want to use. In Unity, add this number to the Player Outfit ID box on the NPC Statue component, then upload the NPC as normal.
If you want to apply a material on top of the NPC, you can add it here. This can result in NPCs that look like holograms, stone statues, etc.
If you want store mannequins that show off a specific item while otherwise appearing like plastic or stone, just add the store ID of the item you want to show off to the Skip Material Change ID field. This will allow you, for instance, to create a silver mannequin with just the sunglasses you are selling retaining their original materials. You can find the item ID in the Virtual Good component attached to it or by using Curator; the ID will appear as soon as the item is submitted.
You can enlarge your NPC until it's a giant towering over the scene, or shrink it down to the size of a sprite. Statues (and avatars in general) will not respect Unity embedded scales on the Transform. This is to prevent them from being scaled when you have them seated on an object which is not 1,1,1.
You can use the NPC system to deploy crowd scenes. Disabling shadows and optimizing draw distance on each NPC will improve performance.
By default, your NPC will use the standard idle animations. You can override this by adding your own animations.
Check this box, and your chosen animation will launch at a random point in its timeline. This is useful for generating crowd scenes where you do not want multiple NPCs performing identical animations in sync on the screen.
Add the Quest Counter Clickable component to counters the user must click on to collect. Enter an ID of your own creation into the Counter ID field, and then add that same ID to the Counter ID field of a relevant 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. Enter an ID of your own creation into the Counter ID field, and then add that same ID to the Counter ID field of a relevant Counter quest step or the Startable Timed Counter component. Specify the distance from the object that will trigger a successful collection in the Trigger Distance field.
This component allows you to rez and and derez items in your scene during specified quest steps. Objects can only be seen by the player.
Configurable parameters include:
QuestID
MinStep
MaxStep
Attach this component to other objects (preferably a parent group, if you're updating multiple objects in a single step). It will enable or disable the object it is on, based on whether the user is inclusively on any step between the specified Min and Max.
This component will place an object at the origin of the avatar; 0,0,0 relative to that avatar, non-attached. To offset an object, place the empty parent object with PlaceAtOrigin script and then offset the visible object from the invisible parent.
Use this in quest text fields to add the player name to in-game 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 this component to NPCs designed to automatically accept gesture invites.