# Guide: Quest Vars -1 reply

X_MOSS

AoM Heaven Staff

50 XP

10th May 2005

29 Posts

#1 13 years ago

Using Quest Vars. By: X_MOSS 1. What does Var stand for? Var is an abbreviation for variable. The technical definition of a variable is a place in memory used to store a value that is unknown at the time of creation. In other words, a variable is a way for the computer to store data. If you set a variable to be a certain number, when ever you use that specific variable, it will always be that number. Here is an example if you don’t understand anything I have said: var name= “Pickles” Pickles= x var name= “Jar” Jar= y var name “Pickles” + var name “Jar” = var name “Total” We don’t know what any of the numbers where so we assigned them a variable. Pickles= “x” Jar= “y” We don’t know what “Total” is yet so we should assign that a variable. Total= “z” Lets say that: x= 5 y= 1 Now we know that there are 5 Pickles and 1 pickle in the jar. So now our code is: 5+1=var name “total” If you know any math at all you should know that that equals 6. So now z=6 Now we need to put that code to work. So if we put the var in a string of Text like this: document.write"You have {var name='total'} Pickles in the jar" the result is: You have 6 Pickles in the jar. Variables can be used in other ways also. In computers and other electronic devices “0” can mean: off, no, false… “1” can mean: on, yes, true… Example: if var “on”= 0 then: imgoff.gif if var “on”= 1 then: imgon.gif This is saying if the variable “on” equals the number “0” then if will show an image called “imgoff.gif” if it equals “1” then it will show an image called “imgon.gif” There are other ways to use variables, these are just two examples. Now you should have some idea of what a variable is. If you still don’t, here it is in plain English: A variable is any value that you don't know when you create the scenario or that can change when the scenario is played. 2. Using Quest Vars in triggers What I have said above has nothing to do with triggers and Age of Mythology. It is a simple definition of what a variable is. Luckily, using variables in Age of Mythology is a lot easier. There is a group of triggers called Quest Vars. There are a few things to remember when making Quest Vars. 1. Always give each one a unique name, don’t use QV1, QV2… 2. Have the name have something to do with what it does. If the QV keeps track of the round, name it “round 3. Write down all your QVs and what there for so you don’t forget them. Also you should know the different Operators: Operators > means it is more than => means it is more than or equal to. = = means it is exactly equal to. <= means it is equal to or less than. < means it is less than. Here is a list of the different triggers, what they do, and how to use them. 3. QV conditions The Quest Var conditions (in the order on the triggers list): Quest Var Check- This is really just like its name, it checks to Quest Var. When using this you first enter the Variable you want to check, the Operator you want to check it with, and the number your comparing it to. Example: --- QV: Round Operator: = = Number: 3 --- This trigger would only fire if the QV “round” equaled 3. Quest Var Compair - This is also like its name, it compares two QV’s. To use this condition, enter the first QV you want to compare. Then ever the operator you want to compare it with, then the QV you want to compare it to. Example: --- QV: Score1 Operator: => QV2: Score2 --- This will only fire if the QV “Score1” was more then the QV “Score 2” These are the only conditions that come with AOM. You can DL more triggers at http://www.aom.heavengames.com Other QV conditions you can get: QV Chat Contains – not sure QV Count Resource – if you have “QV” amount of a certain resource (food, wood, gold, favor) OV Count Unit – if you have “QV” amount of a certain unit QV Difference – if “QV1” is “x” numbers away from “QV2” QV Timer – triggers fires after “QV’ number of seconds QV Timer ms – trigger fires after “QV’ number of ms. 4. QV effects The Quest Var effects (in the order on the triggers list): Quest Var Copy – I have never used this trigger before neither do I know how to use it. But the whole point of it is to copy the value of one Quest Var into another Quest Var Echo – This trigger can be very usefull to tell people a score, how many points they have… There are many ways you can use it. When this trigger is fired, it will appear on the left side of the screen as if it were chatted, here is how it looks: “You have QV points”. The downside to this trigger is to fact that the number will appear with the zeros up to the millionth’s place(6 zeros). Example: “You have 6.000000 points”. This is the only way for people to know a QV during a game. Example: --- Text before: This is round Quest Var: round Text after: of the game! --- If we say the QV round equaled 3, the result would look like: This is round 3 of the game. Quest Var Modify – This is a way to add or take away numbers from a QV. It is used when you don’t know what a certain QV is. Say a player made 5 skill points in your RPG, then you would use this trigger to add those skill points to the total. If you want to add a number then put the number in the box labeled “Value”. If you want to subtract from the QV then put a “-” sign in front of the number you want to subtract. Example: --- Quest Var: Healthp1 Value: -2 --- This would take subtract 2 from the QV “Healthp1” Quest Var Modity2 – This is used to add two Quest Vars to each other. I do not know how to use it nor do I have an example of how to use it. Quest Var Randomize – This is without doubt the best Quest Var effect if not the best effect in the game. This gives you the ability to completely randomize the scenario so the game isn’t the same everything you play it. When using this you must first decided the minimum value the Quest Var will be. Then you need to decide what the maximum value is. This QV can be a little more work because for every number that comes up you need another trigger. Also, always rember to make sure the “rounding” button is on because if it isn’t the random numbers will turnout like 2.573264. Example --- Quest Var: Difficulty Var min: 1 Var max: 7 Rounding: on --- After this trigger is fired the QV called “Difficulty” would be set to a random number between 1 and 7. You also need seven other triggers to go along with this one. Example: --- Condiction: Quest Var Check QV: Difficulty Operator: = = Number: 1 Effect: Fire event Event to Fire: Diff1 --- You would then make another trigger for each possibility (eg: 2,3,4,5,6,7). Also see: QV Randomized with QV Quest Var set – This is a trigger to make a Quest Var a certar number. Instead of adding or subtracting like we did with the Quest Var Modity effect, this effect actually sets the QV to a certain number. This may be used to set a QV back to zero or back to 100. Example: --- Quest Var: Points Number: 0 --- This simply sets the number back to zero. These are the only effects that come with AOM. You can DL more triggers at http://www.aom.heavengames.com Other QV effects you can get: QV Choice Dialog –Doesn’t work, makes glich QV Army Deploy - Deploys QV number of units QV Add Timer – Add timer QV long QV Damage Unit – Damage the unit QV points QV Damage Units in area – Damage Units in area QV points QV in message – QV in a message QV Overlay Text – QV in Overlay text QV percent damage unit – Damage unit QV% QV Player army Convert – Convert army to player QV QV Player Convert – Convert unit to player QV QV Player Invoke GP Player QV invoke GP QV Randomized with QV – Randomeize a QV with QV1 as the min and QV2 as the max QV Send chat – Send QV in chat QV Set as PlrResCount - Give player “x” QV number of a recourse (food, wood, gold, favor) QV Set as Unit ID – I have no clue QV Set fake Counter – Puts text on the right side of screen with QV in it. QV Tribute – Give player “x” from player “y” QV number of recourse (food, wood, gold, favor) QV Set as Stat Value – Stats to use:

• Tribute Sent
• Enemy Units Killed
• Enemy Buildings Killed
• Units killed cost
• Buildings killed cost
• Units lost
• Buildings lost
• Units lost cost
• Buildings lost cost
• Map explored
• Military Count
• Research count complete
• Research total cost
• Wonder time
• Raw score
• Relic high
• Economic unit high
• Settlement high

5. Conclusion You now should have a basic idea of what Quest Vars are and how to use them. They are used in many scenarios and random maps (Norse wars). I hope you will use Quest Vars in some of your future scenarios. If you have any more questions or would like me to better explain one of the condictions or effects, feel free to post and I will get back to you as soon as possible. -X_MOSS

X_MOSS

AoM Heaven Staff

50 XP

10th May 2005

29 Posts

#2 13 years ago

So, what do you think? How did I do?

Ghost Keeper

I'm Nobody

50 XP

19th November 2004

112 Posts

#3 13 years ago

It's a good guide, X_MOSS, but unfortunately, I already knew everything... :D

X_MOSS

AoM Heaven Staff

50 XP

10th May 2005