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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Have a Trigger Request? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 27 28 29 30 31 ··· 34  Next Page »
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).]

Replies:
posted 02-04-12 02:56 PM EDT (US)     701 / 851  
it works
you could try it with trPlayerSetActive or use the player set defeated effect
1. why would i wana do that?
2. what does trPlayerSetActive do?
posted 02-04-12 03:19 PM EDT (US)     702 / 851  
1. why would i wana do that?
"Player Resigns" = Player Gives Up = technically the same like SetPlayerDefeated
2. what does trPlayerSetActive do?
It sets the current Player
Usefull for
a)ui effects like Select Factory and Change Tactic of the Factory
b)a co-op game (chatting there causes oos)->All humans play now the same player (player 1,2,3,4 control player 1's units for example after this efffect happens)


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
posted 02-04-12 04:08 PM EDT (US)     703 / 851  
i dont quite follow 100%. would you care to elaborate a bit more?
posted 02-06-12 02:33 AM EDT (US)     704 / 851  
UI effects are effects that happen just on one computer (local). If you press the delete button you can only kill your own units, if you like to change the tactic you can only do it on your own units.

Finally you can only use the resign button for you.

This trigger uses UI effects to handle like a human who changes tactic.

<Effect name="Unit Set Tactic: Factory">
<Param name="PlayerID" dispName="Player ID" VarType="string">1</Param>
<Param name="Obj" dispName="$$22295$$Source Units" VarType="unit">default</Param>
<Param name="Note" dispName="Note" VarType="string">Because of the nature of this trigger, it can only change the Tactic of one Unit at a time. </Param>
<Param name="A" dispName="Produce Food" VarType="bool">false</Param>
<Param name="B" dispName="Produce Wood" VarType="bool">false</Param>
<Param name="C" dispName="Produce Coin" VarType="bool">false</Param>
<Param name="D" dispName="Produce Cannon" VarType="bool">false</Param>
<Command>uiClearSelection();</Command>
<Command>trUnitSelectClear();</Command>
<Command>trBlockAllSounds(true);</Command>
<Command>for(FP=0;>1){}</Command>
<Command>FP=trCurrentPlayer();</Command>
<Command>trackInsert(); trackAddWaypoint();</Command>
<Command>if(FP==%PlayerID%) {</Command>
<Command>trPlayerSetActive(%PlayerID%);</Command>
<Command>trUnitSelect("%Obj%");</Command>
<Command>for(oldPlayer=xsGetContextPlayer();>99){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>for(err=0;>1){} for(id=0;>1){} id = kbGetUnitBaseTypeID(kbGetBlockID("%Obj%")); </Command>
<Command>if(trUnitIsOwnedBy(%PlayerID%)){if(trUnitAlive()){</Command>
<Command>while(trUnitIsSelected()!=true) {err=err+1; </Command>
<Command>uiFindType(kbGetProtoUnitName(id));</Command>
<Command>if(err>200) {break;}}}}</Command>
<Command>xsSetContextPlayer(oldPlayer);</Command>
<Command>trPlayerSetActive(FP);}</Command>
<Command>trackPlay(1,-1);</Command>
<Command>trUnblockAllSounds();</Command>
<Command>if (%A% == true) unitSetTactic("Food");</Command>
<Command>else if (%B% == true) unitSetTactic("Wood");</Command>
<Command>else if (%C% == true) unitSetTactic("Normal");</Command>
<Command>else if (%D% == true) unitSetTactic("Cannon");</Command>
<Command>uiClearSelection();</Command>
</Effect>

the trigger can only work in the right player context, therefor trPlayerSetActive and trCurrentPlayer are very important.

If you just use the Player Set Active in a trigger. All humans will control the same player (co-op). One player could focuse on eco and another on fighting. However chatting will desync the game.


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 02-06-2012 @ 02:34 AM).]

posted 02-06-12 03:38 PM EDT (US)     705 / 851  
If you just use the Player Set Active in a trigger. All humans will control the same player (co-op).
WHAT??

I'm putting this into use. Now.
posted 02-06-12 04:09 PM EDT (US)     706 / 851  
i found just never use of it in this context because my connection is sooo slow. And i have cooler ideas in mind :P


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
posted 02-06-12 11:26 PM EDT (US)     707 / 851  
hi, i was wondering how i can reveal stealth just with trigger, or using a building.

I want stealth to be revealed everytime they come close to the persons base and i cant use a unit cus it will be deleted on a certain time cus of a function in the scenario
posted 02-06-12 11:31 PM EDT (US)     708 / 851  
Quoted from Mister_SCP:
I doubt this will cause OOS

Condition:
Unit type selected
Effect
Set Tactic NOT Artillery =Melee
OR XS User code

unitSetTactic("Melee");


Finally the reason why it shouldnt cause OOS:
Unit type selected goes OOS if you use effects that affect gameplay (create unit/tribute) but if you use ui functions as Send Chat or set tactic it shouldnt cause they are only doable /visible for one player like you regulary use your user interface to change the tactic
that should suffice, but for better results you should use "Set Tactic NOT Artillery =volley" after "Set Tactic NOT Artillery =Melee." this will set all units into melee mode mode then ranged mode. hope this helps!
posted 02-13-12 08:15 PM EDT (US)     709 / 851  
my FWG trig still gives resources to dead people but the code looks good. any ideas why?
posted 02-14-12 04:43 PM EDT (US)     710 / 851  
I dont see anything at all, however you dont take death players resources away. And the are counted infite times:

For example a dead mate has 20k gold. He would give the team aboost of 20k gold every second [if you use your desired intervall] (10k for each person alive)



I would also solve it using an array (inventory system), this allow you flexible teams. It'S also pretty cool for random event settings (if you wish more informations just ask :P)

a tip:
-loops makes coding easier and code better readable


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 02-14-2012 @ 04:53 PM).]

posted 02-14-12 05:06 PM EDT (US)     711 / 851  
What exactly is an array?

StormComing (to me): "Seems like you're way under-ranked"

Check out my series of guides for the scenario editor in the link below! | Best Otto TR score

The definitive collection of my scenarios, along with my scenario editor walkthrough, recorded games, and much much more!
posted 02-14-12 05:41 PM EDT (US)     712 / 851  
This is a team holding array


















ArraynameFieldValue
Team 1
0
1
2
3
3
1
3
5
Team 2
0
1
2
3
3
2
4
6


Well you know QV's. The values are assigned to a QV number. With arrays it's basicly the same but it has one dimension more. So You need two vales (name + field) to recieve your value.

Imagine it like football. The arrayname is the league (2.Bundesliga) [with 18 teams in], the field is the Team (FC Erzgebirge) and the value shows you how many points this team has (e.g. 25). Hope that helped a bit for understanding ...

back to topic:
I define now a array with the name "Team 1" with 4 values

Team 1 + 0 ->there i store the number of players which are alive (=3)
Team 1 + 1->there i store ID of Member 1 (1)
Team 1 + 2->there i store ID of Member 2 (3)
Team 1 + 3->there i store ID of Member 3 (5)

Now player 3 must withdraw, so i kick him from my array (I assume i use this with inventory triggers which erase Member 2 and set Member 3 on his position














ArraynameFieldValue
Team 1
0
1
2
3
2
1
5
3


the parser will now only look anymore on position 1 and 2 because position 0 tells him there are just two players alive.

For random events you can imagine it like this. Allready used events are "kicked" and cant be fired any longer, because the rule ignore this numbers


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 02-14-2012 @ 05:48 PM).]

onfiregun17
Skirmisher
posted 02-14-12 06:00 PM EDT (US)     713 / 851  
What exactly is an array?
dont bother learning them unless you wanna learn how to script triggers :P
musketeer925
Skirmisher
posted 02-14-12 06:06 PM EDT (US)     714 / 851  
To the contrary, onfire!

Arrays have saved me many a time from having to script a trigger.
onfiregun17
Skirmisher
posted 02-14-12 07:46 PM EDT (US)     715 / 851  
today has been a good Valentines Day. i got these triggers scripted

<Effect name="Player Select Protounit">
<Param name="Player" dispName="Player" varType="player">1</Param>
<Param name="Proto" dispName="Protounit" VarType="protounit">Settler</Param>
<Command>trPlayerSetActive(%Player%);</Command>
<Command>uiFindType(%Proto%);</Command>
<Command>uiFindAllOfSelectedType();</Command>
<Command>trPlayerSetActive(%Player%);</Command>
</Effect>

<Effect name="UI Stop Selected Units">
<Param name="Player" dispName="Player" varType="player">1</Param>
<Command>trPlayerSetActive(%Player%);</Command>
<Command>uiStopSelectedUnits();</Command>
<Command>trPlayerSetActive(%Player%);</Command>
</Effect>

they have a lot of potential

[This message has been edited by onfiregun17 (edited 02-14-2012 @ 11:05 PM).]

onfiregun17
Skirmisher
posted 02-23-12 07:52 PM EDT (US)     716 / 851  
highly doubt it, but would it be possible to disable deleting units by changing the delete key's hotkey?
Mister SCP
Scenario Reviewer
posted 02-24-12 02:52 AM EDT (US)     717 / 851  
you can disable the hotkey but not the icon in the command panel

map("delete","game","");
( i dunno if delete is the correct button name)

btw: maybe the icon is a gadget,but i have no clue how it could be named


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
onfiregun17
Skirmisher
posted 02-24-12 05:54 PM EDT (US)     718 / 851  
oh yeah....but the map command works
edit: this trig doesn't seem to like meh very much

<Effect name="Set Team Tech For Player">
<Param name="Player" dispName="Player" varType="player">1</Param>
<Param name="TechID" dispName="Tech" VarType="tech">0</Param>
<Command>xsSetContextPlayer(%Player%);</Command>
<Command>for(x=cNumberPlayers;>0){</Command>
<Command>int Team_" + x + "_Tech=0;</Command>
<Command>if(kbIsPlayerAlly(x)) Team_" + x + "_Tech=2;}</Command>
<Command>for(x=cNumberPlayers;>0){</Command>
<Command>trPlayerSetDiplomacy(%Player%, x, "enemy");</Command>
<Command>trPlayerSetDiplomacy(x, %Player%, "enemy");}</Command>
<Command>trTechSetStatus(%PlayerID%, %TechID%, 2);</Command>
<Command>for(x=cNumberPlayers;>0){</Command>
<Command>if(Team_" + x + "_Tech==2){</Command>
<Command>trPlayerSetDiplomacy(%Player%, x, "ally");</Command>
<Command>trPlayerSetDiplomacy(x, %Player%, "ally");}}</Command>
</Effect>

[This message has been edited by onfiregun17 (edited 02-25-2012 @ 02:45 AM).]

Lord of Spiel
Skirmisher
posted 02-25-12 06:18 PM EDT (US)     719 / 851  
well onfiregun i do not really get what this effect really does...(seems to work like a normal "set tech status") ,anyway there is a little logical error in it:
for(x=cNumberPlayers;>0){
trPlayerSetDiplomacy(%Player%, x, "enemy");
trPlayerSetDiplomacy(x, %Player%, "enemy");}
you set here the choosen player with hisself as enemy (because he is also one of the players in the game^^)

this should fix that:

for(x=cNumberPlayers;>0){
if (x==%Player%) continue;
trPlayerSetDiplomacy(%Player%, x, "enemy");
trPlayerSetDiplomacy(x, %Player%, "enemy");}

Eso Name: Spielbubi
Old Heavengames account: Loard of peace
my Trigger set
sp Gladitor (latest version)
sp the Zombie City

[This message has been edited by Lord of Spiel (edited 02-26-2012 @ 01:38 PM).]

Seph29
Skirmisher
posted 02-26-12 12:05 PM EDT (US)     720 / 851  
Hi, I was wondering if there is any way to make a trigger that constantly copies the score that you're getting killing enemy units into a QV.
I can't just use the XP thing because that includes also the score that you get building units and from economy.
Any ideas? I'm new to this so I hope I'd not have to make a new custom effect for this...
onfiregun17
Skirmisher
posted 02-26-12 06:50 PM EDT (US)     721 / 851  
im 99.99% sure that is impossible. sorry bro

oh and speil, it allows you to set a team tech active for only that specified player. for example: if i want to have p5 to have early skirms, i'd use that effect and use the tech earlyskirmsteam to do it

[This message has been edited by onfiregun17 (edited 02-26-2012 @ 06:52 PM).]

Mister SCP
Scenario Reviewer
posted 02-27-12 04:15 AM EDT (US)     722 / 851  
Hi, I was wondering if there is any way to make a trigger that constantly copies the score that you're getting killing enemy units into a QV.
NO
I can't just use the XP thing because that includes also the score that you get building units and from economy.
Any ideas? I'm new to this so I hope I'd not have to make a new custom effect for this...
Maybe woking with these stat values to calculate a value:
Enemy Units Killed
Units Lost
Units Lost Cost

@onfiregun I meant the icon with the skull which is visible if you have the normal ui (dont know about minimized ui)
oh and spiel, it allows you to set a team tech active for only that specified player. for example: if i want to have p5 to have early skirms, i'd use that effect and use the tech earlyskirmsteam to do it
if i interpreted it correctly it sounds usefull

The int manipulation just won't accept it

Edit: this seems to be impossible as a team is independent from the diplomacy. This is however the fixed code: IT DOES NOT WORK AS INTENDED
  <Effect name="Set Team Tech For Player NOT WORKING">
<Param name="Player" dispName="Player" varType="player">1</Param>
<Param name="TechID" dispName="Tech" VarType="tech">0</Param>
<Command>xsSetContextPlayer(%Player%);</Command>
<Command>for(i=cNumberPlayers-1;>0){</Command>
<Command><![CDATA[if((kbIsPlayerAlly(i)) && (i!=%Player%)){]]></Command>
<Command>trQuestVarSet("MyFriend"+i,1);</Command>
<Command>trPlayerSetDiplomacy(%Player%, i, "enemy");</Command>
<Command>trPlayerSetDiplomacy(i, %Player%, "enemy");}</Command>
<Command>else trQuestVarSet("MyFriend"+i,0);}</Command>
<Command>trTechSetStatus(%Player%, %TechID%, 2);</Command>
<Command>for(i=cNumberPlayers-1;>0){</Command>
<Command><![CDATA[if((trQuestVarGet("MyFriend"+i)==1) && (i!=%Player%)){]]></Command>
<Command>trPlayerSetDiplomacy(%Player%,i, "ally");</Command>
<Command>trPlayerSetDiplomacy(i,%Player%, "ally");}}</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

[This message has been edited by Mister SCP (edited 02-27-2012 @ 06:18 AM).]

onfiregun17
Skirmisher
posted 02-27-12 07:50 PM EDT (US)     723 / 851  
what do you mean it doesn't work as intended? also, i made that trig with triggers in my scenario Medieval Wars and it seems to work fine. its just a hassle to use a bunch of effects so i made this...so it should work fine
Mister SCP
Scenario Reviewer
posted 02-28-12 04:57 PM EDT (US)     724 / 851  
it means team techs affect players who belong to your team.

Your team members might not be your allies

FFA - every player have a team
noraml game: there are two teams

in a test scenario Player 1 and 2 where effected when they share team 1.Player 3 wont be affected if he is team 2 even if he is your "ally".


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 02-28-2012 @ 05:04 PM).]

Seph29
Skirmisher
posted 03-04-12 08:18 AM EDT (US)     725 / 851  
hi I need a trigger that runs a countdown only if an unit is close to another one. I would use it to fire an units spawner trigger.
But I don't know how to make the process loop correctly...and I wish it would stop the countdown if the first unit goes away from the second, and resume it if unit1 comes back.
If u can help me, thank you

Nevermind, I found a better way to do it, now I just need to know: how to set a QV with Unit ID?
But I want to do it with fakified units, can I?
I'l explain it better: I want to make a trigger that get an ID from a fakified unit, put it in a QV, and use that QV with "QV Unit Create". The created unit should be playable obviously.

A list of ProtoIDs from the web would also be appreciated...

[This message has been edited by Seph29 (edited 03-04-2012 @ 02:16 PM).]

« Previous Page  1 ··· 10 ··· 20 ··· 27 28 29 30 31 ··· 34  Next Page »
Age of Empires III Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames