dragonhord
Knowledge is true opinion. - Plato
- Reaction score
- 82
Basic Quest Tutorial: Quest Types and How to Accomplish them.
I looked in the tutorials and didn't see a completely efficient quest tutorial for COMPLETELY new people to the world editor so I thought why not make one? so here I go lol. If somethings wrong please let me know .
I. Objective
The creation of simple quests in maps such as rpg's and other maps involving quests.II. Implementation
Quests would be as follows...1.) Item Recovery
2.) Unit Kill
3.) Finding Someone
4.) Building Quests
1.) Item Recovery
Those are all I can think of and right now I'm going to teach you how to do each of the quest types. First off item recoveryTo start it off, you probably want a player to know that someone is offering them a quest... The simplest way to do this is with one of the handy exclamation points that blizzard so kindly offers us. The special effect is created above each quest giver in the game using the
Trigger:
- Special Effect - Create a special effect attached to the overhead of No unit using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
Trigger:
- Quest Effects
- Events
- Map initialization
- Conditions
- Actions
- Special Effect - Create a special effect attached to the overhead of (Triggering Unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
- Set QuestEffects[1] = (Last Created Special Effect)
- Events
The problem with this trigger is, there is no triggering unit. This was just an example of what your trigger should look like. You will have to do a number of things to make this effect function for each quest giver. First off you have to change (Triggering Unit) to your quest giver. To do this simply click the field that says (Triggering Unit) and click "Select a Unit", then find your unit on the map that you want to offer a quest. You have to do this for EACH AND EVERY unit that offers a quest... Then you want to assign these to a variable so that you can delete the special effects when a player acquires the quest. A variable is something in the world editor that stores a value of any kind for later use in your map. In this case we are using it to remember a special effect.
Trigger:
- Set QuestEffects[1] = (Last Created Special Effect)
Trigger:
- Corrupted Moon Well Start
- Events
- Unit - A unit comes within 200.00 of No unit
- Conditions
- ((Entering unit) is A Hero) Equal to True
- Actions
- Special Effect - Destroy QuestEffects[1]
- Quest - Display to (All players) the Quest Update message: Help me! Ive lost m...
- Quest - Create a Required quest titled Corrupted Moonwell with the description The moon well here i..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Set Quests[1] = (Last created quest)
- Trigger - Turn off (This trigger)
- Events
Trigger:
- Set Quests[1] = (Last created quest)
Trigger:
- Quest - Create a Required quest titled Corrupted Moonwell with the description The moon well here i..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Trigger:
- Trigger - Turn off (This trigger)
Trigger:
- Special Effect - Destroy QuestEffects[1]
Trigger:
- Set QuestEffect[1] = Last Created Special Effect.
Trigger:
- Corrupted Moonwell
- Events
- Unit - A unit Acquires an item
- Conditions
- (Quests[1] is enabled) Equal to True
- (Item type of item being manipulated) Equal to Elixer
- Actions
- Set Questcomplete(Player number of owner of Hero manipulating item) equal to Questcomplete(Player number of owner of Hero manipulating item) +1
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Questcomplete (Player number of owner of hero manipulating item)) Equal to 6
- Then - Actions
- Else - Actions
- Quest - Mark Quests[1] as Completed
- Quest - Display to (All players) the Quest Update message: You have restored...
- Player - Add 500 to (Owner of (Triggering unit)) Current gold
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
- Loop - Actions
- Hero - Add 500 experience to (Picked unit), Show level-up graphics
- Loop - Actions
- Trigger - Turn off (This trigger)
- Events
Trigger:
- Set Questcomplete(Player number of owner of Hero manipulating item) equal to Questcomplete(Player number of owner of Hero manipulating item) +1
Trigger:
- Item Recovery
- Events
- Unit - A unit Loses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Elixer
- Actions
- Set Questcomplete(Player number of owner of hero manipulating item) = (Questcomplete(Player number of owner of hero manipulating item) - 1)
- Events
2.) Unit Killing
AHHH the unit kill... MUCH easier . Well its one less trigger... Id say use the same starting trigger as I had said before... make them walk to the quest giver to recieve it etc. Then to finish it.Trigger:
- Green Dragon Killing Quest
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Dying unit)) Equal to Green Dragon
- Actions
- Set GreenDragonKills = (GreenDragonKills + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GreenDragonKills Equal to 10
- Then - Actions
- Quest - Mark Quests[1] as Completed
- Quest - Display to (All players) the Quest Update message: Thank you for dispo...
- Then do the exp etc. as shown in the previous trigger with the unit group command.
- Else - Actions
- If - Conditions
- Events
Now it should look like Set GreenDragonKills = Value. Click on Value and change that to Arithmetic. For the first value in arithmatic change that to GreenDragonKills (simply find the variable in the variable drop down menu) and for the +1 keep that as is.
Trigger:
- GreenDragonKills Equal to 10
3.) Finding a Specific Unit
Trigger:
- Child Recovery Quest
- Events
- Unit - A unit comes within 200.00 of No Unit
- Conditions
- ((Entering unit) is A Hero) Equal to True
- Actions
- Special Effect - Destroy QuestEffects[1]
- Quest - Display to (All players) the Quest Update message: Help me! Ive lost m...
- Quest - Create a Required quest titled Child Rescue with the description Help me! Ive lost m..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Set Quests[1] = (Last created quest)
- Trigger - Turn off (This trigger)
- Events
To start the quest you just walk near the woman and it starts the quest... QuestEffects[1] is the same variable from before (if you already used the array value 1 set it to a different number, be sure not to overlap numbers or the editor won't remember them all) used to make exclamation points but you could probably base an ability off sphere and attach it to the overhead of a unit etc. This topic I will cover later, but it might be a tad simpler to accomplish than creating one for every unit. Anyways... Everything in this quest acquisition trigger is the same as the other two so I don't think I need explain it any further.
Trigger:
- Set Quests[1] = (Last created quest)
For completion of the quest...
Trigger:
- Child Recovery Complete
- Events
- Unit - A unit comes within 200.00 of Child
- Conditions
- (Quests[1] is enabled) Equal to True
- Actions
- Quest - Mark Quests[1] as Completed
- Quest - Display to (All players) the Quest Update message: You have rescued my...
- Player - Add 500 to (Owner of (Entering unit)) Current gold
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
- Loop - Actions
- Hero - Add 500 experience to (Picked unit), Show level-up graphics
- Loop - Actions
- Trigger - Turn off (This trigger)
- Events
Alright... here's how this works... this checks if you find the unit that is the target of the quest... This quest is about a mother losing her child and you are supposed to find the child. Child is simply a unit that is already placed on the map that you have to select as shown before... then everything else is exactly as follows and I believe I explained it will enough in the previous quest types.
4.) Building Quests
These quests are fairly simple as well, and should cover nothing new. Anyhow, this is done as follows.
Trigger:
- Building Quest
- Events
- Unit - A unit Finishes construction
- Conditions
- (Unit-type of (Constructed structure)) Equal to Town Hall
- Actions
- Quest - Mark Quest[1] as Completed
- Events
The event is pretty simple, and the condition is a simple "Unit Type" condition that can be found in the condition area. Nothing to difficult there, now if you want to mark the quest for only specific players than you can make a new variable aside of "Quest" and make the "BuildingQuest" variable, and make it an array as I have described before. In this process make this trigger.
Trigger:
- Building Quest
- Events
- Unit - A unit comes within 200.00 of No unit
- Conditions
- ((Triggering unit) is A Hero) Equal to True
- Actions
- Quest - Create a Required quest titled Town Hall with the description Your village will n..., using icon path ReplaceableTextures\CommandButtons\BTNTownHall.blp
- Set BuildingQuest[(Player number of (Owner of (Triggering unit)))] = (Last created quest)
- Events
Trigger:
- Building Quest
- Events
- Unit - A unit Finishes construction
- Conditions
- (Unit-type of (Constructed structure)) Equal to Town Hall
- Actions
- Quest - Mark BuildingQuest[(Player number of (Owner of (Triggering unit)))] as Completed
- Events
III. Advanced Tips
1.) Cinematics in Quests
Now many people seem to want a cinematic that explains what you have to do for your quest . I personally find them to be interuptive and boring to watch but that's all on you to decide so i'll explain that as well even though I believe I have in fact seen a cinematic quest based thing ill make this all in one.1.) Cinematics in Quests
First off you want to make it to where it reads when the unit tries to recieve the quest.
Use something like
Trigger:
- Events -
- Unit - A unit comes within 300 of Quest Giver 001 <gen>
That helps trigger the cinematic. Then turn cinematic mode on with
Trigger:
- Cinematic - Turn cinematic mode On for (All players)
Trigger:
- Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2.00 seconds
Trigger:
- Cinematic - Disable user control for (All players)
Trigger:
- Cinematic - Send transmission to (All players) from No unit named Units Proper Name: Play No sound and display Please do this.. Modify duration: Set to 5.00 seconds and Wait
Trigger:
- Unit - Order Quest Giver 001 <gen> to Attack Alien Egg
Trigger:
- Unit - Order Quest Giver 001 <gen> to Move-to Position of (Alien Egg)
Trigger:
- Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
Trigger:
- Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Trigger:
- Unit - Order No unit to Orc Raider - Ensnare No unit
Trigger:
- Unit - Order No unit to Orc Tauren Chieftain - Shockwave (Center of (Playable map area))
Trigger:
- Cinematic Tut
- Events
- Unit - A unit comes within 300.00 of No unit
- Conditions
- ((Triggering unit) is A Hero) Equal to True
- Actions
- Cinematic - Turn cinematic mode On for (All players)
- Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2.00 seconds
- Cinematic - Disable user control for (All players)
- Cinematic - Send transmission to (All players) from No unit named Kronos: Play No sound and display You've got to help .... Modify duration: Set to 6.00 seconds and Wait
- Cinematic - Turn cinematic mode Off for (All players)
- Cinematic - Turn off letterbox mode (show interface) for (All players): fade out over 2.00 seconds
- Cinematic - Enable user control for (All players)
- Events
2.) Individual Player Quests
This was requested later in the thread and here is how you do it.Firstly you will have to change the quest array variable, you will have to make a quest variable for each quest. If you dont understand what I mean, go to the X in the trigger editor. It is a yellow X. Open that then create a new variable and call it (In this case ill base it off the kills) the GreenDragonKills variable, make it an array. Then when a dragon is killed do this.
Trigger:
- Set GreenDragonKills[(Player number of (Owner of (Killing unit)))] = (GreenDragonKills[(Player number of (Owner of (Killing unit)))] + 1)
Trigger:
- Quest - Display to (Player group((Owner of (Killing unit)))) the Quest Update message: (You have killed + ((String(GreenDragonKills[(Player number of (Owner of (Killing unit)))])) + out of the 10 you need to kill.))
Trigger:
- Item Recovery
- Events
- Unit - A unit Loses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Shadow Orb +6
- Actions
- Set Questcomplete(Player number of owner of hero manipulating item) = (Questcomplete(Player number of owner of hero manipulating item) - 1)
- Events
3.) Item Rewards
This is pretty simple. All you must do is simply add to the trigger where you add the experience the action,Trigger:
- Hero - Create Quest Reward and give it to (Picked unit)
Trigger:
- Hero - Give Item to Hero
Trigger:
- Child Recovery Complete
- Events
- Unit - A unit comes within 200.00 of Child
- Conditions
- (Quests[1] is enabled) Equal to True
- Actions
- Quest - Mark Quests[1] as Completed
- Quest - Display to (All players) the Quest Update message: You have rescued my...
- Player - Add 500 to (Owner of (Entering unit)) Current gold
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
- Loop - Actions
- Hero - Add 500 experience to (Picked unit), Show level-up graphics
- Hero - Create Quest Reward and give it to (Picked unit)
- Loop - Actions
- Trigger - Turn off (This trigger)
- Events
4.) Countdown Timers
Now these are a little more advanced but they really arent that complicated. These can help run a timed quest, so if you want a player to finish their quest before X seconds the countdown timer will tell them the remaining time they have until the quest is failed. In order to create your timer you must use this trigger...Trigger:
- Countdown Timer - Start QuestTimer as a One-shot timer that will expire in 180.00 seconds
Trigger:
- <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_40">
- <li class="lastopen"><span class="default">Corrupted Moon Well Start</span>
- <ul>
- <li class="open"><span class="events">Events</span>
- <ul>
- <li class="lasttree"><span class="unit">Unit - A unit comes within 200.00 of No unit</span></li>
- </ul>
- </li>
- <li class="open"><span class="conditions">Conditions</span>
- <ul>
- <li class="lasttree"><span class="default">((Entering unit) is A Hero) Equal to True</span></li>
- </ul>
- </li>
- <li class="lastopen"><span class="actions">Actions</span>
- <ul>
- <li class="tree"><span class="specialeffect">Special Effect - Destroy QuestEffects[1]</span></li>
- <li class="tree"><span class="quest">Quest - Display to (All players) the Quest Update message: Help me! Ive lost m...</span></li>
- <li class="tree"><span class="quest">Quest - Create a Required quest titled Corrupted Moonwell with the description The moon well here i..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp</span></li>
- <li class="tree"><span class="set">Set Quests[1] = (Last created quest)</span></li>
- <li class="tree"><span class="default">Trigger - Turn off (This trigger)</span></li>
- <li class="tree"><span class="countdowntimer">Countdown Timer - Start QuestTimer as a One-shot timer that will expire in 180.00 seconds</span></li>
- <li class="lasttree"><span class="countdowntimer">Countdown Timer - Create a timer window for QuestTimer with title Time Remaining</span></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div></div>
- That fully creates the timer, allowing players to see the time they have remaining for the quest. Now to see if a player fails or not you must do this. "QuestTimer" is a variable of type "Timer", and the rest of that is self explainotry, and the second code is to show the player that the timer has been fired. You can change the title of the timer to whatever you like by changing the "Time Remaining" part of the coding.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_41">
- <li class="lastopen"><span class="default">Building Quest</span>
- <ul>
- <li class="open"><span class="events">Events</span>
- <ul>
- <li class="lasttree"><span class="default">Time - QuestTimer expires</span></li>
- </ul>
- </li>
- <li class="tree"><span class="conditions">Conditions</span></li>
- <li class="lastopen"><span class="actions">Actions</span>
- <ul>
- <li class="lasttree"><span class="quest">Quest - Mark Quest[1] as Failed</span></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div></div>This will fail them if the timer expires, and their time remaining hits 0 seconds. Now, we if they are victorious in their quest we have to make sure the timer goes away... so you must do this.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_42">
- <li class="lastopen"><span class="default">Building Quest</span>
- <ul>
- <li class="tree"><span class="events">Events</span></li>
- <li class="tree"><span class="conditions">Conditions</span></li>
- <li class="lastopen"><span class="actions">Actions</span>
- <ul>
- <li class="tree"><span class="countdowntimer">Countdown Timer - Pause QuestTimer</span></li>
- <li class="lasttree"><span class="countdowntimer">Countdown Timer - Destroy (Last created timer window)</span></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div></div>Just make the conditions what the player has to do to complete the quest, and then do the other standard quest finishing triggers, and that should complete your timed quest. Now a helpful hint is to set the timer window to a variable as well, probably "QuestWindow".
- <div style="text-align: center"><span style="font-size: 10px"><b>IV. Trigger Help</b></span>​</div>This section was designed because I recieved complaints of this being to hard to understand. So I decided to give a full view over the used triggers. There are a lot of them so here we go.
- <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_43">
- <li class="lasttree"><span class="default">((Entering unit) is A Hero) Equal to True</span></li>
- </ul>
- </div></div> This is a boolean condition. The first thing you will see is Triggering unit is A Structure. Click structure and change that to A Hero.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_44">
- <li class="lasttree"><span class="set">Set Quests[1] = (Last created quest)</span></li>
- </ul>
- </div></div>Quests[1] is a variable. Go to the variable section. Create your new variable. Make it of the type quests, and then make it an array.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_45">
- <li class="lasttree"><span class="default">(Quests[1] is enabled) Equal to True</span></li>
- </ul>
- </div></div> This is a boolean condition. To find it simply hit the drop down menu until you find quests. Easy method to find the quest tabs is to hit the "Q" key in the drop down menu and it will bring you to the quest. Change the Last Created quest to Quests[1] and make sure its enabled. Thats all this one does.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_46">
- <li class="lasttree"><span class="default">(Item type of item being manipulated) Equal to Elixer</span></li>
- </ul>
- </div></div> Item Type comparison. Look for your item and put it after the equal to.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_47">
- <li class="lasttree"><span class="set">Set Questcomplete(Player number of owner of Hero manipulating item) equal to Questcomplete(Player number of owner of Hero manipulating item) +1</span></li>
- </ul>
- </div></div> This little guy is a little bit harder. Now quest complete is an integer variable. To get the trigger to look like this simply find set variable in the trigger actions. Then find your variable in the drop down list. Now when it say equal to look for Arithmatic in the drop down menu. I believe its the first one there anyways. Then find your variable and put that in value. Then in brackets it should say value. Click on that then hit p. Scroll down until you find player number. Then after that it should already say +1 and your done with that one. <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_48">
- <li class="lasttree"><span class="default">Questcomplete (Player number of owner of hero manipulating item)) Equal to 6</span></li>
- </ul>
- </div></div>This is an integer condition. Once again Questcomplete is your integer array variable. Taught you about that one. Just change where it says equal to 0 to equal to 6.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_49">
- <li class="lasttree"><span class="set">Set Questcomplete(Player number of owner of hero manipulating item) = (Questcomplete(Player number of owner of hero manipulating item) - 1)</span></li>
- </ul>
- </div></div>This one is simply like the other one. Just change the plus to a minus and your fine.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_50">
- <li class="lasttree"><span class="set">Set GreenDragonKills = (GreenDragonKills + 1)</span></li>
- </ul>
- </div></div>Once again a Set Variable as explained before. Then the next green dragon condition follows the other explanation.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_51">
- <li class="lasttree"><span class="set">Set GreenDragonKills[(Player number of (Owner of (Killing unit)))] = (GreenDragonKills[(Player number of (Owner of (Killing unit)))] + 1)</span></li>
- </ul>
- </div></div>This is just as the green dragon variable before. Just change it to an array. Simple as that. To get the player number follow the instructions given before.<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_52">
- <li class="lasttree"><span class="quest">Quest - Display to (Player group((Owner of (Killing unit)))) the Quest Update message: (You have killed + ((String(GreenDragonKills[(Player number of (Owner of (Killing unit)))])) + out of the 10 you need to kill.))</span></li>
- </ul>
- </div></div>Here where it says (Player group((Owner of (Killing unit))) That is simply a Conversion - Player to Player Group. Its in the drop down menu. I think that about covers it.
- <div style="text-align: center"><span style="font-size: 10px"><b>V. Summary</b></span>​</div>So all in all this teaches you how to start quests and how to complete them in a variety of ways to make a players rpg experience much better. Hope this helps. If you see anything that needs changing please inform me and if you do not understand something do not be afraid to let me know. It will help me fix the tutorial. These are intended to be basic quests. Nothing too complicated is covered in here. If anyone has any requests I would be glad to further update the tutorial at a later time in order to accomodate more quest types, but for now this is a simple tutorial covering a few of them.
- <b><div style="text-align: center">~'-._Dragonhord_.-'~​</div></b>