quests

Ormagon

New Member
Reaction score
1
Ok i am still new to the whole mapping thing and i would like to add a few quests to my first rpg that will activate wen the quest giver is selected but ONLY of a unit is in an area around the questgiver that is owned by the player.
us there a tutorial for this?? all the ones i have found are unit enteres area and gets quests or the quest is linked to a cinematic
 

Exide

I am amazingly focused right now!
Reaction score
448
There's a condition (Boolean, I believe) that checks 'If *Region* contains *Unit*) Equal to True/False. -That should help you.
 

Exide

I am amazingly focused right now!
Reaction score
448
Here's how I made a side-quest:

Code:
Sneaky Quest
    Events
        Unit - A unit comes within 150.00 of Sneaky-Looking Man 0043 <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        Night Equal to False
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) has an item of type Goldstatue) Equal to True
            Then - Actions
                Unit - Remove TalkToMeUnit[2] from the game
                Quest - Destroy Assignment[3]
                Item - Remove (Item carried by (Triggering unit) of type Goldstatue)
                Quest - Display to (All players) the Quest Update message: |c000080C0-You've f...
                Set loc = (Position of (Triggering unit))
                Special Effect - Create a special effect at loc using UI\Feedback\GoldCredit\GoldCredit.mdl
                Set SpecialFX = (Last created special effect)
                Trigger - Run Special Effect Destruction <gen> (ignoring conditions)
                Player - Add 200 to Player 1 (Red) Current gold
                Trigger - Turn off (This trigger)
                Wait 25.00 seconds
                Unit - Remove Sneaky-Looking Man 0043 <gen> from the game
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ContactMeet Less than or equal to 1
                (Execution count of (This trigger)) Equal to 1
            Then - Actions
                Quest - Display to (All players) the Quest Update message: |c000080C0-Hey, you...
                Quest - Create a Optional quest titled (Colors[6] + The Statue|r) with the description |c000080C0A Sneaky-..., using icon path ReplaceableTextures\CommandButtons\BTNTransmute.blp
                Set Assignment[3] = (Last created quest)
            Else - Actions

There's nothing special about this trigger. What it does is to check if the unit that comes near the "quest unit" has the Quest item (Goldstatue). If he doesn't, this trigger checks if this is the first time the trigger runs. If it is: the player will be given the quest, if the trigger has run more than one time, nothing will happen unless the hero has the Quest item.
Is that what you need? :p
 

Ormagon

New Member
Reaction score
1
not rly i need a link to tutorial thats will explain to me every aspect of quest making but thanks to you i understand the basics still need tutoeial thought
 

Exide

I am amazingly focused right now!
Reaction score
448
Ok, so let's take it from the start. :p
I assume that you have already placed your region and quest giving unit.

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions

This should be pretty self-explaining. -What happens is Player 1 selects a unit. If the unit is equal to Footman then .. -Run actions-. (In this case you will change Footman to your Quest giving unit.)
If your map has several players, this will be a lot harder. -First thing you need to do is to add several events, like this:

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
        Player - Player 2 (Blue) Selects a unit
        Player - Player 3 (Teal) Selects a unit
        ..And so on..
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions

Since these are events, the trigger will fire if any of the event is true. Conditions, however, answer to and. -If there are several conditions, they must all be true for the trigger to run. (Unless you specify it to be Or.)

Now, you will need to check if the unit itself is in your pre-placed region:

Code:
((Playable map area) contains (Triggering Unit)) Equal to True

-For this to work, you will have to set your Hero-unit to a variable. Preferably calling it 'Hero' or something similar.

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        ((Playable map area) contains (Triggering Unit)) Equal to True
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions

As I mentioned before, conditions are and. Now that you've got two conditions, they must both be true, in order for the trigger to continue.

As of now, your trigger is no good, you will need to specify the conditions:

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (([B]*Your_Pre-Placed_Region'[/B]) contains [B]*Your_Hero_Unit*[/B]) Equal to True  //This checks if your Hero is in your Quest Region 
        (Unit-type of (Triggering unit)) Equal to [B]*Your_Quest_Unit*[/B]   //This checks what type of unit is being selected.
    Actions

Side-Note:
Code:
((Playable map area) contains (Triggering Unit)) Equal to True
This condition can be found under Boolean Comparison. -You can tell, because it ends with an 'Equal to True'. (Which can, of course, be changed.)

Ok, now you've got your trigger set up, now all you need are some actions. -These are considered (by me :p) the easy part. So let's get on with it already!

To start, we will just create a small Quest Message, as if the units were interacting with eachother, and add the Quest to the Quest Menu:

Code:
    Actions
       Quest - Display to (Player group((Triggering player))) the Quest Update message: Help! Bandits are i...
       Quest - Create a Optional quest titled Bandits! with the description Slay the Bandits an..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp

There we go, now to the explanation:
*The first action will show the message (ONLY to the Player that has selected the unit - you can change this if you wish.), saying something about Bandits.
*The second action will create the quest in the Quest Menu. -In case the players forget and want to re-read it. You can choose if you want the quest to be optional or required (what side of the Quest Menu it is supposed to show up on), also you can choose the icon for the Quest, in the Quest Menu. It's set to Ambush - by default. (You can also change this, if you like.)

This gives us:

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (([B]*Your_Pre-Placed_Region'[/B]) contains [B]*Your_Hero_Unit*[/B]) Equal to True   
        (Unit-type of (Triggering unit)) Equal to [B]*Your_Quest_Unit*[/B]   
    Actions
        Quest - Display to (Player group((Triggering player))) the Quest Update message: Help! Bandits are i...
        Quest - Create a Optional quest titled Bandits! with the description Slay the Bandits an..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp

In order to make this trigger work even better, you might want to remove the spam that can be caused by the Players, if the keep clicking this unit. (Since the trigger will run everytime they click it.)

For this, we need a new condition. You can add it to the "main conditions" or in a another function, called 'If / Then / Else'. Since it's a simple function, we'll use the "main conditions":

Code:
(Execution count of (This trigger)) Equal to 0

This means if the trigger hasn't run yet, it will finish running, then it won't run anymore. -So the players can only click the unit and recieve the quest ONCE.
However. If you have multiple players that shall recieve a quest each, this won't work, and you will need to use variables instead.

So, the outcome of your trigger should be:

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
        (Execution count of (This trigger)) Equal to 0
        (([B]*Your_Pre-Placed_Region'[/B]) contains [B]*Your_Hero_Unit*[/B]) Equal to True   
        (Unit-type of (Triggering unit)) Equal to [B]*Your_Quest_Unit*[/B]   
    Actions
        Quest - Display to (Player group((Triggering player))) the Quest Update message: Help! Bandits are i...
        Quest - Create a Optional quest titled Bandits! with the description Slay the Bandits an..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp

You will then need a trigger for completing the mission and for the reward. -Depending on your mission.
A simple mission might be to retrieve an object, and return it to the Quest Giver. ("Go slay the Bandits, steal their loot and return it to me!")

To start, you will need a trigger that checks if the unit is nearby, or entering the region. You can also choose the setup for the first trigger you made. It's up to you.
Then you need to add one condition that checks if the unit has the item:

Code:
Untitled Trigger 002
    Events
        Unit - A unit enters Your_Region
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        ((Triggering unit) has an item of type [B]*Quest_Item*[/B]) Equal to True
    Actions

Then add your actions, perhaps something like this:

Code:
Untitled Trigger 002
    Events
        Unit - A unit enters Your_Region
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        ((Triggering unit) has an item of type [B]*Quest_Item*[/B]) Equal to True
    Actions
Actions
        Quest - Display to (All players) the Quest Update message: You found it! Give ...
        Item - Remove (Item carried by (Triggering unit) of type [B]*Quest_Item*[/B])
        Player - Add 1000 to (Owner of (Triggering unit)) Current gold
        Quest - Destroy (Last created quest)

This will remove the Quest Item, give 1000 gold to the player who completed the quest, and remove the quest from the Quest Menu. -However. (Last created quest) might not work, it's safer to use variables for this.

That's about it. :p
*Whew*
 

Ormagon

New Member
Reaction score
1
its so clear now TY!

but in stead of last created quest if i add a specific quest??
or is that not possible??
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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