Tutorial Exploring Quests

death_knight

Dark is the heart of a corrupted man.
Reaction score
24
The aim of this tutorial is to explain a bit about quests.

In this tutorial, we will look at:
  • Some of the ways you would receive a quest
  • Quest messages
  • Creating/Discovering Quests
  • Quest requirements
  • Quest descriptions
  • Quest failure conditions
  • Completing a Quest

1.0 Receiving Quests
This is the first step when considering quests is considering how they will be given to the player. This is very map dependant. Below is a list of possible ways to give a player quests:

  • Unit-given quests
  • Quests arising from situations (like a messenger dying in battle)
  • An overall mission quest (e.g. survive for 30 minutes), usually given after an introductory cinematic

There are a number of possibilities that are not on the list above, but the ones listed above are the main ones which people will use and thus they will be explored.

1.1 Unit Given Quests
Unit given quests are done by having a notable player unit (e.g. hero or important non-hero unit) near the quest-giver unit. The quest may also have the prerequisite that the player has their notable unit near the quest-giver as well as selecting the quest-giver unit.

Below are example of both cases:
1.1.1 Getting close to the quest-giver to receive the quest
Code:
Getting Near the Unit
    Events
        Unit - A unit comes within 'x' of <QGU> <gen>
    Conditions
        (Triggering unit) Equal to PlayerUnit
    Actions
        -------- Quest Actions --------

Where 'x' is the range which trigger the actions (as long as the conditions are met), PlayerUnit is the player's unit and <QGU> <gen> is the quest-giver unit.

1.1.2 Getting close to and selecting the quest-giver to receive the quest
Code:
Getting Near and Selecting the Unit
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (Triggering unit) Equal to <QGU> <gen>
    Actions
        Unit Group - Pick every unit in (Units within 'x' of (Position of (Triggering unit))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Picked unit) Equal to PlayerUnit
                    Then - Actions
                        -------- Quest Actions --------
                    Else - Actions

Where 'x' is the range which trigger the actions (as long as the conditions are met), PlayerUnit is the player's unit and <QGU> <gen> is the quest-giver unit.

The first one is good if there is a lot of room to move around the quest-giver unit so that the player can avoid receiving the quest for whatever reason.

The second one better because it makes sure that the player doesn't unintentionally receive the quest, and it can be used for quest-giver units where there isn't a lot of room to move around them.

1.2 Quests Arising from a Situation
This is a good way of receiving quests as there is a theoretically infinite number if situations you can have. For example, in one area you could have a situation where a messenger dies and you have to deliver their message, a situation where you are robbed by bandits and they steal something important, and a situation where a major enemy is seen moving through the area in great numbers.

The number of situations you can have for one area is only limited by your imagination and patience!

The way these situations are put together usually involve the player triggering a cinematic (by entering a particular region, for example) which will depict the situation. After the cinematic is done, then the quest is given. I don't have the space, patience or time to give you a worked example, but just remember:

  1. Triggering Event
  2. Cinematic Sequence
  3. Give the Quest

1.3 Overall Mission Quest
These quests are quests which are given after an introductory cinematic and also precede each other (if applicable).

The first main quest is always given after the intro cinematic. This could be to establish a base or destroy an enemy's base. If there are more main quests for the player to do (e.g. launch an assault after establishing a base), then the next main quest is given shortly after the completion of the preceding main quest. Once the final main quest has been done, then typically the map will end with victory.

Many of these quests have a defeat condition, while others won't. For example, if you are escorting a convoy of 4 kodo beasts from one place to another, then a defeat condition may be that 2 must survive the entire journey; while a quest such as establishing a base will not have a defeat condition.

2.0 Quest Messages
Quest Messages are very versatile as they can be used for a number of things (as seen in the list below).

  • Quest Discovered
  • Quest Update
  • Quest Completed
  • Quest Failed
  • Quest Requirement
  • Mission Failed
  • Hint
  • Simple Hint
  • Secret
  • Warning
  • New Unit Acquired
  • New Unit Available
  • New Item Received

What you use all of these different types for is pretty self explanatory, but you must make sure you use the right colours for the right types. For all quest related messages, the title (i.e. "Quest Discovered", "Quest Update", "Mission Failed", etc.) are coloured yellow. "Hint" and "Simple Hint" are coloured light green. "Warning" is coloured red. "New Unit Acquired", "New Unit Available", "New Item Received" are light blue. I'm not sure what colour "Secret" would be.

3.0 Creating/Discovering Quests
Creating a quest is quite simple process. In this section, we will not look at how these triggers are set in motion (that's up to you), only what they do once they are.

3.1 Creating a Quest
There are two things that you need to do before you make this trigger:

The first is to figure out how you set this trigger. This could be anything from having an action at the end of a cinematic trigger which runs the quest creation trigger to having it run at the beginning of the map through the use of a trigger with a "Map Initialization" event.

The second is to make sure that this trigger, once run, will not be able to be run again. The way used in the maps for the campaign "Founding of Durotar" is setting the trigger it "Initially On" with no events. When the trigger was run, it would check whether or not it was on, and then ran the actions, one of which was turning it off.

Apart from the action(s) which will help you make sure this trigger can't be run again, the actions you need can be seen below. To help me iterate what you need, I'm suing a quest creation trigger I'm using in my current project:

Code:
Quest HonourOfTheFallen Create
    Events
    Conditions
        ((This trigger) is on) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        -------- Create the quest objects --------
        Quest - Create a Required, undiscovered quest titled Honour of the Falle... with the description For the sake of hon..., using icon path ReplaceableTextures\CommandButtons\BTNShaman.blp
        Set QuestHonourOfTheFallen = (Last created quest)
        Quest - Create a quest requirement for (Last created quest) with the description Deliver Moggar's me...
        Set QuestHonourOfTheFallenReq1 = (Last created quest requirement)
        -------- Flag Quest Progress --------
        Set QuestHonourOfTheFallenProgress = (Max(1, QuestHonourOfTheFallenProgress))

The condition and the first action are the fail-safe to make sure the quest isn't created again (just as I aforementioned).

The next action is creating the quest. Make sure you do 4 things:
  1. Make sure it's an "Undiscovered" quest.
  2. One mistake (which I'll explain in more later) is writting the quest requirements in the quest description. DO NOT do this.
  3. Make sure the icon is appropriate to the quest.
  4. Make sure the description doesn't include the quest objectives.

The next action assigning the quest to a variable so that it can be easily referred to later.

The third action is cheating the quest requirement. You can have as many of these as you like. The fourth action is assigning the requirement to a variable so that, just like the quest, it can be easily referred to later.

The last action refers to setting the progress of the quest. The variable is an integer. For (Max(1, QuesthonourOfTheFallen)), it picks the greater value of the two given values. For more info on it, see[http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=39620]. This variable indicates the progress of the quest from creation to completion.

3.2 Discovering the Quest
Discovering the quest can be a separate process to creating it. For the purpose of this tutorial, it will be regarded as a separate process.

When the appropriate time arrives, the quest will need to be marked as discovered so that the player can refer to the details of the quest using the quest menu should the need arise. To make sure this process is done correctly, there are a couple of steps that need to be made.

  1. The first step is to run the quest creation trigger to make sure that the quest does indeed exist. If it already exists, then the fail-safe that you should have in place will prevent the trigger from creating it again.
  2. The second step is to mark the quest as a discovered quest.
  3. The third step is to send the player a quest message to indicate that the quest has been created as well as provide a quick overview of the quest objectives.
  4. The final step is to set the quest progress variable to 2. Setting this variable to 2 indicates that the quest has been discovered.

Once you have done this, your discovery trigger should look something like this:

Code:
Quest HonourOfTheFallen Discovered
    Events
    Conditions
    Actions
        -------- Ensure that the quest exists --------
        Trigger - Run Quest HonourOfTheFallen Create <gen> (checking conditions)
        -------- Update the quest --------
        Quest - Mark QuestHonourOfTheFallen as Discovered
        -------- Display a quest message. --------
        Quest - Display to (All players) the Quest Discovered message: |cffffcc00MAIN QUES...
        -------- Flag Quest Progress --------
        Set QuestHonourOfTheFallenProgress = (Max(2, QuestHonourOfTheFallenProgress))

4.0 Quest Requirements
This is a very important part of creating your quests as it makes life easier. Let me explain by describing what some people do in the quest description.

For example, if the objective of the quest was to bring a message to a person, then people would make the quest description something along the lines of the following:

-- Deliver Message to X

Your goal is to deliver a message to X.

I know my example is brief, but you get the idea.

There are two reasons why you don't do this:
  1. Especially if you have multiple objectives, it can get very messy when it comes to marking the objectives as complete because it involves long, messy triggers to change the quest description as well as the use of colour codes.
  2. Using quest requirements rather than doing it this way is so much easier and requires less triggers and actions. This means that's easy, short, and clean.

Instead of doing what's in the example above, create the quest requirement(s) and then just set the quest description to purely the description of the quest.

Using the previous example, you should set "Deliver the Message to X" as a quest requirement, and "Your goal is to deliver a message to X" as the quest description. As I aforementioned, this makes it easier as all you have to do to mark the objective as complete is to use the one relevant to mark it as complete.

Be sure to, when you create the requirement, to assign it to a variable to that when the player completes it, it can be easily referred to and thus marked as complete.

5.0 Quest Failure Conditions
Defeat conditions are conditions which, when fulfilled, cause the player to fail the quest. This could be anything from losing all your buildings to letting your hero die. The only thing is they are generic, so they apply to all quests. This means that if you create a defeat condition such as "X must survive", then it will apply for all quests.

I'm not entire sure how you would work a defeat condition. My suggestion is that instead of using a defeat condition, create another quest requirement which, in a sense, will act as a defeat condition for the specific quest. What you would have to do then is then trigger the circumstances where that requirement would be met, thus failing the quest or worse, failing the mission overall.

6.0 Completing a Quest
When all of the requirements have been met, then you can mark the quest as complete. I leave it to you to create the triggers that mark each requirement as complete. For the completion trigger, there are a number of things which could make it run. This could be checking whether or not all of the requirements are complete and, if so, running the complete trigger. It could also be that your main unit approaches the quest-giver unit for a reward.

There are a number of things that your completion trigger should have. These include:
  1. It should run the quest creation trigger again to be 100% sure it exists.
  2. it should mark the quest as discovered.
  3. t should mark all the requirements as complete.
  4. It should then mark the quest as complete.
  5. It should then send the player a message to indicate that the quest is complete.
  6. You should then include any "Cleanup" actions.
  7. Finally, you should set the quest progress integer to (Max(3,<quest Progress integer>))

A basic example from my quest can be seen below:
Code:
Quest HonourOfTheFallen Completed
    Events
    Conditions
    Actions
        -------- Ensure that the quest exists --------
        Trigger - Run Quest HonourOfTheFallen Create <gen> (checking conditions)
        -------- Update the quest --------
        Quest - Mark QuestHonourOfTheFallen as Discovered
        Quest - Mark QuestHonourOfTheFallenReq1 as Completed
        Quest - Mark QuestHonourOfTheFallen as Completed
        -------- Display a quest message. --------
        Quest - Display to (All players) the Quest Completed message: |cffffcc00MAIN QUES...
        -------- Flag Quest Progress --------
        Set QuestHonourOfTheFallenProgress = (Max(3, QuestHonourOfTheFallenProgress))


I hope this helps. Comments/Criticism/Suggestions of more content are welcome.

Cheers,

death_knight
 

tooltiperror

Super Moderator
Reaction score
231
Helpful for noobs, yet still not five star quality.

Approved.
 

death_knight

Dark is the heart of a corrupted man.
Reaction score
24
Any suggestions on how I could improve the quality of the tutorial? As in, have I forgotten anything? What requires more detail? What maybe wasn't necessary? And any other suggestions?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top