You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.1680 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 57 58 59 60 61 ··· 68  Next Page »
posted 23 July 2010 11:41 AM EDT (US)         
So you have a question trigger request?

You can post it here!

Hello and welcome to the Trigger Request Thread (TRT). This thread's purpose is only to place trigger requests and discuss them. If you have unrelated questions or need help with triggers, please use Azur's thread!

Before posting your request, it's always good to read the so-called FAQ.

  1. What is a FAQ?
    The term "FAQ" (when pronounced, it rhymes with "back") is an acronym for Frequently Asked Questions.

  2. How do I install a trigger?
    When we have finished making your trigger, we'll post the required code here. To install this code you will first of all need to find your way to the AoM installation folder. C:\Program Files\Microsoft Games\Age of Mythology by default). Now open the trigger folder if you intend to use the trigger in vanilla, or open the trigger2 folder if you use The Titans expansion. Next, open the file called typetest.xml. The only thing left to do is copy the code at the right position and save. If you requested a condition, then place the line above < /Conditions>, if you requested an effect paste it right above < /Effects>. Note the "s" at the end of both tags.


    1. When copying the trigger from someone please click first and only then copy the required code.
    2. If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.

  3. How do I uninstall a trigger?
    If a trigger happens to be faulty or if it generates errors you better remove it. Just do as if you were installing a new trigger, but instead of copy-pasting new code, remove the code corresponding with the chosen trigger. Make sure to remove it completely, including the starting < effect > or < condition > tag and the corresponding < /effect > or < /condition > closing tag. Failure to do so properly will cause XML errors in the file making ALL triggers in that file inaccessbile for AoM.

  4. So... How exactly are new triggers made?
    AoM has a built-in engine that can parse XS code. Triggers are programmed and interpreted using this language through a series of existing functions. Since there are over 600 functions, and only a few are used by the default triggers, this leaves plenty of room for a whole new set of advanced, useful triggers.

  5. Can I request anything?
    Although we can do a lot with today's knowledge, there are still limitation we won't ever get around. So if you think of a cool new trigger, make sure to post a request but don't forget you might get a negative reply. Commonly requested triggers that are not possible include (but are not limited to):

    • Modify Unit: change the stats of 1 particular unit.
    • Change Playername
    • Change Major God
    • Transform ALL units on map for player
    • I'll add more when I think of them.

  6. I want to learn trigger scripting, how do I do that?
    It takes quite some time, but if you really want to learn trigger coding, we recommend fully understanding XS language before you start making triggers. Therefore, go here: Master XS (WIP). If you want to skip all that, and you want to be able to create only simple triggers, read this guide.

  7. Help! My triggers have stopped working!
    Triggers Stop Working Guide. Also linking camera tracks, using Run Immediately, sound timers and decimals in conditions like Timer and Distance to Unit effect, might cause this. Moreover, typing an invalid name on the Victory Conditions will cause a trigger block. But post these sort of questions in the Great Question thread.


Recommended Downloads:
  1. Trigger Loader 2 + Quest Vars (AoM && TT) by invent00r and Mythic_Freak
  2. SomeNewXTriggers 3 (TT) & SomeNewTriggers 4 (AoM) by Reyk
  3. Proactive Triggers (TT & AoM) by invent00r
  4. Advanced Triggers Set (TT) by pftq
  5. New Custom Triggers (TT) by Baseballkid14
  6. Nottud's Latest Triggers by nottud
  7. Conditonal Effects (TT & AoM) by nottud
  8. Angry Levels (TT & AoM) by angryzor
  9. SIMSTools (TT) by angryzor
  10. Target Protounit Query by HailToTheOboe

  1. First TRT by invent00r
  2. Trigger Templates by Mephiles
  3. A list of all guides sorted by Paperfriend

Posting a Request

So you have read the FAQ and want to post a request? OK, go for it, just be sure to use the following format:

Name - This should be as straightforward as possible. Try to comply with today's standards.
Description - Always describe the actions that you want the trigger to perform.
Example - Optional. An example can be a great help when requesting complex triggers.

[b]Name[/b] -
[b]Description[/b] -
[b]Example[/b] -

We might even ignore posts in other formats if we're in a bad mood
Remember that not all triggers are possible but we will try our best.

Unfinished Requests

  • Unit Patrol by Bingo Little
  • Army Wander by Endarron
  • QV Damage Units in QV area by name by mrjonathan0
  • Unit Heading Towards Unit by dwieeb
  • Damage units in Area by % (has been done before?) by Steak And Khan
  • Most Units In Area by Sir_Hans
  • QV Modify x by satansfall
  • Move from area to random area by Mister SCP
  • Set Unit Formation by aZeusDude2
  • Army Deploy Random Myth Unit by bgan
  • QV Randomize Series by Alexgd92
  • Convert all except protounit (or unit) by Joshonator
  • SET Ambient Colour/Sun Colour/Sun Specular/Terrain Ambient Fade Version by andrewv42
  • Damage units near army by AJER
  • QV count units in area with state by AuroraP
  • QV Grant random resources per stat by AuroraP
  • Condition: Random Timer by SwordOfValor
  • Army deploy in line by SwordOfValor
  • Condition: unit (type/in area) worked on other unit. by WinstonShnozwick
  • Gruoup selected by Guard of Olympus
  • Pick Unit by XxXItachiXxX
  • Modify Protounit All Percent by AuroraP
  • Random Forest by Bubble

  • Finished Requests

  • Damage Units near protounit for sneaky_squirrel & mrjonathan0
  • Move units from area to unit for Azur
  • Clear Chat History of Player & Chat Contains Anything for Lewonas
  • QV Change unit type by ID for Yeebaagooon
  • Move to QV Unit for Yeebaagoon
  • QV Modify Protounit for Xzyiothe
  • Player Kill GP Slot for Titanic Kraken
  • Move all player units for Anstar
  • Protounit Change Name for Dimir_Guildmage
  • Shop start/end with max for Mephiles
  • Diplomacy trigger for Yeebaagooon
  • Diplomacy both ways trigger for Yeebaagooon
  • Modify protounit trigger for Yeebaagooon
  • Convert trigger for Yeebaagooon
  • Make all units have no bonuses for Brighty
  • Conditional Army Units in Area for Sneaky_Squirrel
  • GROUP Select 2 for AuroraP
  • Send QV Color Chat for Alexgd92
  • Quest Var xModify for Alexgd92
  • QV Randomize 4 amounts for Alexgd92
  • QV Set Population Count for Beelzebub
  • Units in area of army for SwordOfValor
  • Damage units in area of army for SwordOfValor
  • AG with armies for SwordOfValor
  • Army deploy QV Count for Silicone Ruff Jr
  • Quest Var set rank for gunner1
  • Convert units in area to random player for Zorx
  • Units Change Name By Type for beerad
  • Army deploy where the units facing for SwordOfValor
  • Unit Heading Towards Unit for Noble
  • Convert Random Units In Selection for xEXOLARx
  • QV Set Units in Area (Center Army) for SwordOfValor
  • Move Units from Area (action) for SwordOfValor

  • Enjoy.
    Last updated: 03 september 2009

    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    That AoM Guy
    (id: aom expert)
    posted 11 May 2015 06:42 PM EDT (US)     1451 / 1680       
    I was thinkin

    what kind of other variables do we have access to for 'modify protounit' from the protox, besides the ones already there?

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    posted 02 July 2015 01:18 PM EDT (US)     1452 / 1680       
    Name - Short Circuit Condition
    Description - Evaluates a condition; if false stops evaluating the rest of the trigger
    Example - Rough example...

    Poor performance trigger:
    [low computation condition]
    [heavy computation condition]
    [heavy computation condition]
    [heavy computation condition]
    [Your favorite effect]

    Better performance version of the same trigger:
    Short_Circuit_Conditional([low computation condition])
    [heavy computation condition]
    [heavy computation condition]
    [heavy computation condition]
    [Your favorite effect]

    In the second version of this, after evaluating the low computational condition, the trigger would stop evaluating, thus reducing a lot of lag in the game.

    Here's roughly how I was thinking it would be implemented, but some of you guys that have been doing this for longer may have a better idea.
    XS User Condition: Code="true" generates this code
    bool bVar0 = (true);

    Just using this, my trigger suggestion can be currently implement, but is somewhat of a hassle.
    XS User Condition: Code="true)); if(!(true)){return();}bool fake=((true" generates this code
    bool bVar0 = ((true)); if(!(true)){return();}bool fake=((true));

    I feel like there should be a conditional trigger that allows you to enter XS user code for only the underlined part and that generates the rest of this.

    1) Not sure why the second example generated two sets of parentheses... Like I said, some of the more experienced users would probably know why.
    2) This type of logic would make options like the OR and NOT check boxes very confusing. Maybe throw a comments field in the trigger to the user?
    Heretic of December
    posted 02 July 2015 08:19 PM EDT (US)     1453 / 1680       
    I am not entirely sure what you are asking but I think the solution to what you want is to use an if command inside an effect.
    You can have an open bracket at the end of an if line in one effect and close it in a later effect inside the same trigger.

    [This message has been edited by scragins (edited 07-02-2015 @ 08:21 PM).]

    Irrational Fear
    posted 02 July 2015 08:39 PM EDT (US)     1454 / 1680       
    He wants the trigger to stop reading its conditions as soon as one of them is false: more specifically, the first one, which requires the least amount of computation. This way, the trigger won't have to read all the bigger conditions.

    My question is, what scary conditions are you using that are taking up so much memory space in the first place? o.O

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    posted 02 July 2015 09:13 PM EDT (US)     1455 / 1680       
    [edit] See second edit

    Um... Idk? Maybe not so much a single heavy conditional, but several other moderate ones. I was just thinking about triggers that are looped on high and would have a simple and a least likely condition that could prevent several other conditions from running.

    [edit] I was also toying with the idea of slipping some effects like kbLookAtAllUnitsOnMap() and a query in a conditional for some temporary micro managed player interactions that would be looped on high. If i were to do this, i might slip something like QV or a distance to something before running those so I can short circuit out. Figured other people might be doing the same. *shrugs*

    [edit] Hmm..... Scragins... I think I see what you're saying. Ya, I suppose that works... Just wasn't how I was thinking of my logic, but ya. That totally works! ....duh.... Haha

    [edit] Still bothers me that the rest of the conditions aren't short circuited though..................... Oh well.

    [This message has been edited by Map_Designer (edited 07-02-2015 @ 09:32 PM).]

    posted 05 July 2015 04:53 AM EDT (US)     1456 / 1680       

    This is easy, but you'll have to make some of your own triggers probably. What you want to do is create "conditional effects" for all of your heavy computational effects, and leave the lower computational condition in the actual condition zone. This way the game only checks the heavy ones (tries to run effects which just happen to be conditional) if and only if the conditions in the actual condition zone are true. Similarly, the way conditional effects are set up, it might "short circuit" immediately after finding a false statement among the conditional effects, but i'm not too sure on that.
    (EDIT: in fact, if this is the case, we can probably use the same technique and use... CONDITIONAL CONDITIONS)

    To create a conditional effect, replace the line

    <Expression> (arguments) </Expression>

    <Command> if ( (arguments)){</Command>
    (and don't forget to move this copy into the effects area of the .xml and convert all the words "Condition" to "Effect")

    Notice the unmatched right brace. You need to finish it later in the trigger with another conditional effect:

    <Effect name="Conditional zEnd">

    Your effects execute in the order they are listed in the trigger.

    So you'll want

    -low computational thing

    -High computational conditional effect
    -High computational conditional effect
    -High computational conditional effect
    (actual effects go here)
    -Conditional zEnd
    -Conditional zEnd
    -Conditional zEnd
    (in this order)

    For each conditional, match an appropriate zEnd.

    For an easier visual, here is a condition and its conditional effect opposite.

    <Condition name="Always">

    <Effect name="conditional Always">

    Voolohmay? Kahlos.

    [This message has been edited by Ghostoo (edited 07-05-2015 @ 05:01 AM).]

    posted 08 July 2015 10:38 PM EDT (US)     1457 / 1680       
    @Ghostoo Interesting... I think I'll just stick to the conditional effects for now. Seems to work perfectly fine. As for the way it handles the conditions normally, these would not short circuited. You can see by the way it generates the booleans. This
    bool bVar0 = ((trTimeMS()-(cActivationTime*1000)) >= trQuestVarGet("arcTimer"));
    bool bVar1 = (trQuestVarGet("acc") >= 0);
    bool tempExp = (bVar0 && bVar1);
    if (tempExp)
    for example, is some generated conditions. All the conditions are generated prior to boolean expression. If there were any short circuiting of the && operator, it wouldn't matter because bVar1 has already been calculated anyways.
    *shrugs* oh well though. As long as the conditions are kept short and sweet, it doesn't really matter too terribly much (although it still really bothers me ).
    posted 17 July 2015 03:29 AM EDT (US)     1458 / 1680       
    MP Sound Filename For Player
    Set ALL Protounit cost to 0

    [This message has been edited by DamianEnriquez (edited 07-17-2015 @ 07:27 PM).]

    Heretic of December
    posted 17 July 2015 09:14 PM EDT (US)     1459 / 1680       
    This is a trigger from my trigger pack. You can use it to set the cost of all units to a value, just change the values to 0.

    <Effect name="Set All Protounit cost">
    <Param name="Player" dispName="$$22301$$Player" varType="player">0</Param>
    <Param name="Sixteen" dispName="Gold" varType="float">1</Param>
    <Param name="Seventeen" dispName="Wood" varType="float">1</Param>
    <Param name="Eighteen" dispName="Food" varType="float">1</Param>
    <Param name="Nineteen" dispName="Favour" varType="float">1</Param>
    <Command>trQuestVarSet("ModProtoRandomQV", 0);</Command>
    <Command>while(800>=trQuestVarGet("ModProtoRandomQV")) {</Command>
    <Command>trQuestVarSet("ModProtoRandomQV", trQuestVarGet("ModProtoRandomQV")+1);}</Command>

    The trigger pack can be found here

    [This message has been edited by scragins (edited 07-17-2015 @ 09:20 PM).]

    posted 17 July 2015 09:55 PM EDT (US)     1460 / 1680       
    now i need this:
    MP Sound Filename For Player
    MP US Camera Cut (this exist?)
    Heretic of December
    posted 18 July 2015 02:46 AM EDT (US)     1461 / 1680       
    I just noticed that the trigger I posted is for Titans so it will not affect that new unit in the extended edition.
    posted 19 July 2015 01:22 PM EDT (US)     1462 / 1680       
       <Effect name="MP Sound Filename For Player">
    <Param name="Sound" dispName="Sound" varType="sound">default</Param>
    <Param name="EventID" dispName="Trigger" varType="event">-1</Param>
    <Param name="Subtitle" dispName="Subtitle" varType="stringid"></Param>
    <Param name="Portrait" dispName="Portrait" varType="string"></Param>
    <Command>if(trCurrentPlayer() == mp) {</Command>
    <Command>trSoundPlayFN("%Sound%", %EventID%, "%Subtitle%","%Portrait%");</Command>

    <Effect name="MP US Camera Cut For Player">
    <Param name="QV" dispName="Same Var as start" VarType="string">MPUS</Param>
    <Command>if(trCurrentPlayer() == mp) {</Command>

    Untested, but they should work.

    What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
    Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
    Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
    Irrational Fear
    posted 19 July 2015 07:33 PM EDT (US)     1463 / 1680       
    I think damian just needs nottud's "conditional player current" trigger at this point.
    <Effect name="conditional Player Current">
    <Param name="info" dispName="Info" VarType="string">Use to apply effects only to a particular player in multiplayer</Param>
    <Param name="Param1" dispName="Player" VarType="player">1</Param>
    <Command>if(trCurrentPlayer() == %Param1%){</Command>

    You can put any effects within this conditional as long as they do not alter the world in any way. (i.e. army deploy or move to point are not allowed)

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    posted 19 July 2015 09:53 PM EDT (US)     1464 / 1680       

    Thanks this work great, i havent tested the Sound one but i have another question, i want to make a RPG map with camera always follow the main hero unit of every player, i tried using MP Camera Unit not the MP US but it makes the game so LAG that is unplayable, like playing at 1fps LOL
    This will work fine without LAG if i setup it like this?

    Active, High, Loop
    MP Setup Start 1-6
    MP US Camera Cut For Player
    MP Setup End
    Heretic of December
    posted 19 July 2015 10:09 PM EDT (US)     1465 / 1680       
    Lewonas what is that mp variable, I don't see it defined in the rest of the trigger?

    [This message has been edited by scragins (edited 07-19-2015 @ 10:10 PM).]

    posted 19 July 2015 11:21 PM EDT (US)     1466 / 1680       
    MP US Revive
    is this possible?
    like Unit Revive

    mp setup start
    MP US conditional is dead
    MP US revive
    - protounit to use: argus
    - when revives changes to: any protounit
    mp setup end

    Lewonas send me the typetest to fix the MP inventory triggers

    [This message has been edited by DamianEnriquez (edited 07-19-2015 @ 11:26 PM).]

    That AoM Guy
    (id: aom expert)
    posted 20 July 2015 07:16 PM EDT (US)     1467 / 1680       
    Is it possible to have a fade to color for player?

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Irrational Fear
    posted 20 July 2015 07:55 PM EDT (US)     1468 / 1680       
    yes. Put it under a "conditional Player Current" effect.

    [This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
    That AoM Guy
    (id: aom expert)
    posted 20 July 2015 10:35 PM EDT (US)     1469 / 1680       
    So the trigger doesn't need to be made?

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    posted 21 July 2015 00:31 AM EDT (US)     1470 / 1680       
    yeah like that effect on some scenario i played was about escaping a giant ice avalanche, when players gets dead the whole screen gets fade to red, BUT just that player others not
    hey aomexpert unblock from GR that game was vs PC is not a reason to block some one that is ur friend for a very long time
    Heretic of December
    posted 21 July 2015 04:31 AM EDT (US)     1471 / 1680       
       <Effect name="Fade To Color For Player">
    <Param name="R" dispName="$$21858$$Red" varType="long">0</Param>
    <Param name="G" dispName="$$22499$$Green" varType="long">0</Param>
    <Param name="B" dispName="$$21785$$Blue" varType="long">0</Param>
    <Param name="Duration" dispName="$$22540$$Duration(ms)" varType="long">1000</Param>
    <Param name="Delay" dispName="$$22500$$Delay(ms)" varType="long">1000</Param>
    <Param name="Fade" dispName="$$22501$$Fade" varType="bool">true</Param>
    <Param name="Player" dispName="Player" VarType="player">1</Param>
    <Command>if(trCurrentPlayer() == %Player%){</Command>
    Heretic of December
    posted 21 July 2015 04:36 AM EDT (US)     1472 / 1680       
    Sorry that should work although I have not tested it but the forum is fiddling with the code a little.

    [This message has been edited by scragins (edited 07-21-2015 @ 07:07 AM).]

    posted 21 July 2015 07:31 AM EDT (US)     1473 / 1680       
    @DamianEnriquez: Sounds like my map - or least similar. I wrote a couple of escape avalanche maps and had screen go red when all players died.

    Regard the "for player" stuff use the conditional Zenophobia posted - that allows any trigger to be made to only occur for one player.
    That AoM Guy
    (id: aom expert)
    posted 21 July 2015 09:16 AM EDT (US)     1474 / 1680       
    Awesome thanks

    damian, ok but in the future I have a zero tolerance level for spawn hacking

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    (id: P_J_B)
    posted 21 July 2015 11:57 AM EDT (US)     1475 / 1680       
    Im trying to set up a resurrection system where when the player (who is a campaign hero that can be revived) dies, their corpse is teleported to a graveyard where it can safely be revived. My issue right now is that I can't teleport the dead corpse, is there a way to quickly revive and manipulate that unit via a trigger I don't have yet?

    I realize most of this would be better placed in the question thread, but I heard talk of a unit revive trigger in the question thread, and if that trigger exists, I do not possess it, that is why i ask here.

    "I NED MOAR RANGE" Pubby8
    « Previous Page  1 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 57 58 59 60 61 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames