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
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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