Quest creation guide

Getting started

Installation

Unzip the download to your garrysmod/addons folder. It contains two folders, mc_quests and msd_ui, and both must be placed inside the addons folder. msd_ui is the MSD library used by all MacNCo addons; if you already have it from another product, replace it with the version from this download.

MQS 1.7.0 requires MSD 1.1.0 or newer. Older MSD versions will not load.

Content downloads automatically, but here is the workshop addon if you need it: https://steamcommunity.com/sharedfiles/filedetails/?id=2486994157

Configuration

The main configuration is done in game, inside the Administration Menu. To open it, click the MSD icon in the context menu, type the mqs_editor console command or the /mqs chat command.

Two access levels can be set in Settings:

  • Full access - user groups that can change the server settings and edit everything. owner and superadmin by default.
  • Quest editors - user groups that can create, edit and test quests. admin by default.

More about the settings and console commands in Settings and commands.

Quest creation

Quest list

The Quests tab shows all quests of the current map with their ID and status. Click the download icon in the header to load the play statistics: Total plays and Unique players will be shown for every quest.

Quest list with play statistics

Creating a new quest

To create a new quest navigate to the Quests tab and click the Add new quest button. If you started a new quest earlier, you can load the autosave or start from scratch.

image-1621608595155

While you edit a quest, it is saved automatically every minute. If the menu was closed or the game crashed, open the quest again and press Load autosave. We still recommend submitting the quest after the basic setup and editing it later, so you won't lose progress.

If you use the menu opened via the console or chat command, press the circle near the close button to hide the menu without losing the editing page.

image-1621608988940

Quest main options

In the Main options tab, you can set up the basic rules for the quest. Here is a description of all parameters:

Name - Displayed quest name, shown to players in the list of available quests.

ID - Must be unique for each quest. Used to store data, access the quest from other addons and console commands, and helps you navigate through quests.

Category - If you have enabled the Sort quests by category option in the settings, type a category for the quest and it will be sorted by it in the main menu.

Description - Displayed to players in the list of available quests and on the screen when the player starts the quest. We recommend keeping it simple but informative.

Complete message - Displayed to players on the screen when the quest is finished. Can be useful to show the player which reward they got.

Do time - Time in seconds after which the quest will fail or succeed, depending on the next parameter. Leave it blank to disable the timer.

Fail/Succeed quest on time end - Works only if Do time is set. Failing the quest on time end solves problems with players going AFK while playing important quests. Succeeding the quest on time end is useful for looped quests, especially for MilitaryRP.

Allow to abandon quest manually - Allows players to hold a key and stop the quest at any time. A stopped quest counts as failed. Players will see a hint with the key.

YDiepeDesJQTqU6J-image-1650446619988

Loop quest tasks - Can be enabled only if Do time is set. The quest starts over after the player completes all objectives. Useful for bus drivers, city services, military or police patrols and more. If Fail quest on time end is set, the Do time is reset on each loop.

Reward player on each loop - Rewards the player every time a loop is completed. If this option is off, the player gets the reward only when they stop the looped quest or when Succeed quest on time end is set.

Fail quest on player death - Fails the quest if the player dies.

Public cooldown timer - The cooldown affects everyone on the server, even players who didn't play the quest, and resets on server restart. If not set, the cooldown is individual for each player and is saved, so it survives restarts. Use it for daily or weekly quests.

Cooldown on finish/fail - Cooldown before the quest can be started again after it was finished or failed.

Players limit for the quest - How many players can play the same quest at the same time. If the quest spawns a lot of vehicles, NPCs or entities, we recommend a limit of 1 player.

Players amount needed to start - How many players must be online before anyone can start the quest.

Setup team limits - Same as the previous parameter, but per team.

Disable quest replay - The player can't replay the quest after completing it. Useful for story-driven quests.

Require completed quest - The player must complete another quest first. Click the button and search the quest by name or ID.

Team whitelist - Only whitelisted teams have access to this quest.

The whitelist is a blacklist - Turns the whitelist into a blacklist: listed teams will not have access to this quest.

Enable quest or link it to an NPC - This option depends on your server settings. Enabling the quest makes it playable for all players; otherwise it can only be tested by quest editors. If quest NPCs are enabled, click Link quest to an NPC and search the NPC by name; the quest can then be played only through that NPC. We recommend doing this only after you tested the quest.

Set custom icon - Sets a custom icon for the quest, shown instead of the information icon. Enter the icon URL.

The icon must be in png format and square. 68 by 68 pixels is the recommended size.

image-1621612746799

Setup quest blacklist - Quests that will be disabled for the player after they played the current quest at least once. Helps to create storylines with choices.

Setup quest conflict list - Quests that block this quest while someone is playing them. Use it for quests that use the same place, vehicles or NPCs.

Check that the vehicle spawn point is free - The quest can't start while another vehicle stands on the spawn point of a Spawn vehicle event.

DarkRP note: wanted and arrested players can't start quests.

Objectives

Overall information

To add a new objective press the Add new objective button. To edit an objective, click on it. Objectives are played in order from the first to the last one. The objective list shows the icons of the events each objective has.

To change the order, right-click an objective and choose Move objective up or down, or Swap it with another objective: the target objective is highlighted, click another objective to swap their places.

image-1621615670512

With Edit mode you can select multiple objectives and move them. Left-click two objectives to select them and all objectives in between. Click any selected objective to deselect. To move the selection, right-click the objective with the position you need and choose Move.

ahb8ZT9YW22pMupp-image-1650450620507

To remove an objective choose Remove from the right-click menu. Duplicate copies the objective with all its events.

Objective settings

Every objective needs a description. It is shown to the player on the HUD and should tell them what to do.

Here is the list of objective types:

Move to point

Reach a point on the map.

Distance to point - How close the player must be to the point. A lower number means the player must be closer.

Move point - Point on the map. Can be set to your position, your aim position or the position of the entity you are looking at.

Map marker - Icon shown on the HUD.

Mark area - Marks the area the player must enter, like here:

image-1621689190854

Ignore quest vehicle - Only matters if a quest vehicle was spawned earlier. If checked, the player can reach the point without the vehicle; otherwise only inside the quest vehicle.

Vehicle must fully stop at the point - The objective completes only when the quest vehicle has stopped. Useful for bus stops and deliveries.

Move to any point

The player can go to any of up to three points. Each point has its own description, distance, map marker and Skip to objective ID, so the quest can branch: different points can lead to different objectives. Leave Skip to objective ID blank to continue with the next objective. Only points marked as Active are used.

Move to any point settings

Leave area

Same as Move to point, but the player must leave an area.

Distance to point - How far from the leave point the player must travel.

Leave point - Point on the map.

Mark area and Ignore quest vehicle - Same as in Move to point.

Leave area LP

Leave the area around the last point: the position of the last NPC spawned by the [MCS] Spawn npc event. Useful after a dialogue with a spawned NPC. Settings: Distance from point and Ignore quest vehicle.

Kill NPC

Kill quest NPCs.

Allow other players to kill NPCs - Any player can kill the quest NPCs; otherwise only the player who started the quest.

Show entities location to the player - Shows markers on the NPCs within the distance set by the next parameter.

Min. distance to NPCs - How far from the NPCs the player must be to see the markers.

Map marker - Icon shown on the HUD for the NPC.

This objective needs a Spawn NPC event with the NPC is an objective target option. If several NPCs are targets, all of them must be killed. NPCs without this option act as decoys or protection and remain after the objective. Target NPCs that fall under water are moved back to the surface.

Kill random target

Kill a number of NPCs or players.

Target type - NPC or player. NPCs can be any NPCs of the class set in the next option, even ones spawned by the map or other addons. If you filter players by team, make sure you set up team limits in the main options.

NPC class or player team - NPC class name or team name. If not set, any NPC or player counts.

Amount of targets to kill - Kills needed to complete the objective.

Wait time

A timer the player must wait before the next objective.

Time to wait - Time in seconds.

Show the timer to player - Shows the remaining time next to the objective description.

Player must stay in area - Area size linked to the timer. If set, the quest fails if the player leaves the area before the time is up. Leave it blank to disable this and the next options.

Area position, Mark area and Ignore quest vehicle - Same as in Move to point.

Collect quest ents

Collect quest entities by pressing the use key on them. Needs Spawn quest entity events: the more entities are spawned, the more must be collected.

Amount to collect - Collect only this number of entities. Leave it blank to collect all of them.

Show entities location to the player - Shows the distance to the closest entity next to the objective description.

Search area size and Search area position - Area marked on the map so the player can find the entities.

Mark area - Marks the search area.

Quest entities can also be destructible: then they must be destroyed instead of picked up, and a health bar is shown above them. See the Spawn quest entity event.

Talk to NPC

Available only with MAC's Simple NPCs. The quest continues when the player chooses a dialogue answer with the MQS Continue quest action. More about it in the integration guide.

Select an NPC - One of the NPCs on the map.

Dialog ID to open - ID of the dialogue line opened when the player talks to the NPC.

Map marker - Icon shown on the HUD for the NPC.

Start the dialogue automatically - Opens the dialogue as soon as the objective starts, without walking to the NPC.

Randomize

Picks one of the selected objectives at random and continues from it. Use it with Skip to objectives to create random routes.

Skip to

Jumps to the selected objective. Use it to create loops or to end a branch of the quest.

End of quest

Ends the quest at this objective. Useful when the quest has several endings.

Final message - Replaces the default success message. Leave it blank to use the quest Complete message.

Notification type - Color of the message: 1 - yellow, 2 - red, 3 - green, 4 - blue.

Rewards - Enable rewards for this ending. They replace the quest rewards, so every ending can give its own reward. Reward settings are shown in the right column.

End of quest rewards

Events

Overall information

Events are actions that happen when an objective starts. They change the quest environment as the player progresses. Click Add event and choose an event from one of the categories: Spawn, Remove, Player, Quest, Sounds, Map and Server.

Add event menu with categories

Right-click an event to remove or duplicate it. When you edit an event, you can give it a custom Event name; the list shows the name and the main value of the event (class, weapon, amount), so long quests are easier to read.

Spawn events

Spawn entity

Spawns any entity. To spawn a prop enter prop_physics as the class. You can spawn an entity first, customize it and use the Copy buttons to take all information from it.

ezgif-3-7d0fa57915c1

Custom ID - Lets you remove these entities later with the Remove entities by ID event.

Disable collisions - Players and vehicles pass through the entity.

env_steam and env_spark entities are set up automatically, so you can add steam and sparks to a scene.

Spawn quest entity

Spawns an entity for the Collect quest ents objective. Set it up the same way as Spawn entity. It can look arcade-styled or like a normal entity, and the pointer above it is optional.

1

Hold [E] key - Delay in seconds before the entity is picked up.

2

Attach to the quest vehicle - The entity is attached to the quest vehicle.

Skip to objective ID on pickup - Picking up this entity jumps to the given objective.

Shake the entity while it is being used and Sound while using - Feedback while the player holds the use key.

Must be destroyed - health - Makes the entity destructible: the player must destroy it, and a health bar is shown above it.

Spawn NPC

Spawns an NPC that is hostile or friendly to the player. Quest NPCs ignore damage from other players. To copy an NPC class, right-click the NPC in the Q menu and choose Copy to clipboard. Leave the model blank to use the default model of the class, enter a model path, or use mcsnpc+<id> to copy the look of an MCS NPC.

NPC is an objective target - Needed for the Kill NPC objective.

Protect objective - The quest fails if this NPC dies. The NPC gets a marker and its distance is shown on the HUD. Set the Protect objective text to tell the player what to do, and use the Stop NPC protection event when the NPC is safe.

Flags - Extra behaviour, separated by ;:

  • team h - hostile to players and to the other teams of this NPC class.
  • team n - neutral until a player hits one of them, then the whole team attacks that player.

NextBot NPC - Enable it for NextBots: relationships and flags are not used for them.

[MCS] Spawn npc

Spawns a MAC's Simple NPC by its ID. Enable Remove the NPC with this ID instead to remove it later. The position of the last spawned NPC is used by the Leave area LP objective.

Spawn vehicle

Creates a quest vehicle and makes the quest vehicle-based. If the vehicle is removed or destroyed, the quest fails.

Supported vehicle types: default vehicles, simfphys, LFS / SW and Glide. Quest vehicles are locked for other players.

To copy the vehicle class, right-click it in the Q menu and choose Copy to clipboard, paste it into the MQS menu and choose the vehicle type. To set the spawn position, place a vehicle where you need it and copy its position. To avoid the vehicle getting stuck, place it slightly above the ground.

ezgif-2-a9288072d123

Spawn vehicle with the Glide type

Spawn additional vehicle

Spawns extra vehicles for the quest, for example a convoy. The quest doesn't progress while the quest vehicle is too far away from them.

Remove events

Remove all entities

Removes all entities created by the Spawn entity event. Keeps the map clean in long quests.

Remove entities by ID

Removes only the entities with the given Custom ID.

Remove vehicle

Removes the quest vehicle with the delay you set. The quest is no longer vehicle-based after it.

Remove additional vehicle

Removes the vehicles spawned by Spawn additional vehicle.

Stop NPC protection

Ends the protect objective of Spawn NPC: the NPC can die without failing the quest.

Player events

Teleport player

Teleports the player to a position. The player leaves the vehicle first. With DarkRP, Move to the closest free spot prevents players from getting stuck in each other.

Set spawn point

Sets where the player respawns while the quest is active. Remove the spawn point to use the default spawns again.

Give weapon / Strip weapon

Gives or strips a weapon by class. Weapons given by the quest are removed when it ends and can't be dropped.

Strip all weapons / Restore all weapons

Takes all weapons from the player and gives them back later, or at the end of the quest if Restore weapons on quest end is enabled.

Give ammo

Gives ammo to the player. Choose the amount and the ammo type from the list of all ammo used on the server.

Set HP / Set armor

Sets a custom amount of health or restores full health. Armor can be set from 0 to 255.

Track player

Shows the player's position to other teams, for example police. Set the map marker, the displayed text and the teams that see it. End track player stops it.

DarkRP Wanted

Makes the player wanted with the given reason. Only with DarkRP.

Set Job Name

Changes the player's job name while the quest is active, for example "Courier". The original name is restored when the quest ends. Only with DarkRP.

Quest events

Manage do time

Resets the do time to the original quest time or adds more time. Useful for time trial quests.

Kill Penalty

Penalty for killing a player during the quest: Fail the quest or Arrest the player (DarkRP). Use Remove the penalty to turn it off again.

Check for vehicle

Fails the quest if the quest vehicle is farther than the given distance from a position. The quest is no longer vehicle-based after it, so use it when the player must leave the vehicle somewhere.

Cinematic camera

Shows a camera shot from one position to another, with optional text, delay, duration, shutter effect and FOV change. Several cameras in a row create a cutscene.

Sound events

Music player

Plays music from a URL or game path. Enable Loop to repeat it. Music stops when the quest ends; to stop it earlier, run the event again with an empty path.

Music player pos

Plays 3D music at a position, for example a radio in a room. Every Unique ID is a separate sound, so several can play at once.

Emit sound / Player emit sound

Plays a game sound at a position or from the player, with volume and sound level.

Map and server events

Ent Fire

Fires an input on a map entity: open doors, press buttons, turn lights on. Use the Map creation ID of the entity, the input name and optional parameters.

Run Console Command

Runs a server console command. $uid, $sid, $s64 and $n are replaced by the player's UserID, SteamID, SteamID64 and name.

Rewards

To give the player a reward after finishing a quest, enable it in the left column and edit its settings in the right one. Rewards can also be set for an End of quest objective.

Available rewards:

  • Give weapon
  • DarkRP money and DarkRP karma - DarkRP only
  • Helix money - Helix based gamemodes
  • Run console command
  • Remove quest played data - lets the player replay the listed quests
  • MRS - rank reward for MAC's Rank System
  • Leveling System, GlorifiedLeveling, Elite XP System and Wiltos skill XP - XP rewards
  • Pointshop and Pointshop 2 - points and items
  • WCD - give a car
  • GAS Job Whitelist - whitelist the player for a job

Rewards from addons that are not installed are hidden.

Testing and preview

Check for errors checks the quest for missing settings before you submit it.

Preview quest entities shows the quest in the world without playing it: entities, NPCs, vehicles, teleports and zones of all objectives, with their objective and event numbers. You can show only one objective, and turn colors, materials and transparency on or off.

Quest preview in the world

Additional information

To finish the setup click Submit quest. If the quest is active or linked to an NPC, all players can play it.

To copy a quest from another map or make a copy of a quest, open the Copy data menu. The left column contains the quests of the current map, the right one the quests of the map you enter in the search field.