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 41 42 43 44 ··· 50 ··· 60 ··· 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
    posted 04 July 2012 00:12 AM EDT (US)     1026 / 1680       
    I am currently working on a small single-player scenario and I was wondering how you work with 'Difficulty'? I have been trying to use it to do different things but whenever I try to play the map in a different difficulty to easy it reverts back to easy. Could I please have some help on this matter, Thanks
    Cabz =)
    posted 04 July 2012 08:25 AM EDT (US)     1027 / 1680       
    Cabz31, the difficulty level doesn't really do much by itself in custom scenarios.

    You need to set up triggers to check the difficulty level and do things accordingly.

    For example, if the difficulty level is Hard or higher then you might want to spawn more enemy units

    Trigger - Spawn_on_hard
    [x] Active
    [_] Loop
    [_] Run Immediately
    Priority = High

    Difficulty Level
    Operator is >=
    Level = 2 (0=Easy,1=Moderate,2=Hard,3=Titan)

    Army Deploy
    Army = EnemyArmy
    ProtoName = whatever unit
    Location = wherever
    Count = 30
    Heading = 0
    Clear Existing Units = ON

    Here's a custom effect I made for using difficulty level, it sets a Quest Var depending on what the difficulty level is and you don't need to use the difficulty level condition for this:

    <Effect name="Difficulty Level QV Set">
    <Param name="QVName" dispName="Var Name" VarType="string">QV1</Param>
    <Param name="Cheasy" dispName="Value if Easy" VarType="string">1500</Param>
    <Param name="Moderate" dispName="Value if Moderate" VarType="string">1300</Param>
    <Param name="Hard" dispName="Value if Hard" VarType="string">1100</Param>
    <Param name="Titan" dispName="Value if Titan" VarType="string">900</Param>
    <Command>if (trGetWorldDifficulty() == 0) {</Command>
    <Command>trQuestVarSet("%QVName%", %Cheasy%);</Command>
    <Command>if (trGetWorldDifficulty() == 1) {</Command>
    <Command>trQuestVarSet("%QVName%", %Moderate%);</Command>
    <Command>if (trGetWorldDifficulty() == 2) {</Command>
    <Command>trQuestVarSet("%QVName%", %Hard%);</Command>
    <Command>if (trGetWorldDifficulty() == 3) {</Command>
    <Command>trQuestVarSet("%QVName%", %Titan%);</Command>

    You could use it to grant resources to the player e.g. give more gold if Easy or give more gold to the enemy if Titan

    <Effect name="QV Grant Resources">
    <Param dispName="$$22301$$Player" name="PlayerID" varType="player">0</Param>
    <Param dispName="$$22455$$Resource" name="ResName" varType="resource">food</Param>
    <Param VarType="string" dispName="$$23952$$Var Name" name="QVName">QV1</Param>
    <Command>trPlayerGrantResources(%PlayerID%, "%ResName%", trQuestVarGet("%QVName%"));</Command>

    Trigger - Give_Gold
    [x] Active
    [_] Loop
    [_] Run Immediately
    Priority = High


    Difficulty Level QV Set
    Var Name = Player_Gold
    Easy = 999
    Moderate = 666
    Hard = 333
    Titan = 0

    QV Grant Resources
    Player = 1
    Resource = Gold
    Var Name = Player_Gold

    Difficulty Level QV Set
    Var Name = Enemy_Gold
    Easy = 0
    Moderate = 333
    Hard = 666
    Titan = 999

    QV Grant Resources
    Player = 2
    Resource = Gold
    Var Name = Enemy_Gold

    If you just want your enemy to have stronger human units, try this custom effect I made:

    <Effect name="Difficulty Level Adjust Human Soldiers Player Range">
    <Param name="PlayerMin" dispName="Player Min" varType="string">2</Param>
    <Param name="PlayerMax" dispName="Player Max" varType="string">12</Param>
    <Command>for (pid = %PlayerMax%; >= %PlayerMin%) {</Command>
    <Command>if (trGetWorldDifficulty() >= 1) {</Command>
    <Command>trTechSetStatus(pid, 478, 4);</Command>
    <Command>if (trGetWorldDifficulty() >= 2) {</Command>
    <Command>trTechSetStatus(pid, 479, 4);</Command>
    <Command>if (trGetWorldDifficulty() == 3) {</Command>
    <Command>trTechSetStatus(pid, 480, 4);</Command>

    If difficulty is Moderate or higher, they will get Medium units tech
    If difficulty is Hard or higher, they will get Heavy units tech
    If difficulty is Titan, they will get Champion units tech

    Trigger - Tough_Enemy
    [x] Active
    [_] Loop
    [_] Run Immediately
    Priority = High


    Difficulty Level Adjust Human Soldiers Player Range
    Player Min = 2
    Player Max = 12

    [This message has been edited by perpetual_n00b (edited 07-06-2012 @ 04:23 AM).]

    posted 06 July 2012 01:55 AM EDT (US)     1028 / 1680       

    in your first trigger watch out for this:
    <Command>trQuestVarSet("%QVName%", Ísy%);</Command>

    the e isn't what it should be. i doubt that's an issue in your actual trigger but it'll get copied if left like that
    posted 06 July 2012 04:20 AM EDT (US)     1029 / 1680       
    Yeah, the forum occasionally misinterprets those things.

    I'll fix it now.
    posted 15 July 2012 02:44 PM EDT (US)     1030 / 1680       
    ok i'm working on a new set of triggers and have encountered a problem..

    one of the major things i wanted to address was using a "units in area" condition without a central unit. i looked at the v-triggers method and it uses a whole lot of queries which i have no idea how to use. before eplaining those to me i've wanted to ask about my workarounds.

    1.) i haven't see "kbArmyCreate" in anyone's triggers at all, what's the deal on that does it not work?
    2.) trcountunitsinarea requires a central unit; is there something else i can put in the first field other than something with a unit vartype?

    3.) completely different from these others. i am completely oblivious to most C-programming, most things i do in any programming are here in aom. For doing mathematics i know it's very sloppy to use entirely trquestvarset, so i'd like to use defined terms such as "long h1=0", but the trigger i tried with that completely derped and i had no idea how to troubleshoot it. could i have an explanation on using these terms?

    Thanks in advance
    posted 16 July 2012 11:37 AM EDT (US)     1031 / 1680       
    #3. You don't want to declare variables like in normal programming using var because of conflicts with variable scope in the AoM triggering environment. Here is how you want to do it:

    <Command>for(convcount = 0; > 1){}</Command>

    The for statement forces AoM to create the variable convcount as an integer because its initial value is 0. Once declared, you can use this variable within your custom effect/condition as you like just as if you used a int (varname) = command.

    Without going into complicated detail, here is how using int, float statements can go wrong. You cannot declare a variable with the same name more than once in the same scope(read on). Of course you wouldn't do this, but.... When you are making a custom Effect, you only see the code of that effect and let's say you need a counter variable and you use int x=0;. Then you are making a different custom effect and you need a counter again so you do int x=0; again. A trigger is actually a single function that is composed of all the effects that you added to it, so if you have added both those custom effects that each declare their own int x=0;, you will cause a duplicate variable declaration error (though AoM isn't nice enough to give you an error message, it just causes what we call 'trigger lock', i.e. none of your triggers run at all).

    This is because a trigger has its own temporary memory space for your variables created for it when a trigger is run. Each effect of a trigger is processed and if requested, variables are created and written into this memory space, so if the first effect declares a variable x and another effect in the same trigger also declares x, you will get the conflict. The for statement trick works because any variable created using the for statement only exists within the even more temporary memory space of only that effect. Once all the code of that effect is finished, the memory that holds all the for-declared variables is erased and the variables and the values that they held cease to exist just as if you hit the clear button on a calculator. Now that they don't exist, they can be re-declared again in the next effect.

    When you use int, float to create a variable, that variable exists across all effects in that same trigger(that is the scope of those variables) and keeps its value until the trigger is finished and then their memory space is wiped clean ready to be re-used for the next trigger. This also means that if in the first effect, x is declared and set with a value, then you can use that same x in the following effects and the value will persist between them - although this makes for confusing and sloppy programming.

    So to conclude, variables have their short lived memory spaces that define the scope of their existence. You cannot redeclare a variable in the same scope. The variables mentioned here are local variables. QuestVar variables are global variables. Once they are given a value (and therefore created) using trQuestVarSet(), they exist for the life of the game and are a way for different triggers to share information between each other.

    For deeper understanding, go into the editor and run your scenario. Return back to the editor then exit AoM directly from the editor without going back through the menus. Then in windows go into your My Documents/My games/Age of Mythology/trigger folder and open the trigtemp.xs file with a text editor. You will see how effects of a trigger combine into a single function and how all of your triggers exist in a long to do list of functions to run, top to bottom in the file. AoM starts at the top of this trigger 'to do' list and processes it to the bottom (using the priority setting to skip lower priority triggers every 2nd,3rd 4th time), then repeats this over and over again, creating scratch memory spaces between each trigger for local variables, then wiping it clear for the next trigger.

    I hope that gives you some deeper insight into the happy world of triggering for AoM.

    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
    posted 28 July 2012 08:04 AM EDT (US)     1032 / 1680       
    Name - v unit find coordinates/vector
    Description - the trigger provides the X, Y, and Z coordinates (or a vector containing them) of a unit that I found using the target protounit query triggers created by HailToTheOboe.
    I need a trigger that will provide me with the coordinates of a house that is damaged more than 20%, and move a fireman to that house. I already know how to burn the house and how to move the fireman to these coordinates, but I can't find the coordinates of the burning houses.
    posted 28 July 2012 09:25 AM EDT (US)     1033 / 1680       
    Here you go:

    <Effect name="v Quest Var Set from Unit Co-Ordinates">
    <Param name="QVName1" dispName="Var Name X" VarType="string">LocX</Param>
    <Param name="QVName2" dispName="Var Name Y" VarType="string">LocY</Param>
    <Param name="QVName3" dispName="Var Name Z" VarType="string">LocZ</Param>
    <Command>trQuestVarSet("%QVName1%", xsVectorGetX(kbGetBlockPosition(""+1*UnitID)));</Command>
    <Command>trQuestVarSet("%QVName2%", xsVectorGetY(kbGetBlockPosition(""+1*UnitID)));</Command>
    <Command>trQuestVarSet("%QVName3%", xsVectorGetZ(kbGetBlockPosition(""+1*UnitID)));</Command>
    I already had a non-v trigger version so it was easy to convert.

    Edit: Actually, this one might be better for you if you've using the move to vector effects

    <Effect name="v Unit Position To QV Vector">
    <Param name="VQVName" dispName="Vector Name" VarType="string">V1</Param>
    <Command>trVectorQuestVarSet("%VQVName%", kbGetBlockPosition(""+1*UnitID));</Command>

    [This message has been edited by perpetual_n00b (edited 07-28-2012 @ 09:31 AM).]

    posted 28 July 2012 03:03 PM EDT (US)     1034 / 1680       
    be careful with that. when you try to specify one unit from the target protounit triggers like in perpetual's example, if there is more than 1 unit of that type it will choose the closest unit to the protunit search query centre unit.
    posted 29 July 2012 04:53 AM EDT (US)     1035 / 1680       
    perpetual_n00b - Many thanks for the effect. I have a problem with it. It works perfectly on its own, but it stops working when I add it to my scenario. What may the reason for that be?

    Ghostoo - Thank you for pointing that out. In fact, it saves a lot of work to me, because this is exactly what I need.
    posted 29 July 2012 09:00 AM EDT (US)     1036 / 1680       
    ORm0rni, I can't be certain why it stops working in your scenario, but as I'm sure you know, the vector effects require the trigger loader.

    The trigger loader needs to be in a trigger created before an effect that requires it, otherwise the effect won't work.

    The easiest way to do that is to put the Activate Trigger Loader effect in the first trigger. If it's not already there, copy the first trigger (you can find what it is in the Fire Event drop down list as it lists them in order of creation), then change original to include only Activate Trigger Loader.
    posted 29 July 2012 08:43 PM EDT (US)     1037 / 1680       
    ok so if for{} holds effect-wide variables and float and int and etc don't, i'm having an issue. i've discovered (correct me if i'm wrong) that the for{} vars only hold integeters; whole numbers - which is completely logical as they're for adding +1 to a value until a condition is met. so for things that need the decimals after it i'd have to use float, which stays within the system for the whole trigger. so, as you can imagine, i'm asking how do you cope with this? is there a trick or do you just have to go and use floats?
    posted 30 July 2012 11:53 AM EDT (US)     1038 / 1680       
    Questvars are floats. They are bulky to use because you have to use trQuestVarGet and trQuestVarSet which is large just for a variable, but it will work. You just have to remember that they will have the value from the last time they were used which is in any trigger because it is global in scope. It is good practice in programming to set initial values to variables (usually set them to zero) before you start using them for calculations.

    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
    posted 13 August 2012 12:39 PM EDT (US)     1039 / 1680       
    You don't need to even use for and I don't know why you do.
    You can literally put int x; and define x. and use assignment like normally.

    [This message has been edited by L33TSkillz (edited 08-13-2012 @ 12:39 PM).]

    posted 13 August 2012 12:58 PM EDT (US)     1040 / 1680       
    @L33TSkillz - we use for because if you make a trigger that has two or more effects with int x in it causes things to break as it applies to the whole trigger not just to the effect like variables declared in a for statement do.

    For a more in-depth explanation see Elrich's earlier post
    posted 20 August 2012 04:09 AM EDT (US)     1041 / 1680       
    Is it possible to save a chat message in a quest string? If so, how would you do that?

    I know this has been asked before, but I forgot the answer.

    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%]
    posted 20 August 2012 06:32 AM EDT (US)     1042 / 1680       
    Here's a basic effect for saving player chat.

    <Effect name="QV Set String From Player Chat">
    <Param name="PlayerID" dispName="$$22301$$Player" VarType="string">1</Param>
    <Param name="S1" dispName="Var Name" VarType="string">QV1</Param>
    <Param name="tag" dispName="Chat tag" varType="string">name </Param>
    <Param name="length" dispName="Length of string" VarType="long">5</Param>
    <Command>string alphabet = "abcdefghijklmnopqrstuvwxyz1234567890 ";</Command>
    <Command><![CDATA[for(n=1; <= %length%) {]]></Command>
    <Command><![CDATA[for(i=1; <= 37) {]]></Command>
    <Command>if(trChatHistoryContains("%tag%"+ trStringQuestVarGet("%S1%") +""+ String_charAt(alphabet,i), %PlayerID%)) {</Command>
    <Command>trStringQuestVarSet("%S1%", ""+trStringQuestVarGet("%S1%") +""+ String_charAt(alphabet,i));}</Command>

    You need to set a tag, for example 'Name: ', the effect will then save the rest of the line (up to Length of String) sent in chat after 'Name: ' (provided it is a number, letter or space) to a QV string.

    [This message has been edited by perpetual_n00b (edited 08-20-2012 @ 06:35 AM).]

    posted 21 August 2012 06:15 AM EDT (US)     1043 / 1680       
    Thanks perpetual_n00b.

    I have one problem though. Is it possible to save the result of the {playername(1)} code in a string? If I send the {playername(1)} code through a send chat command, the output is "Lewonas". But when I use your effect, it saves the quest string as (the chat input) "{playername(1)}".

    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%]
    posted 24 August 2012 06:06 AM EDT (US)     1044 / 1680       
    I think {playername(1)} is like those commands that show LOS, Speed, etc and is just interpreted by the engine for display but not actually converted to a string.
    posted 26 August 2012 01:27 PM EDT (US)     1045 / 1680       
    well lewo just a minor thing but in my game it uses {playername(1}, maybe that's just an interpretation that the game accepts both.

    and for the qv string i can't think of an actual way to take what's in the chat and put it into a qv, i could think of a major work on the "chat contains" conditions, but then there'd be an insta-oos
    Fire of Fafnir
    posted 07 November 2012 10:33 PM EDT (US)     1046 / 1680       

    Hi, I'm a bit of a noob when it comes to triggers but I understand the basics at least. I've also done some very basic trigger work on my own single-player scenarios. Right now my titans version is broken so I'd appreciate it if you could please give your advice for just vanilla AOM.

    I'm looking for 2 things really. The first is that I don't know how to make a tech available for research. I can set a tech status to 'active' but when I use 'available' or 'obtainable' the tech doesn't show up where it should. For example I want to make a scenario where even when I'm just loki, I can research all the norse techs and train all the myth units.
    Can anyone help?

    My second request is kinda related to the first. I want to be able to have the passive bonuses granted by each of the three major Norse Gods. So if the major god is Loki in the scenario I still want my human soldiers to regenerate, ravens to spawn, be able to train all armory techs in the foundry from the first age, hersirs to be stronger etc
    When I tried this the major Gods appeared to cancel the bonuses of the the first.

    I have looked around for the answers to these questions but have thus far been unsuccessful. I'd be very grateful if someone could help me out.
    posted 08 November 2012 08:43 AM EDT (US)     1047 / 1680       
    ok fire of fafnir

    first of all, this actually belongs in the "Got a question? Post it here!" thread. the trigger request is actually to request a custom-made trigger to preform an action that the built-in triggers can't preform.

    as for your questions:

    using the set tech status, "available" is the status you should want it at. obtainable makes it so when the time comes, they're allowed to research it, whereas available should make it researchable from there, and active just enables that tech automatically for that player. some problems you might be running into are your god isn't allowed to research that tech (ie you can't research a pharaoh tech as a norse god). i'm not entirely sure, but with available you might need to be at the proper age to train that tech (which makes it identical to obtainable?). and make sure you're using the right building to train the tech (lol).

    as for your second question, you can set your own modifications on a trigger and use the condition "player civilization". it basically says if they're this god, do this effect. so for the civilization name you actually put gods' names. i don't think it's a natural trigger so here it is:
        <Condition name="PLAYER Civilization">
    <Param name="Player" dispName="$$22301$$Player" VarType="player">1</Param>
    <Param name="Op" dispName="$$22297$$Operator" VarType="operator">==</Param>
    <Param name="MyString" dispName="Civilisation" VarType="string">Zeus</Param>
    <Expression>kbGetCivName(kbGetCivForPlayer(%Player%)) %Op% "%MyString%"</Expression>

    if you don't know how to add triggers, there's a guide on it in the main post of this thread.
    Fire of Fafnir
    posted 09 November 2012 00:20 AM EDT (US)     1048 / 1680       
    Thanks Ghostoo, very helpful
    posted 25 November 2012 05:46 PM EDT (US)     1049 / 1680       
    Hello,i came up with a trigger idea.

    v save has QVstring

    save units name selected by the v search trigger inside a QVstring.

    That would be a nice use of the QVstring trigger^^.

    Thanks for help

    [This message has been edited by oxHaNxo (edited 11-25-2012 @ 05:47 PM).]

    posted 26 November 2012 11:33 PM EDT (US)     1050 / 1680       
    In the question thread oxHaNxo asked:
    Hello everyone, well i'm currently working on a single player rpg and i need some help about how i could do a trigger system that includes: ( take loots from dead units / drop items and have the capacity to take back the same item afterwards).
    I have tested with army on unit condition (using invisible target), it has worked but the problem is that the game only takes into account the last army deployed... (so triggers will just work on the last item of same type dropped -_- )

    Here's my train of thought:

    First look at what dropped items do for the character:
  • give gold or some other resource
  • give them a weapon or armor which means in reality, increase their stats via modify protounit while weilding it.
  • ....etc

    The list of events around treasure dropping and using:
    1. Kill a unit
    2. randomize treasure(is it gold/weapon/armor-how much/how strong?)
    3. create treasure that can be picked up
    4. react to the event of picking up that treasure
    5. if a weapon/armor, ask if they want to wield it, if gold just add it
    6. if a weapon/armor, first you must 'remove' the current one
    7. add the new weapon/armor

    I think a relic is a good idea because it looks like gold and you can detect if a hero is carrying one or not. You mentioned using army deploy and I think you have 'clear units' selected so the army only contains the last item deployed. It sounds like you have come up with a solution for some of what I've mentioned here and I think the next thing you need are Questvars.

    Questvars (QVs) can remember numbers for you and be available anywhere in your triggers. My idea using the unit id is a way you can store and retrieve a dropped treasure (relic)'s randomized type of treasure. Here is that idea in more detail:

    Let's say treasure can be 1 of 3 things: gold, armor or a weapon. Make number codes for each type- gold=1 armor=2 weapon=3.

    1. decide what the treasure is: gold, armor or weapon
    2. choose random value for that type of treasure
    3. army deploy the relic and determine the unit's unit id number.(you can select the army then get the unit id of the selected unit)
    4. create questvars that store that unit's information:
    let's say the unit id is 582. QVs can be named with a combination of text and numbers so create a QV using the unit id. We need to know the treasure type and the amount associated with that treasure type (i.e. if it's gold, how much? weapon-how much bonus for wielding it). Create a
    qv with the name "trtype" + unit id - in this case 'trtype582' and the treasure amount "tramt582". When a hero picks up a relic and you want to know what it is, you can get that unit id and build the name of the QV that is remembering the type and amount: trquestvarget("trtype" + unitid).

    You would also need to know what modification the current wielded armor or weapon is having upon the hero so make QV's that keep track of that as well. You could call them "curarmor" and "curweapon". When the hero wants to wield armor, you would first subtract the remembered armor modifier (which would start out as zero when the scenario starts), then add in the new treasure's modifier, then store THAT modifier in the 'curarmor' QV so you know how much to remove when it is dropped.

    Since I still don't know what you have implemented so far and what type of treasure you have, I won't think this much further, but if this sounds like something useful for you we can get to more details.

    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 ··· 10 ··· 20 ··· 30 ··· 40 41 42 43 44 ··· 50 ··· 60 ··· 68  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames