Tutorial: Easy Multi-user Quests

The Big S

New Member
Reaction score
6
(Hey guys - This is a small tutorial I made for my clan (Clan ORPG) and I thought I would share it with others - I'll be adding to it soon. I hope it helps!)


Tutorial Objectives: Upon completing this tutorial, users should be able to create dynamic quests for up to 12 players using a small amount of variables and triggers. These quests will be able to store just about any objective from killing X amount of creatures to delivering an item to someone.

(This tutorial was made by popular demand)

Tutorial Index:

To jump to a specific part of the tutorial, simply highlight the section name, copy it, and enter it into find (CTRL+F).

I. Introduction
II. Variables Needed
III. Our First Quest
IV. Tips for other quest types
V. Examples from Athelor ORPG
VI. Credits


I. Introduction

Have you ever wanted to create quests in a multiplayer game, whether it be an ORPG or a simple map? Most people use an approach which uses a huge amount of triggers and variables, which can take up un-needed space in your map and can be glitchy. Today you will learn how to create quests using 1-2 triggers, 3 maximum, and only 1-2 variables per quest.

To follow this tutorial without any problems, you will firstly need to be using the Warcraft III The Frozen Throne World Editor program. You also need to have a moderate knowledge of triggering and variable types/arrays.

II. Variables Needed

Firstly, all of our quests made using this system will be using a string array to store the status of the quest. Go ahead and set up the following variable:

Name: OurQuest
Type: String
Array: Yes; set the number of the array to the number of maximum user controlled players your map has.
Default Setting: "notstarted"

Now we have our basic quest variable. You'll see soon why using strings is so nice and simple.

III. Our First Quest

Today, I will walk you through how to create a simple delivery quest, as well as a tad more advanced kill X units quest. Let us start out with the delivery quest.

The quest objective in this delivery quest will be to deliver a letter from Jim to Bob. The letter is an item which will be called simply "Letter."

First, we will start out with acquiring/completing the quest. Create a unit and call him Jim, and then place him on the map wherever you want. Then create a new trigger. Let's call this trigger "QuestGiverTalk".

Now add the following events/conditions/actions to the trigger:

Events
- A unit comes within 100 feet of Jim 0001 <gen>

Conditions
- ((Entering Unit) is a hero) equal to True

Actions
If/Then/Else
If (All Conditions are true)
- OurQuest [(Player number of (Owner of (Triggering Unit)))] equal to "notstarted"
Then (Do Actions)
- Display to (Player Group (Owner of (Triggering Unit))) for 10 seconds the text "Quest Received: Deliver this letter to Bob!"
- Add Letter to (Triggering Unit)
- Set OurQuest [(Player number of (Owner of (Triggering Unit)))] equal to "started"
- Skip Remaining Actions
Else (Do Actions)
- Do Nothing
If/Then/Else
If (All conditions are true)
- OurQuest [(Player number of (Owner of (Triggering Unit)))] equal to "started"
Then (Do Actions)
- Display to (Player Group (Owner of (Triggering Unit)))] for 10 seconds the text "You already have this quest!"
- Skip Remaining Actions
Else (Do Actions)
- Do Nothing

Alright, now before you start panicking, lets look at this closely.

What this trigger does is, when a unit comes near the quest giver (Jim), and is a hero, the trigger executes.

First, it checks to see if you have the quest started or not. This is why we set the default for the string array to "notstarted", because when you start the game you have not completed any quests, nor started any.

If you have not started the quest, it gives you a little message saying you received the quest, adds the letter item to your inventory, and sets the status for your quest to "started". Why did we use "Player number of owner of triggering unit"? Because each number of the array corresponds to a player.

For example, OurQuest [1] is the quest status for player 1. OurQuest [2] for player 2, etc. So it updates the quest status only for the player who owned the unit that came in range of the quest giver.

Now we are going to make our second trigger, this time for finishing the quest by talking to Bob with the letter. Create a new trigger called "Finishquest".

Events
- A unit comes within 100 of Bob 0001 <gen>

Conditions
- ((Triggering Unit) is a hero) equal to True

Actions
If/Then/Else
If (All conditions are true)
- OurQuest [(Player number of (Owner of (Triggering Unit)))] equal to "started"
- ((Triggering Unit) has item of type Letter) equal to True
Then (Do Actions)
- Display to (Player group (Owner of (Triggering Unit)))] for 10 seconds the text "Quest Complete! Good job!"
- Remove item of type Letter from (Triggering Unit)
- Set OurQuest [(Player number of (Owner of (Triggering Unit)))] equal to "complete"
Else (Do Actions)
- Do Nothing

This trigger worked much the same way as the last. It just checked if the owner of the unit had indeed started the quest, and if they had the letter on them. If they did, it completed the quest for them. In addition, they now will not be able to retake the quest. (Although this can be changed if you wanted them to, just set OurQuest to "notstarted" instead of "complete")

IV. Tips For Other Quest Types

As I mentioned earlier, there really is no limit to what you can do with quests this way. Some quests, such as a kill X units quest will need two variables. One variable such as OurQuest (Array just like in the last example), as well as an integer array (With the array being the max amount of players). Then, just add a condition to the quest completion trigger:

- KillCount [(Player number of (Owner of (Triggering Unit)))] greater than or equal to 10

You would also need to have it update when you killed the correct unit type. Lets say we needed to kill 10 Trolls:

Events
- A unit dies

Conditions
- Unit type of (Dying Unit) equal to Troll
- ((Killing Unit) is a hero) equal to True

Actions
- Set KillCount [(Player number of (Owner of (Killing Unit)))] equal to KillCount [(Player number of (Owner of (Killing Unit)))] + 1
- Display to (Player group (Owner of (Killing Unit)))] for 10 seconds the text "Quest Update: You've killed a troll!"

This just adds one to the killcount every time you kill a troll. If you wanted to make it a set number like 10, just add the condition:

- KillCount [(Player number of (Owner of (Killing Unit)))] less than 10

So there you have it, an easy way to make killing quests and delivery quests!

V. Examples From Athelor ORPG

This section is coming soon!

VI. Credits

Tutorial created by The Big S
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top