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

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.1672 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 2 3 4 5 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 67  Next Page »
Elrich
Hero
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.

    Notes:

    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.



Resources

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

Miscellaneous:
  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
    AuthorReplies:
    WinstonShnozwick
    Mortal
    posted 04 August 2010 04:43 PM EDT (US)     51 / 1672       
    The commands are all in mythic's command list thing. Im not on my computer right now so I cant call them up. But its just like terrainambient, waterspecular, suncolor, stuff liek that.


    And yeah I knew about lostro's, but I wanted to try this way, much less (way smaller) coding for the trigger. And with perps Idea, its new in its own way.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    perpetual_n00b
    Immortal
    posted 04 August 2010 04:54 PM EDT (US)     52 / 1672       
    @ Elrich
    These are the commands to get the lighting settings:
    ambientGetColor()
    sunGetColor()
    fakeSpecularSunGetColor()
    terrainGetAmbient()

    @ Winston
    You can look up the AoM Code Reference online

    This saving and loading of data is going to allow for some really great games

    Game idea
    You could have a world map scenario, that your hero wanders around. When he gets to certain locations a choice dialog pops up saying "Would you like to enter the Forbidden City? Yes/No" or something. If yes, save data via lighting, use the Load Scenario effect to enter the location, load the data via lighting. When you're done at that location, you save data and return to the world map scenario (use switch mentioned earlier to remember location), then wander around and enter other locations or even re-enter the location you were in before.

    This would allow for some really interesting quests. For example: While visiting a City (scenario) you are given a quest to find a relic in a Lost Temple (another scenario) and take it to a New Temple (yet another scenario) before returning to the City.

    Combine this with free-roaming gameplay and random encounters and you'll have a great RPG.
    WinstonShnozwick
    Mortal
    posted 04 August 2010 11:43 PM EDT (US)     53 / 1672       
    So basically this allows for larger maps.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    Necr0maNceR
    Lord of the Undead
    posted 05 August 2010 00:13 AM EDT (US)     54 / 1672       
    That is very interesting, it can also be used to make a campaign with save data that carries on from scenario to scenario. That world map idea sounds cooler though.

    My Work: Zombie Goliath texture mod -- My Screenshots -- Current Projects: Lost In Darkness
    Member of: Black Ice Studios
    ____
    |0..0|
    ||||
    nottud
    Mortal
    posted 05 August 2010 04:42 AM EDT (US)     55 / 1672       
    I don't think that the get commands work I am afraid - they are designed for use with the console I think... I never got them working anyway.... Never know though someone else might...

    The boy with the mad imagination
    Prepare for the ultimate duel!
    Learn to use all my triggers and what you can do with them. Visit here.
    Find out and download the transform trigger here.
    Play some minigames I have created outside AOM including some 3D games here.
    perpetual_n00b
    Immortal
    posted 05 August 2010 06:03 AM EDT (US)     56 / 1672       
    I don't think that the get commands work I am afraid - they are designed for use with the console I think... I never got them working anyway.... Never know though someone else might...
    Damn. I knew it must have been too good to be true. Oh, well, maybe someone can get it to work.
    Mythic_Freak
    Mortal
    posted 05 August 2010 07:23 AM EDT (US)     57 / 1672       
    Most (all?) getter-functions don't work properly, because either they just print their output to the console, or they don't return anything at all anymore.

    The closest to persistent variables I've seen so far, is by writing out variables to some log file (e.g. with trEcho(string msg)) and find some way to retrieve them. Kinda stuck on that part though...

    If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
    Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

    Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
    BSU_DoLhades
    Mortal
    posted 05 August 2010 10:49 AM EDT (US)     58 / 1672       
    hmmm

    what would be very easy is a modify godpower trigger

    say, select the time it runs for, the amount of times it 'strikes' (lightning or meteor), the strength of the god power and the recharge time

    anything else you can think of would be nice too

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    Ranfeld
    Mortal
    posted 05 August 2010 12:16 PM EDT (US)     59 / 1672       
    NAME:Teleport unit in front of unit.
    EXPLANATION:Teleports a unit in front of another unit, with a param allowing you to decide the distance between the units.

    NOTE

    I would really need this urgently...and I would really appreciate anyones help.

    [This message has been edited by Ranfeld (edited 08-05-2010 @ 12:21 PM).]

    BSU_DoLhades
    Mortal
    posted 05 August 2010 02:27 PM EDT (US)     60 / 1672       
    at the moment there is a similar trigger to that

    teleport unit to unit, it works online, so for now it will have to do until this is made

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    perpetual_n00b
    Immortal
    posted 05 August 2010 03:35 PM EDT (US)     61 / 1672       
    @ Ranfeld
    Here's an untested version of Unit Teleport in front of unit. No idea if it works, but I just combined the code for Teleport Unit and Army Deploy in front of unit

    <Effect name = "Unit Teleport in front of unit">
    <Param name="SrcObject" dispName="Source Units" varType="unit">default</Param>
    <Param name="Object" dispName="Target Unit" varType="unit">default</Param>
    <Param name="Distance" dispName="Distance" varType="string">1</Param>
    <Param name="Heading" dispName="Heading QV" varType="string">QV1</Param>
    <Command>trVectorQuestVarSet("unitposasdf", kbGetBlockPosition("%Object%"));</Command>
    <Command>trVectorQuestVarSet("unitnewasdf", xsVectorSet(1.0*%Distance%*Math_sin(PI/180.0*trQuestVarGet("%Heading%")),0,1.0*%Distance%*Math_cos(PI/180.0*trQuestVarGet("%Heading%")))); </Command>
    <Command>trVectorQuestVarSet("unitnewasdf", trVectorQuestVarGet("unitnewasdf") + trVectorQuestVarGet("unitposasdf"));</Command>
    <Command>trUnitSelectClear();</Command>
    <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
    <Command>trUnitTeleport(trVectorQuestVarGetX("unitnewasdf"),trVectorQuestVarGetY("unitnewasdf"),trVectorQuestVarGetZ("unitnewasdf"));</Command>
    </Effect>

    You'd need to have the unit heading in a QV but there is an effect to get a unit's heading that Elrich made floating around somewhere.
    BSU_DoLhades
    Mortal
    posted 05 August 2010 06:39 PM EDT (US)     62 / 1672       
    guys you remember i asked for a set tech in area a while back?

    turns out a non AOMH user figured out how quite a while back, AndreiM has posted it alongside some other triggers on
    [url=forumn.tk][/url]

    looks like theres been alot of changes in triggers and no one has even noticed on this site!

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    lostrozzacavalli
    Mortal
    posted 07 August 2010 11:29 AM EDT (US)     63 / 1672       
    BSU: provide a correct link please

    Winston/Elrich: From what I saw from MF reference file about console commands they are all voids, so yeah there's no way they can return anything. They could be easily read if put in chat but I don't think it's possible to transfer from the console (or AI/TR/RM outputs) to the chat..

    Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
    RandomMaps || Mad Supremacy Escape Your Mates Escape
    Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
    Games || Bullet Demo Ball Bouncer 3D
    WRP_Beater: "Meglio una gallina oggi che un uovo domani."
    My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
    Guard of Olympus
    Mortal
    posted 07 August 2010 12:07 PM EDT (US)     64 / 1672       
    Here's the correct link: http://www.forumn.tk/



    But I couldn't find anything about a Set tech status in area thing.

    ~Guard of Olympus ~
    _______________________________________
    Jag ser mot solen och tankarna de fr mig hem till AomH SD igen
    Learn how to create a website from scratch!
    _______________________________________
    Dark Times|My work (4.6)|Teaser #2
    Ranfeld
    Mortal
    posted 08 August 2010 11:39 AM EDT (US)     65 / 1672       
    @perpetual_n00b
    Thanks

    EDIT:

    Set Unit Percent Damage as QV
    and
    Fade to Color Percent QV
    and
    QV set play dialog

    [This message has been edited by Ranfeld (edited 08-08-2010 @ 11:37 PM).]

    Elrich
    Hero
    posted 09 August 2010 01:05 AM EDT (US)     66 / 1672       
    I'm making good progress on the new thread layout and the database behind it. I've gotten my threadbot to store entire threads in a database making it easier for me to scour the last thread for unresolved/resolved requests and to link a request with a response in this new thread.

    It seems linking requests with responses is not going to be easy, so I will probably require some kind of template for both to make my linking of them much easier. We'll see...

    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

    [This message has been edited by Elrich (edited 08-09-2010 @ 01:06 AM).]

    Ranfeld
    Mortal
    posted 10 August 2010 10:07 PM EDT (US)     67 / 1672       
    I am trying to write a trigger that shows an image during choice dialog with a QV in the subtitle.
    <Effect name = "QV Choice Dialog Image">
    <Param name="ArtName" dispName="$$23893$$Filename" varType="string">default</Param>
    <Param name="Subtitle1" dispName="$$22385$$Subtitle" varType="stringid"></Param>
    <Param name = "QVName1" dispName = "$$23952$$Var Name" VarType ="string">QV1</Param>
    <Param name="Text1" dispName="$$23896$$Choice 1" varType="stringid">default</Param>
    <Param name="Event1" dispName="$$23898$$Trigger 1" varType="event">-1</Param>
    <Param name="Text2" dispName="$$23897$$Choice 2" varType="stringid">default</Param>
    <Param name="Event2" dispName="$$23899$$Trigger 2" varType="event">-1</Param>
    <Command>trShowChoiceDialog("%ArtName%", "%Subtitle1% " + trQuestVarGet("%QVName1%") , "%Text1%", %Event1%, "%Text2%", %Event2%);</Command>
    </Effect>

    But for some reason although it shows up in my triggers, when I playtest the map it doesn't work. Could someone lend me a hand?

    [This message has been edited by Ranfeld (edited 08-10-2010 @ 10:08 PM).]

    perpetual_n00b
    Immortal
    posted 11 August 2010 05:20 AM EDT (US)     68 / 1672       
    @ Ranfeld

    It doesn't work because the command/function trShowChoiceDialog wants 5 parameters of particular types and you're trying to give it 6 which it doesn't know how to handle.

    The QV adding part seems fine, so you could do this:
    <Command>trShowChoiceDialog("%Subtitle1% " + trQuestVarGet("%QVName1%"), "%Text1%", %Event1%, "%Text2%", %Event2%);</Command>

    You can use commands to add icons to some text such as with the Counter:Add Timer (see the triggers in Specials group in The Wizard's Path for an example), but I haven't tried it with Choice Dialog before, so it might not work.

    Anyway, the code is:
    <icon=(20)(icons/improvement bone bow icon 64)(1,1,1)>

    If you can wait until after Kai's RPG competition, I'll be releasing a new Choice Dialog effect then.
    Ranfeld
    Mortal
    posted 11 August 2010 02:34 PM EDT (US)     69 / 1672       
    Thanks I'll work on it a bit later today. But let me get this straight, there can be only 5 parameter of a particular type in a trigger? The bit about icons will be useful.

    [This message has been edited by Ranfeld (edited 08-11-2010 @ 02:36 PM).]

    perpetual_n00b
    Immortal
    posted 11 August 2010 03:37 PM EDT (US)     70 / 1672       
    @ Ranfeld

    This is a bit rambling but it might help you understand the relationship between triggers, conditions, effects, functions and parameters.

    A trigger has conditions and effects.

    A trigger can also be set to Active, Loop or Run Immediately.

    If a trigger is active it will keep checking until all it's conditions are true then it will fire the effects and disable itself (inactive). If a trigger is looped, it will re-enable itself (active) each time it fires it's effects.

    In the conditions part of a trigger you have options of Not and Or. Selecting Not will cause the trigger to fire when the conditions are not true. Selecting Or will cause the trigger to fire when at least one condition is true.

    Conditions and effects have parameters (up to 7).

    Conditions and effects call functions, sometimes just one, sometimes many. Functions are the bits that do the work, i.e. move a unit or send a chat.

    The parameters from the conditions and effects are passed to functions. Sometimes not all the parameters from the condition/effect will be used in a function. Sometimes a parameter may be used in multiple functions.

    The number and type of parameters that a function will accept is determined by how it's defined.

    trShowChoiceDialog is the function that makes the Choice Dialog effect work and takes 5 parameters.
    trShowChoiceDialog

    public void trShowChoiceDialog(string maintext,
    string choice1,
    long event1ID,
    string choice2,
    long event2ID)
    Displays dialog with 2 choices, and activates a trigger in response.
    _
    Functions go inside command tags when scripting new effects, like this:
    <Command>trShowChoiceDialog("%MainText%", "%Text1%", %Event1%, "%Text2%", %Event2%);</Command>

    You can look up how many and what type of parameters a function requires in Mythic_Freak's AoM Code Reference or you can look at existing conditions and effects and try to work it out. If you use the wrong number of parameters or they are the wrong type, then the function won't work, which means the effect won't work.
    Ranfeld
    Mortal
    posted 11 August 2010 03:49 PM EDT (US)     71 / 1672       
    Very Helpful
    Elrich
    Hero
    posted 11 August 2010 09:19 PM EDT (US)     72 / 1672       
    A Preview of the new thread layout.

    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
    Ranfeld
    Mortal
    posted 12 August 2010 05:21 PM EDT (US)     73 / 1672       
    You can use commands to add icons to some text such as with the Counter:Add Timer (see the triggers in Specials group in The Wizard's Path for an example), but I haven't tried it with Choice Dialog before, so it might not work.

    Anyway, the code is:
    <icon=(20)(icons/improvement bone bow icon 64)(1,1,1)>
    Could you please post a short example?

    [This message has been edited by Ranfeld (edited 08-12-2010 @ 05:22 PM).]

    BSU_DoLhades
    Mortal
    posted 16 August 2010 11:17 AM EDT (US)     74 / 1672       
    new request:

    Random change unit name in area (note, i want it so it works on any unit rather than the one Nottud has for a single unit)

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    Elrich
    Hero
    posted 16 August 2010 05:00 PM EDT (US)     75 / 1672       
    I think I did a random *something* units in area before. What parameters do you want?

    Area, name, player#?

    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
    « Previous Page  1 2 3 4 5 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 67  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames