Creating Optional Quest - help please

P

Perseus

Guest
I am wondering how to create optional quests.

I basically want a villager to talk to my hero, explaining that he needs to go kill a set of bandits in a nearby area. And when they are done talking, it becomes an optional quest, with a message on the screen describing the optional quest. Plus, when the hero kills the bandits, the optional quest is completed, and a message (like in campaign levels) says that it is done.

How do I go about doing this? Thanks!

-Perseus
 
Make a trigger called Quests that occurs when 1 second has elapsed.

Under "Quests" you can set "Create Optional Quest."
Make a Quest variable, then "Set YourQuestVariable = Last Created Quest"
Create a Quest Requirement for the Last Created Quest.
Make the Quest hidden.

I'm not at home right now so I can't tell u the exact wording of the steps, but every function you need is under the "Quests" category in the trigger code.

In whatever trigger that contains the event where you want the Quest to become enabled, you can set YourQuestVariable to discovered.

In whatever trigger containing the event that fulfills your Quest, make YourQuestVariable complete. You have to update the Quest text as well and flash the quest menu in the gui. These commands are all self-evident and in the Quest category.

You can also make Quest Messages to accompany each failed/fulfilled condition.
 
Since I am new to this, none of that really makes any sense to me. Thanks for your patience. I've tried making the villager recognize my hero, and then display text and whatnot, but I know that's not right. Plus, when I click on the villager, he doesnt talk or anything (he's neutral passive). I want him to talk b ut not be controllable (as if he was player 1).

This is what I want to happen:

1. Hero enters villagers' area.
2. Villager talks: "There is a hideout of thieves nearby. I set up camp here. Please kill those bandits for me."
3. new optinal quest: kill local bandits.
4. Hero goes to kill bandits. Kills them.
5. Optional quest completed.
6. (optional) Hero talks to villager again. Villager thanks him.

Thanks.
 
No problem. I'll work through your scenario. I'm still not at home yet (I won't be until 9:30 pm EST), but I'll get you started in the meantime. Again, I can't be precise about what the names of menus etc are until I get home.

Suppose you have a human Player 1 (Red) - the user, and a computer Player 2 (Blue) - the Villagers (Blue) and a computer Player 3 (Teal) - the bandits. In one of the top menus of the editor, you can change the Player Settings to reflect that Player 1 Red is "selectable" and Player 2 and 3 are computers. You can use "Fixed Player Settings" so that the slots for players are not selectable in a melee game.

Under Player Force Settings, make 2 forces - User (or whatever you want it to be called) and Bandits. Put Player 3 in the bandits and Player 1 and 2 in the Users.

Now, you need to preplace your units in the WE.

1. Draw a Region (one of those blue square things) under your tools pallette and name it "VillagerArea."

2. Place a villager unit (controlled by Player 2) in this region.

For testing purposes, we'll put the hero nearby VillagerArea.

3. Place a hero controlled by Player 1 near the region.

4. Make another Region called "BanditCamp" and fill it full of bandits controlled by Player 3.

Now that we have everything set up, you'll need to fire up the trigger editor. Unforunately, I'd like to just copy/paste the actions you'll need, but since I don't have wc3 on this machine, you'll have to wait until I get back home (unless someone else picks up from here). Sit tight!
 
Thank you so much for your help so far. I have done what you said, and set up two regions, one with a villager, and another with bandits. I have made player 1 user, player 2 computer (representing villagers) and player 12 (i like the brown color) computer.

I am awaiting what to use for triggers, but I tested the level out anyway. My hero began attacking the villager (i guess because he recognized it as player 2). My map says it is NOT a melee map. Does the villager have to be neutral? Or does he have to be player 2 computer? If he has to be player 2, how do I prevent my hero (and army units) from attacking him? I tried creating different forces, with player 1 being one force and player 2 being another, and making them allies. It still did not work.

I look forward to seeing which triggers I use. Thanks again. :D
 
-->

Once you've set the players appropriately, set the Force Properties to reflect something like this: Force 1: Badguys has Player 12 and Force 2: Goodguys has Player 2 and Player 1. This should stop them from attacking each other.

As soon as the game starts, we want to set up the Quest to kill the bandits so we can reveal it later when the hero enters the villager's region. All triggers in the wc3 editor are set up by having an Event fire them, certain conditions which have to be fulfilled in order for the Event to fire, and the Actions that are done consequently.

First, click on the Variable editor (the little yellow plus sign) and add a new variable called BANDITQUEST of the type Quest. This will serve as a "container" for your quest so we can refer to it in our trigger.

Code:
Kill Bandits Quest
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Quest - Create a Optional, undiscovered quest titled KILL THE BANDITS with the description PLEASE GO KILL THE BANDITS, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
        Set BANDITQUEST = (Last created quest)
        Quest - Create a quest requirement for (Last created quest) with the description ALL THE BANDITS MUST DIE.
        Quest - Enable (Last created quest)

What we're doing here is setting the Last created quest to the variable we made earlier, BANDITQUEST. You can change the icon path for the quest to whatever you like.

Now, you want it so that when your hero enters the VillagerArea region we created earlier, your villager responds to him and the optional quest is discovered. Make a new trigger:

Code:
Hero Enters Village
    Events
        Unit - A unit enters (VILLAGERAREA)
    Conditions
        (Unit-type of (Triggering unit)) Equal to YOURHERO
    Actions
        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 (VILLAGER) named VILLAGER'S NAME: Play No sound and display KILL THOSE BANDITS, PLEASE..  Modify duration: Set to 10.00 seconds and Wait
        Cinematic - Enable user control for (All players)
        Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds
        Quest - Mark BANDITQUEST as Discovered
        Quest - Flash the quest dialog button

What you are doing here is turning on the letterbox mode (that widescreen thing), disabling the user's ability to move the screen, and sending a transmission to the user. You can add a sound where it says No Sound if you like, by going to the Sound Editor and doing "Use as Sound" for a particular sound to add it to the list of options.

The next step is to make the Bandits you placed on the map into a "Unit Group" so we can refer to them when we want to make a trigger that fulfills the quest. Like the quest variable we made earlier, we're going to make a Unit Group variable that will serve as a container for all the bandits. Open up that variable editor, make a variable called BANDITGROUP of the type Unit Group.

Code:
Setup Bandit Camp
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in BANDITCAMP matching ((Unit-type of (Matching unit)) Equal to BANDIT)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to BANDITGROUP

Our loop here will pick all the units of type BANDIT in the region you made earlier, the BANDITCAMP, and add them to that variable.

The last two things we need to do is setup a trigger that will define what happens when all the bandits die.

Code:
The Bandits Die    
        Unit - A unit Dies
    Conditions
        (Number of units in BANDITGROUP) Equal to 0
    Actions
        Quest - Mark BANDITQUEST as Completed
        Quest - Flash the quest dialog button
        Quest - Display to (All players) the Quest Completed message: YOU SAVED THE VILLAGERS!

Here, we're checking whenever a unit dies whether the BANDITGROUP variable is 0 (or all the bandits are dead). Once this is true (when the hero kills the last bandit and the condition is true), we update the quest.

Finally, we need a trigger that thanks the hero for saving the villagers.

Code:
Victory Thanks
    Events
        Unit - A unit enters VILLAGERAREA
    Conditions
        (Number of units in BANDITGROUP) Equal to 0
    Actions
        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 (VILLAGER) named VILLAGER'S NAME: Play No sound and display THANKS FOR KILLIN THOSE BANDITS.  Modify duration: Set to 10.00 seconds and Wait
        Cinematic - Enable user control for (All players)
        Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds
 
Here are my triggers:
villagerquest
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Quest - Create a Optional, undiscovered quest titled Neutralize Local Ba... with the description Help the villager b..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Set banditquest = (Last created quest)
Quest - Create a quest requirement for (Last created quest) with the description All the bandits mu...
Quest - Enable (Last created quest)


heroenter
Events
Unit - A unit enters VillagerArea <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Paladin
Actions
Do nothing
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 Villager (Male) 0010 <gen> named Robe: Play No sound and display Greetings paladin. .... Modify duration: Set to 10.00 seconds and Wait
Cinematic - Enable user control for (All players)
Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds

bandits
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Unit Group - Pick every unit in (Units in BanditCamp <gen>) and do (Unit Group - Add (Picked unit) to banditgroup)


death
Events
Unit - Rogue 0002 <gen> Dies
Conditions
(Number of units in banditgroup) Equal to 0
Actions
Quest - Mark banditquest as Completed
Quest - Flash the quest dialog button
Quest - Display to (All players) the Quest Completed message: You have defeated t...


thanks
Events
Unit - A unit enters VillagerArea <gen>
Conditions
(Number of units in banditgroup) Equal to 0
Actions
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 Villager (Male) 0010 <gen> named Robe: Play No sound and display My lord, thank you .... Modify duration: Set to 10.00 seconds and Wait
Cinematic - Enable user control for (All players)
Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds
 
-->

ha, I forgot to add the trigger that sets your quest as Discovered. I added it.
 
After the hero kills the bandits, the quest is not being recognized as completed. Any thoughts as to why this might be?
 
The event should be "a unit dies"

death
Events
Unit - Rogue 0002 <gen> Dies --> Unit - dies.
Conditions
(Number of units in banditgroup) Equal to 0
Actions
Quest - Mark banditquest as Completed
Quest - Flash the quest dialog button
Quest - Display to (All players) the Quest Completed message: You have defeated t...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Mayo also has vinegar. Vinegar is a very important part of it, it's effectively a delivery method FOR vinegar but hidden
    +1
  • Varine Varine:
    It's a neat ingredient. But yeah it's eggs. But a LOT of people think eggs count as dairy because of the fucking food pyramid the US keeps trying to make a thing
  • Varine Varine:
    I think on the new one they did change it, but idk. I don't really care whatever the government is doing right now because it's consistently absurd. Like what is RFK doing in charge of health anything? I love the bear story because WTF was that, but also, pretty much every time he talks it's WTF. Like even his voice sounds microwaved
    +1
  • Varine Varine:
    The pyramid is fucking dumb as shit, no matter how you arrange it.
  • Varine Varine:
    It's actually remarkably easy to make mayonnaise though. Fun fact, it USED to kind of be a French mother sauce. I believe that Careme considered it one, it may have been aioli but that has also built a different meaning than it used to. An aioli is just mayonnaise I mixed with other shit typically, I didn't start it don't come at me
  • Varine Varine:
    It's very hard to do it on a large scale though
  • Varine Varine:
    Depending on how you pour the oil the consistency can vary wildly, but that's true for most emulsions. I can only make about two quarts at a time with my robo coup, and if I have to make several in series because I forgot to order it becomes really obvious even when I do it. We have to wait and mix them all together to make sure we have the same thing.
  • Varine Varine:
    Hollandaise is also kind of like that, emulsions require a very steady hand to do exactly the same every time.
  • Varine Varine:
    Luckily I live in an age with electricity so it's way fucking faster, but when I was just a boy trying to find my place I had some hardcore chefs that made use do things like that by hand. It is WAY easier to get right by hand because you control it and can feel it, but it takes soooooo much longer. And on the scale a modern kitchen requires... I serve 400-500 guests on average per day right now, if I had 100 then we could do things way better
  • Varine Varine:
    But we can't do that. In the winter yeah, but I HAVE to get people through here right now so I can afford the staff that we CAN do that. We have about 100 days of summer, and if that summer doesn't make us what it will, then I can't operate the other most of the year with my staff. The owner is talking about closing two days a week to cut down on labor, I told him he should cut down on vacations and it did not go great. I do think I won though, I have to keep my fucking core staff and they have to be gainfully employed
  • Varine Varine:
    Sure some of them might take a second job, but I can't just cut my entire staff to unlivable hours, nor can I can cut them off all winter if I want them to come back.
  • Varine Varine:
    And also, there is no fucking way I'm pulling these hours come september. I only do this right now because I have to, the second I don't have to be the one doing it I won't be
  • Varine Varine:
    I have a 5 person core staff in the kitchen, not including me or Chef Ben
  • Varine Varine:
    Though two of those people are likely not making it this year. One of them has been replaced, the other I am kind of trying to. He's being a giant bitch, today I had to get onto him because in the three hours before I left he had taken like thirty minutes for cigarette breaks
  • Varine Varine:
    And he was also complaining to me the other day that he was out of weed so couldn't smoke any before work that day, and was confused about why I was annoyed he was telling me, his boss, that he is smoking weed everyday before work.
    +1
  • Varine Varine:
    Like yeah I can tell. I don't need to fucking know.
  • Varine Varine:
    So now he's getting scrutinized and will not be top of the list. I know I don't have the smartest people but I do expect them to have some common fucking sense
  • Varine Varine:
    I did do a rare thing for me and hire a girl last month without warning. Everyone was made at me because I started her at like 21, but she worked with me before and I was like don't care. She made 19 at her old job and I wanted her to come work with me, she is the best
    +1
  • Varine Varine:
    I'm going to get her a raise at the end of the summer. She wants to go to school again, but I want her to still work with me so.... she kind of can just tell me what the price is. I can go to 25 if she keeps up. I need to get her onto line more, that's what she wants, but I need her where she is and it's not fair that she doesn't get the little bit of raise that comes with it. She can do it no problem, I've worked with her there.
  • Varine Varine:
    It's just hard to move and train people unnecessarily right now. And also the line fucking sucks, it's not any more fun. This is turn and burn so I have the bankroll, and everyone suffers for it
  • Varine Varine:
    Eventually we'll get it balanced, we'
  • Varine Varine:
    we're starting online orders and stuff, but I also turn that off all the time because I barely keep up trying to be the best at Sysco shit
  • Varine Varine:
    I think it's gonna be a good fall and winter though. We're going to have a good staff, they will get along, they will be able to manage the workload and the complications, they know how to really cook this year, like every person on line knows their steak temps. Some of them use thermometers a lot and they don't always use them right, but they do know how to do it. Failure, especially in this field, is the only way to get better. They'll get it
  • Varine Varine:
    They won't get feel down while they do the thermometer, but we didn't have an instant read probe when I was learning. Like they did but god knows how off it is, you HAD to do it by feel. Even if the chef was fine with me bringing my own, it takes too long. Poke and know
  • The Helper The Helper:
    420 threads in the Artificial Intelligence forum :)

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top