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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.847 replies, Sticky
Age of Empires III 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 ··· 10 ··· 20 ··· 30 ··· 34  Next Page »
Mister SCP
Scenario Reviewer
posted 05-22-09 02:11 AM EDT (US)         
So you have a 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.


    ------------------------------------------------------------ --------------------

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

    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 AOE§ installation folder. C:\Program Files\Microsoft Games\Age of Empires3 by default).
    Now open the trigger folder if you use vanilla -trigger1, if you use TWC -trigger2, and finally if you use TAD go to -trigger3.
    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 ,
    if you requested an effect paste it right above . Note the "s" at the end of both tags.

    Notes:

  • When copying the trigger from someone please click first and only then copy the required code.

  • If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.

    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.


    Help! My triggers have stopped working! If this doesnt help you can send an email including your scenario to mister.scp@gmail.com.


    ------------------------------------------------------------ --------------------

    Recommended Downloads:
    -Advanced Trigger Set
    -My Trigger Set
    -Gunner`s Trigger Set
    -Random22`s Trigger Set
    -Hedanito`s Trigger Set
    -Kolt`S Trigger Set
    -SH Trigger
    -M925's Trigger Set

    ------------------------------------------------------------ --------------------


    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. An example can be a great help when requesting complex triggers.

    [b]Name[/b]
    [b]Description[/b]
    [b]Params[/b]
    (A List of Params. If you are pretty nice you set them in the context with your request.)


    Unfinished Requests

    -a lot

    Finished Requests
    -even more (list isnt up to date)

    Not Possible:
    -Fixing Modify Protounit
    -Fixing Chat Contain
    -Change name of the protounit which affect also the name when you train it
    ------------------------------------------------------------ --------------------
    Additional: XS - Basics (mostly based on pftq's guide for XS - Effects + Conditions)

    XS - Triggers are a bit different from other triggers, since they use strings instead for e.g. PlayerID, Unit Select...
    The key highlight of these effects/conditions is to allow Unit Selections to be specified by number or QV. This makes great use of the effects which set QV to an OBJECT ID and opens up a whole new world of possibilites.

    This includes all original and new effects/conditions with ALL appliable fields set to use ANY form of data, including but not limited to:
  • -- Quest Var Code: enter trQuestVarGet("QVNAME")
  • -- Player Stats: enter trGetStatValue(PLAYER, STATID_NUMBER) e.g. trGetStatValue(1, 2)-> count "Enemy Units Killed" for Player 1
  • -- Math Operations: (5*PlayerStat) ...allowed are + - * / as Math Operations
  • -- Any XS Code: (just open the typetest.xml and start digging!)

    typical strings: (strings with * have additional informations on the bottom)
  • Amount (of resources), Radius, Headings, Duration, Damage Percent, Count (e.g. in Army Deploy), Rate (e.g. of Construction), Value
  • the table of PlayerID´s is a string
  • Operators* (don't use any numbers for them!)
  • Center Unit OBJECT ID/Source Unit OBJECT ID/Target Unit OBJECT ID **
  • Unit Type ID /ProtounitID ***



  • *Operators you can use are:
    == equal to
    >= equal to or higher
    <= equal to or lower
    > higher
    < lower
    != is not equal to

  • **The Unit Selections require an OBJECT ID. This is NOT the same as a NAME ID (like in Reyk's triggers). To find an OBJECT ID, use the supplied "QV Set.. OBJECT ID" effects OR select a unit and open the "Object Info" window. Open the Object Debug Info Window if you are using Age of Empires III and the ID is not readily available in the "Object Info".


    The first amount show you the Unit ID, every unit have a unique one. The third amount show you the Unit Type ID/ Protounit ID. Every MercJaeger have the ProtounitID -387-. Note that you can select ALL Units with Unit ID's but not even all with Protounit ID like cinematic blocks.

    1. ***TO USE NAME IDS: If you have the Name ID of a unit, you can convert it to OBJECT ID by using the kbGetBlockID("") function.
    2. ***For string (text) IDs, example: kbGetBlockID("ThisIsMyUnit")
    3. ***For QV, example: kbGetBlockID(""+trQuestVarGet("ThisIsMyQV"))
    4. ***For # NAME ID, example: kbGetBlockID("NUMBER")
      *** Generally, you can use kbGetBlockID(""+ID) for all, except text. As said above, enclose the text entirely with the quotes.


~MisterSCP


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 08-21-2011 @ 03:07 AM).]

AuthorReplies:
Mister SCP
Scenario Reviewer
posted 06-09-09 09:06 AM EDT (US)     26 / 847       
lol, now I need a "create unit(s) at units in area" trigger to create target blocks :P
the problem is that NO QUERY Trigger can get results of not searchable units (AoE3->Data->protoy.xml->
<Unit id ='98' name ='SPCFlag'>
...
<Flag>NotSearchable</Flag>
so you need to place one AITagetBlockWeak at each flag
by HAND
hows this? (I can guarantee it needs help.)
[code
1. The param DST is not used in the code... Replace the 1000 by %DST%
2. with for you define a variable. But in your case i is two times defined which cause that the trigger won't do what you want. Also AOE3 don't know how to handle"<". Therefore u either use
<Command><![CDATA[...your command;]]></Command>
or you define a Integer with
<Command>int u=0;</Command>
. If u want go with for and without CDATA you can use
<Command>for (u=%NewCount%;>0) </Command>
.
3. In your Create you forget closing right parenthesis -->two times "(" one time ")". The area cant be replaced easily by kbGetPosition-Command instead there is
xsVectorGetX(kbGetBlockPosition(""+1*%DstObject%)),xsVectorGetY(kbGetBlockPosition(""+1*%DstObject%)),xsVectorGetZ(kbGetBlockPosition(""+1*%DstObject%))
The last point is that you cannot leave out any param as you did it with heading. If yoou replace %Heading% by 0 he will accept it

I think so too :P
-Consti


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-09-2009 @ 01:16 PM).]

CrazyEngineerKid
Skirmisher
posted 06-09-09 02:23 PM EDT (US)     27 / 847       
wow...
I didn't realize this would use query too lol.

Thanks for your help with the trigger!
Hope you like the game when its done.

..XX......XX.........XXXXX..........The Answer to Life, The
..XX......XX.....XX.......XXX.......Universe, And Everything
..XX......XX...............XX.............(see left)
..XXXXXXX......XXX................Warning Science in Progress
............XX.......XXX....................Geeks Rule
............XX....XXXXXXXXX.....The current time: NOW
Mister SCP
Scenario Reviewer
posted 06-09-09 02:50 PM EDT (US)     28 / 847       
np.

hope I enjoy that too
In the old urban combat I won 90%


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-09-2009 @ 03:12 PM).]

CrazyEngineerKid
Skirmisher
posted 06-10-09 09:06 AM EDT (US)     29 / 847       
That scenario got me into sands but it was crude and really awfully balanced (for p1 and p2 lol). This map is just so huge that will take care of the balance
it also has a better market (w/ SIMSTools)


edit:
the flag trigger works just fine if I have one unit on the map, but as soon as I get more than one block and fighting unit, it just gives me grant*(number of blocks -1) every loop but that stops when I make my troops commit suicide. Even when I move the troops a ways away from the blocks, it thinks they are there. When I put three troops on three blocks, i do not get grant*3, I get grant*2.

..XX......XX.........XXXXX..........The Answer to Life, The
..XX......XX.....XX.......XXX.......Universe, And Everything
..XX......XX...............XX.............(see left)
..XXXXXXX......XXX................Warning Science in Progress
............XX.......XXX....................Geeks Rule
............XX....XXXXXXXXX.....The current time: NOW

[This message has been edited by CrazyEngineerKid (edited 06-10-2009 @ 11:06 AM).]

Mister SCP
Scenario Reviewer
posted 06-10-09 11:20 AM EDT (US)     30 / 847       
Okay I`ll check it


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
As_Saffah
Scenario Reviewer
posted 06-10-09 02:12 PM EDT (US)     31 / 847       
Cross posted from your trigger pack...

Can you use AS Checker to count the number of triggers total in a scenario file?

I have a scenario where the cost of certain mercenaries is set very high. This is for balance, because buying ninja = advance notice of where the lurking attacks are, and this should be forbidden.

Even with resource counts and checking to make sure someone doesn't grant themselves a big bunch of gold, there's other ways people can get around the scenario limits. FOr instance, they can Modify Protounit to boost their guys alot. They can Set Tech Status active for gold trickle or convert a unit or building they control into a Shrine later in the game. These are things the QV resource checker won't catch.

I want it so that you can't add or remove triggers without invalidating the game. So if you load the game with added or removed triggers, you get an error message "you noob, great job! " and the game ends.

Crunkatog on ESO
Bart331 balance suggestion: aztec: remove civ
Voltiguer: Ender, Sioux in 1.04 will be a top civ, no matter how many layers of Sioux goggles you put on
schildpad on Elephants: ...their mansabdar unit sucks so hard it looks like a black hole
Crunkatog on Steam.
Mister SCP
Scenario Reviewer
posted 06-10-09 04:35 PM EDT (US)     32 / 847       
I want it so that you can't add or remove triggers without invalidating the game. So if you load the game with added or removed triggers, you get an error message "you noob, great job! " and the game ends.
It's not possible to get total amount of trigs however I could write sth that bring in variables and set them to 1. And another effect checks if all are 1. I could also modify a effect that if he contains sth other as he should contain (a param was changed by the attacker)->the game stops. Also to combine both is possible.
For adding trigs I ve just in mind to make a trigger that contains the effect
<Command>/*</Command> 
. It must be the last one displayed in trigtemp.xs (so he needs to be in the last group and a the highest letter at the start of the name!). If someone create a new trigger that follows after him in the typetest the game will break...This was at least how TriggerToOne (AOM tool for get all your triggers into one trigger) protect from creating other triggers. Also triggers for de-activate groups like the group "ungrouped" or "Testing Area" are possible theoretical (trigs in it could look like fakes)

@Crazy: I believe I found the misstake so it should work soon . It seemed as I post the false code and (I make 5 different ones for faster testing in the editor) now I ve to look for the right one.


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-10-2009 @ 04:44 PM).]

CrazyEngineerKid
Skirmisher
posted 06-10-09 11:54 PM EDT (US)     33 / 847       
where do you get the "new" commands from?

Like this new chatbox thing. thats a great idea but i had no idea it worked that way.
eg. PTFQ was the first one to use kb query commands (I think) so did he just start typing randomly until he found a line of code that actually did something? (obviously not)

Did somebody decompile the game and post it somewhere I should know about? I have been thinking about trying that myself lol

..XX......XX.........XXXXX..........The Answer to Life, The
..XX......XX.....XX.......XXX.......Universe, And Everything
..XX......XX...............XX.............(see left)
..XXXXXXX......XXX................Warning Science in Progress
............XX.......XXX....................Geeks Rule
............XX....XXXXXXXXX.....The current time: NOW
Mister SCP
Scenario Reviewer
posted 06-11-09 08:44 AM EDT (US)     34 / 847       
where do you get the "new" commands from?
dl this. This is the Code Reference written by Mythic Freak. You can use commands of Knowledge Base (kb), External Subroutines (xs), Triggers (tr) and sometimes Console Command but for console commands you need to write them in XS User Code 6 from invent00r
   <Effect name="XS User Code 6">
<Param name="Cx1" dispName=" " VarType="stringid"></Param>
<Param name="Cx2" dispName=" " VarType="stringid"></Param>
<Param name="Cx3" dispName=" " VarType="stringid"></Param>
<Param name="Cx4" dispName=" " VarType="stringid"></Param>
<Param name="Cx5" dispName=" " VarType="stringid"></Param>
<Param name="Cx6" dispName=" " VarType="stringid"></Param>
<Command>/**/ %Cx%</Command>
<Command>/**/ %Cx2%</Command>
<Command>/**/ %Cx3%</Command>
<Command>/**/ %Cx4%</Command>
<Command>/**/ %Cx5%</Command>
<Command>/**/ %Cx6%</Command>
</Effect>
instead of
-%Cx%-
you can bring on your command... leave a line blank and the scenario will also works fine. Note that you can call all Console Commands if you type in the Console helptext(" "). The Victory Conditions as well the User Interface Commands arent supported unluckily by AOE3. However there atr Commands like uiHideCursor (i like this one... great AS Effect since Attacker needs to restart the whole game if they activate AS )which needs to be uiHideCursor() if you transform then into a trigger.


Like this new chatbox thing. thats a great idea but i had no idea it worked that way.
eg. PTFQ was the first one to use kb query commands (I think) so did he just start typing randomly until he found a line of code that actually did something? (obviously not)
This is just a console Command if you calling it using send chat (if you mean the stealth one). PFTQ took this system from TwentyLemonScore which create this for RMS. As pftq and most other people say start digging! E.g. in the AI files you find examples for using Arrays and some kb Commands.
Here is a link to the Master XS written by Mythic_Freak and invent00r if you feel boring you can read a bit in it and maye it will help you to create triggers (like it did for me...)

Here are some more triggers 4u which i wrote a wile ago for AOMH:
       <Effect name="QV Count Units in Area">
<Param name="DstObject" dispName="Center Unit" VarType="unit">default</Param>
<Param name="Player" dispName="Player" VarType="player">1</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
<Param name="Dist" dispName="Radius" VarType="float">10</Param>
<Param name="QV" dispName="Count(Var name)" VarType="string">QV1</Param>
<Param name="R3" dispName="Clear QV first " varType="bool">false</Param>
<Param name="Note" dispName="Note" VarType="string">If you set 'clear QV first' as -false- the current value will add to the result so you can count multiple units under same QV.</Param>
<Command>if (%R3%==false)trQuestVarSet("%QV%", 0);</Command>
<Command>trQuestVarSet("%QV%", trCountUnitsInArea("%DstObject%",%Player%,"%UnitType%",%Dist%));</Command>
</Effect>
<Effect name="QV Randomize 4 amounts">
<Param name="QV1" dispName="QV to Record" varType="string">QV1</Param>
<Param name="MinVal" dispName="Min" varType="float">1</Param>
<Param name="MaxVal" dispName="Max" varType="float">10</Param>
<Command>if ((%MaxVal% - %MinVal%) >=3){</Command>
<Command>trQuestVarSetFromRand("%QV1%"+1+"", %MinVal%, %MaxVal%, true);</Command>
<Command>while (trQuestVarGet("%QV1%"+1+"") == trQuestVarGet("%QV1%"+2+"") || trQuestVarGet("%QV1%"+2+"") == 0){</Command>
<Command>trQuestVarSetFromRand("%QV1%"+2+"", %MinVal%, %MaxVal%, true);}</Command>
<Command>while (trQuestVarGet("%QV1%"+1+"") == trQuestVarGet("%QV1%"+3+"") || trQuestVarGet("%QV1%"+2+"") == trQuestVarGet("%QV1%"+3+"") || trQuestVarGet("%QV1%"+3+"") == 0){</Command>
<Command>trQuestVarSetFromRand("%QV1%"+3+"", %MinVal%, %MaxVal%, true);}</Command>
<Command>while (trQuestVarGet("%QV1%"+1+"") == trQuestVarGet("%QV1%"+4+"") || trQuestVarGet("%QV1%"+2+"") == trQuestVarGet("%QV1%"+4+"") || trQuestVarGet("%QV1%"+3+"") == trQuestVarGet("%QV1%"+4+"") || trQuestVarGet("%QV1%"+4+"") == 0){</Command>
<Command>trQuestVarSetFromRand("%QV1%"+4+"", %MinVal%, %MaxVal%, true);}}</Command>
<Command>if (3 > (%MaxVal% - %MinVal%)) trChatSend(1, "Range for -QV Randomize 4 amounts- is too small ");</Command>
</Effect>
<Effect name="Quest Var xModify">
<Param name="QVName" dispName="Var Name" VarType="string">QV1</Param>
<Param name="Oper" dispName="$$22297$$Operator" VarType="string">+</Param>
<Param name="QVName2" dispName="Var Name 2" VarType="string">QV2</Param>
<Param name="QVName3" dispName="Var Name 3" VarType="string">QV3</Param>
<Param name="QVName4" dispName="Var Name 4" VarType="string">QV4</Param>
<Param name="QVName5" dispName="Var Name 5" VarType="string">I</Param>
<Param name="Note" dispName="Note" VarType="string">If you need just 3 or 4 Variables you must write -I- in Var Name 5 (and 4)</Param>
<Command>trQuestVarSet("%QVName%", trQuestVarGet("%QVName%") %Oper% trQuestVarGet("%QVName2%"));</Command>
<Command>trQuestVarSet("%QVName%", trQuestVarGet("%QVName%") %Oper% trQuestVarGet("%QVName3%"));</Command>
<Command>if ("%QVName4%" != "I") trQuestVarSet("%QVName%", trQuestVarGet("%QVName%") %Oper% trQuestVarGet("%QVName4%"));</Command>
<Command>if ("%QVName5%" != "I") trQuestVarSet("%QVName%", trQuestVarGet("%QVName%") %Oper% trQuestVarGet("%QVName5%"));</Command>
</Effect>
<Effect name="QV Damage Units in Area">
<Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Player" dispName="$$22301$$Player" VarType="player">1</Param>
<Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="string">10</Param>
<Param name="Damage" dispName="$$23762$$Damage" varType="string">50</Param>
<Command>trUnitSelectClear();</Command>
<Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command>
<Command>trDamageUnitsInArea(%Player%,"%UnitType%",trQuestVarGet("%Dist%"),trQuestVarGet("Úmage%"));</Command>
</Effect>
<Effect name="QV Color"> <Param name="Text" dispName="$$22311$$Tech" VarType="string">Nice Color</Param> <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param> <Param name="QV1" dispName="R" varType="string">QV1</Param> <Param name="QV2" dispName="G" varType="string">QV2</Param> <Param name="QV3" dispName="B" varType="string">QV3</Param> <Command>float a=trQuestVarGet("%QV1%"); float b=trQuestVarGet("%QV2%"); float c=trQuestVarGet("%QV3%");</Command> <Command>a=a/255;b=b/255;c=c/255;</Command> <Command><![CDATA[trChatSend(1, "<color="+a+","+b+","+c+">%Text%");]]></Command> </Effect>
QV Randomize 4 amounts: create 4 QVs. You can select the min and max range. None of the 4 amounts is the same. Insert QVName=TC will generate TC1, TC2, TC3 and TC4
Finally QV Colorize Chat creates colorfull chats by typing 3 QV's for Red, a Green and a Blue. Maybe usefull for getting specific colors(for fake players) and chats or just to play a bit around (combination with QV Modify). Your QVs should be between 0-255 if it is higher you get often a white as the color. If it is lower it will be black


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-11-2009 @ 09:10 AM).]

CrazyEngineerKid
Skirmisher
posted 06-11-09 09:50 AM EDT (US)     35 / 847       
wow, thats huge! Looks like I may be able to make actually useful triggers on my own now lol

..XX......XX.........XXXXX..........The Answer to Life, The
..XX......XX.....XX.......XXX.......Universe, And Everything
..XX......XX...............XX.............(see left)
..XXXXXXX......XXX................Warning Science in Progress
............XX.......XXX....................Geeks Rule
............XX....XXXXXXXXX.....The current time: NOW
Mister SCP
Scenario Reviewer
posted 06-11-09 10:49 AM EDT (US)     36 / 847       
Your repaired Trigger! I really posted the false Code. Plz remove your old one first and I also get the same false results as you when i tested the false code

 <Effect name="XS - Crazys Trigger2">
<Param name="DstObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="DST" dispName="Distance" VarType="string">10</Param>
<Param name="am" dispName="Count" VarType="string">1</Param>
<Param name="Grant" dispName="Grant Resource" VarType="string">10</Param>
<Command>for(Qid=0;>1){}</Command>
<Command>for(pla=1;>1){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, 1000);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>kbUnitQuerySetState(Qid,2);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
<Command>pla=1;</Command>
<Command>if (kbUnitQueryGetResult(Qid,i) != -1) {</Command>
<Command>while (4>=pla) {</Command>
<Command>if (trCountUnitsInArea(""+kbUnitQueryGetResult(Qid,i), pla, "Unit", %DST%) >= %am%) {</Command>
<Command>trPlayerGrantResources(pla, "Gold", %Grant%);}</Command>
<Command>pla=pla+1;}}}</Command>
<Command>kbUnitQueryDestroy(Qid);</Command>
</Effect>


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
KevTheGreat
Scenario Expert
posted 06-12-09 06:26 PM EDT (US)     37 / 847       
REQUEST:

Settlers in area work in area

Ex. I can set an target area where all settlers there will work on a target area such as a group of mines


Settlers in area work

Ex. Same as above but they work on a specific target
Darthcast
Skirmisher
posted 06-13-09 11:21 AM EDT (US)     38 / 847       
REQUEST:

Trigger name: cease-fire
How you could do this: Set the diplomacy for all players to neutral.

I think this would be useful for a lot of scenarios.

Play my scenarios! You won't believe how much fun they are!
Mister SCP
Scenario Reviewer
posted 06-13-09 11:30 AM EDT (US)     39 / 847       
1. I like better requests in the Form

Name: Effect/Condition xxx
Description: The Effect/Condition should do...
Parameters: Parameters which you like to have influence on.
e.g.

  • Player: what you need this param for
  • Center Unit: "-"
  • ...
    2. I can set an target area where all settlers there will work on a target area such as a group of mines
    I think it is not possible as you want it. But I can do a Code where u can select target units and the settlers where automatic splitted in groups and will work there. If you want to spawn gold mines while game we could make a combo of QV Set Unit ID's and your requested one as XS-Trigger
    Ex. Same as above but they work on a specific target
    that should be easy


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
Darthcast
Skirmisher
posted 06-13-09 11:54 AM EDT (US)     40 / 847       
I'm sorry that I didn't post in the right format. I didn't quite understand how you wanted it to be described.

Another try:

Name: Effect "Diplomacy all players"

Description: Intended for single player scenarios. This effect should work like the vanilla "Diplomacy"-effect, but it should make all players neutral/ally/enemy to a specific player. This could be used for a cease-fire if "neutral" is selected.

Parameters:
Status: Choose the diplomatic status. Possibilities are ally, neutral, enemy.

Player: The player who should be neutral/ally/enemy to all other players.

Player: Maybe another parameter (if possible) "Player" = a player who is not affected. This could be a player who already is allied to player 1 etc. and therefore should not be changed to neutral/enemy...

Play my scenarios! You won't believe how much fun they are!

[This message has been edited by Darthcast (edited 06-13-2009 @ 11:59 AM).]

Mister SCP
Scenario Reviewer
posted 06-13-09 12:25 PM EDT (US)     41 / 847       
Name: Effect "Diplomacy all players"

Description: Intended for single player scenarios. This effect should work like the vanilla "Diplomacy"-effect, but it should make all players neutral/ally/enemy to a specific player. This could be used for a cease-fire if "neutral" is selected.

Parameters:
Status: Choose the diplomatic status. Possibilities are ally, neutral, enemy.

Player: The player who should be neutral/ally/enemy to all other players.

Player: Maybe another parameter (if possible) "Player" = a player who is not affected. This could be a player who already is allied to player 1 etc. and therefore should not be changed to neutral/enemy...
This is a nice describtion btw. I answered to Kev's one and said it in general. At least the param list is quite usefull for me

@Darthcast: The second one is your reuested Effect
<Effect name="Diplomacy Player Range">
<Param name="Player1" dispName="highest Player" varType="player">4</Param>
<Param name="Status" dispName="are now" varType="alliance">neutral</Param>
<Param name="Player2" dispName="Not affect on P." varType="player">0</Param>
<Command>int xi=1; int xa=1;</Command>
<Command>while (%Player1%>=xi) {</Command>
<Command>while (%Player1%>=xa) {</Command>
<Command><![CDATA[if (xi!=%player2% && xa!=%player2%) ]]></Command>
<Command>trPlayerSetDiplomacy(xi, xa, "%Status%");</Command>
<Command>xa=xa+1;}</Command>
<Command>xa=1;</Command>
<Command>xi=xi+1;}</Command>
</Effect>


<Effect name="Diplomacy To One Player ">
<Param name="Player1" dispName="highest Player" varType="player">4</Param>
<Param name="Status" dispName="are now" varType="alliance">neutral</Param>
<Param name="Player2" dispName="with Player." varType="player">1</Param>
<Param name="Player3" dispName="Not affect on P." varType="player">2</Param>
<Command>int ya=1;</Command>
<Command>while (%Player1%>=ya) {</Command>
<Command>if (ya!=%player2%) {</Command>
<Command>if (ya!=%player3%) {</Command>
<Command>trPlayerSetDiplomacy(%Player2%, ya, "%Status%");</Command>
<Command>trPlayerSetDiplomacy(ya, %Player2%, "%Status%");}}</Command>
<Command>ya=ya+1;}</Command>
</Effect>
Effect1: Makes a Player Range from 1 to "Your Param(e.g. player 8)" in a state like ally,neutral or war. You can set up 1 Player who shouldnt be affected by this effect. If you dont need that choose Player 0
Effect2: Is your requested one. Also includes a Parameter for player range


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-13-2009 @ 01:43 PM).]

Darthcast
Skirmisher
posted 06-13-09 04:04 PM EDT (US)     42 / 847       
Thanks! I now installed all 3 triggers you wrote for me, and they all seem to work just fine! Great!

Play my scenarios! You won't believe how much fun they are!
Mister SCP
Scenario Reviewer
posted 06-13-09 04:12 PM EDT (US)     43 / 847       
nice!
I am now on Kev's one (testing phase)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-13-2009 @ 04:14 PM).]

CrazyEngineerKid
Skirmisher
posted 06-13-09 09:21 PM EDT (US)     44 / 847       
thanks for the code!

and about the ceasefire trigger, you could make it save the former alliances as qvs and set them back after the ceasefire was over. this would allow for a lot in scenarios to be able to stop fighting and resume exactly where it left off.

..XX......XX.........XXXXX..........The Answer to Life, The
..XX......XX.....XX.......XXX.......Universe, And Everything
..XX......XX...............XX.............(see left)
..XXXXXXX......XXX................Warning Science in Progress
............XX.......XXX....................Geeks Rule
............XX....XXXXXXXXX.....The current time: NOW
pyromaniac73
Skirmisher
posted 06-13-09 10:29 PM EDT (US)     45 / 847       
Could you create a trigger that makes one army move to another army? And if the army being moved to is not all together, the moving army could randomly split its units up and each "split" will go to a different "part" of the army being moved to? Hope that makes sense.
Mister SCP
Scenario Reviewer
posted 06-14-09 01:46 AM EDT (US)     46 / 847       
and about the ceasefire trigger, you could make it save the former alliances as qvs and set them back after the ceasefire was over. this would allow for a lot in scenarios to be able to stop fighting and resume exactly where it left off.
1. I would go therefore with
kbGetPlayerTeam(%PlayerID%)
. Make 8 variables (Integer or QVs. The point of Integer is that a the designer couldnt influence on this without knowing it ->same variable name. ) and since this code returns the teams this is good possible. This one would need to launch before your ceasefire trigger and then we'll need one who can interpret this variables. Should be possible!
2.Could you create a trigger that makes one army move to another army? And if the army being moved to is not all together, the moving army could randomly split its units up and each "split" will go to a different "part" of the army being moved to? Hope that makes sense.
probaly yes... Don't know i can make it randomly but invent00r used for some of his triggers the Index of armies which allows you to select members from a army


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-14-2009 @ 01:57 AM).]

Mister SCP
Scenario Reviewer
posted 06-14-09 03:24 PM EDT (US)     47 / 847       
         <Effect name="Diplomacy Reset">
<Param name="Player1" dispName="highest Player" varType="player">4</Param>
<Param name="Player2" dispName="Don't affect Player" varType="player">0</Param>
<Param name="Player3" dispName="Don't affect Player" varType="player">0</Param>
<Command>int u=1; int i=2;</Command>
<Command>while (%Player1%>=u) {</Command>
<Command>while (%Player1%>=i) {</Command>
<Command>if (u==%player2%) u=u+1;</Command>
<Command>if (u==%player3%) u=u+1;</Command>
<Command>if (i==%player2%) i=i+1;</Command>
<Command>if (i==%player3%) i=i+1;</Command>
<Command>if (kbGetPlayerTeam(u)==kbGetPlayerTeam(i))</Command>
<Command>trPlayerSetDiplomacy(u, i, "ally");</Command>
<Command>else trPlayerSetDiplomacy(u, i, "enemy");</Command>
<Command>i=i+1;}</Command>
<Command>i=1;</Command>
<Command>u=u+1;}</Command>
</Effect>
What does it do?->It change the diplomacy to the teams which was given at the start of the game
e.g. Player 1-4 are Team 1, Player 5-7 Team 2
After a cheasefire you can fire it and it will set the Teams as at the start of the game. If you select e.g. Player 5 for not affect at this trigger. He will hold his old one. Make sure that the 1. Don't affect Player has a lower or equal Id as the second Don't affect on Player Param.
Sry for you Kev but I havent solved the problen in the trigger yet


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
KevTheGreat
Scenario Expert
posted 06-14-09 09:47 PM EDT (US)     48 / 847       
thats fine, it isn't hindering my progress of my scenario

AGE OF EMPIRES 3 USERNAME - KevTheGreat :::: DAWN OF WAR 2 USERNAME - KEVTHEGREATEST :::: STEAM USERNAME - 何健龍
Some of my aoe3 scenarios here,
Most Popular: The Race 2 4.7/5.0 Global Wars 4.4/5.0 The Great Colosseum 4.6/5.0 Arab Desert 4V2 3.9/5.0 The Race 4.2/5 Fort of War 3.9/5.0
don't click this?
Follow me on Twitter
我知廣東話, 你知唔知廣東話?? 如果你知 contact me !!
Mister SCP
Scenario Reviewer
posted 06-16-09 04:23 PM EDT (US)     49 / 847       
I found the misstake! Now i just need to check if everything works as it is intend to do. Will post it tomorrow if my checks are succesfull


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 06-16-2009 @ 04:26 PM).]

Mister SCP
Scenario Reviewer
posted 06-17-09 11:51 AM EDT (US)     50 / 847       
for Kev:
<Effect name="Protounits work on Unit">
<Param name="DstObject" dispName="Target Unit" VarType="unit">default</Param>
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Command>for(Qid=0;>1){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, 10000);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>kbUnitQuerySetState(Qid,2);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*kbUnitQueryGetResult(Qid,i));</Command>
<Command>trUnitDoWorkOnUnit("%DstObject%");</Command>
<Command>}</Command>
</Effect>
<Effect name="Protounits work on Units">
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="DstObject" dispName="Target Unit" VarType="unit">default</Param>
<Param name="DstObject2" dispName="Target Unit2" VarType="unit">default</Param>
<Param name="DstObject3" dispName="Target Unit3" VarType="unit">default</Param>
<Param name="DstObject4" dispName="Target Unit4" VarType="unit">default</Param>
<Param name="DstObject5" dispName="Target Unit5" VarType="unit">default</Param>
<Command>for(Qid=0;>1){}</Command>
<Command>for(a=0;>1){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%ProtoName%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%ProtoName%"));</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%DstObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, 10000);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>kbUnitQuerySetState(Qid,2);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
<Command>a=a+1;</Command>
<Command>if (a==6) a=1;</Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*kbUnitQueryGetResult(Qid,i));</Command>
<Command>if (a==1) trUnitDoWorkOnUnit("%DstObject%");</Command>
<Command>else if (a==2) trUnitDoWorkOnUnit("%DstObject2%");</Command>
<Command>else if (a==3) trUnitDoWorkOnUnit("%DstObject3%");</Command>
<Command>else if (a==4) trUnitDoWorkOnUnit("%DstObject4%");</Command>
<Command>else trUnitDoWorkOnUnit("%DstObject5%");</Command>
<Command>}</Command>
</Effect>
1st one for just one Target unit. The second one for up to 5 target units where to work on. Note that if the first "target unit" is not selected the trigger won't maybe not work. Since the query selection depend on this unit


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
« Previous Page  1 2 3 4 ··· 10 ··· 20 ··· 30 ··· 34  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames