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: Trigger Command Location?
posted 01-26-08 07:01 PM EDT (US)   
i am looking for the loction of where the trigger commands and fields are stored, i will explain on that further in a bit. first i would like to say i am not looking for the typetest.xml, but rather the file for what each part of it does, let me explain.

here is the code for an effect from the typetest.xml
   <Effect name="Modify Protounit">
<Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
<Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
<Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
<Param name="Delta" dispName="$$23944$$Delta" varType="float">1.0</Param>
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, %Field%, Ūlta%);</Command>
</Effect>

let me point out a few parts of this. for example the line
    <Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
[code]
i would like to know where the file is that holds what the feilds are in 'protounit'.

another example;
[code]
<Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, %Field%, Ūlta%);</Command>
i would like to know where the file is that contains the code that tells the game exactly what 'trModifyProtounit' does.

thanks for any useful information.

i am not sure whether it should be here or in the modding thread, but if it gets little replies here then maybe move it.

Scenarios I have made
Single Player-: CAMPAIGN - Christmas - Forest River RPG - Total Freedom
MultiPlayer-: Castle Blood Automatic - Mafia Hitman - Warrior Defence
ESO = sandstorm....................................................................................."I won the bet on 1.04!"

[This message has been edited by gunner1 (edited 01-26-2008 @ 07:03 PM).]

Replies:
posted 01-27-08 06:39 PM EDT (US)     1 / 11  
I think what you are looking for is: trigtemp.xs located in the AOE3 folder in the My Games folder in the Documents folder.
posted 01-28-08 05:50 AM EDT (US)     2 / 11  
I don't think that is what Gunner looks for.

You need that file, so you possibly could change the fields, in the modify protounit effect, am I right?
If I'm not wrong, many have tried to find it, but with no luck...
posted 01-28-08 11:05 AM EDT (US)     3 / 11  
yes northen lord you are right about theat, and indeed maybe make other functions. i am pretty sure ES would tell us if they knew, i think it is because many of the current staff aren't those on the original team that made the editor, so it is hard to fix. Anyway, if anyone has any idea where it is it would be apreciated.

Scenarios I have made
Single Player-: CAMPAIGN - Christmas - Forest River RPG - Total Freedom
MultiPlayer-: Castle Blood Automatic - Mafia Hitman - Warrior Defence
ESO = sandstorm....................................................................................."I won the bet on 1.04!"
posted 01-28-08 02:55 PM EDT (US)     4 / 11  
stringtablex.xml I found some stuff containing *ProtoUnit*

I'm not aware of any modding based, but I think I know a pritty easy way.

Search your MS games > AOE3 folder for a '*.xml' file

open each file 1 by 1 and search on ProtoUnit.

It looks like alot of work, but don't open files containing the name of a map or a race. Should be found in proxy 10mins if you know what you wanna find.
posted 01-28-08 03:25 PM EDT (US)     5 / 11  
Protounit is in the string table as it is written somewhere in the whole of the game. also protounit is to much a of a gerneal term, you would really need to use 'delta'. i will try it now.

Scenarios I have made
Single Player-: CAMPAIGN - Christmas - Forest River RPG - Total Freedom
MultiPlayer-: Castle Blood Automatic - Mafia Hitman - Warrior Defence
ESO = sandstorm....................................................................................."I won the bet on 1.04!"
posted 01-28-08 03:35 PM EDT (US)     6 / 11  
Did a quick search... found nothing. anyone else got any ideas? ES?
posted 01-28-08 04:51 PM EDT (US)     7 / 11  
First of all, I should mention that I have no idea if any of this is right and I have not done any modding in AOE3. That being said, I think this could help figure it out so that we could eventually get modify protounit working.
   <Effect name="Modify Protounit">
- This is just the name of the effect
    <Param name="ProtoUnit" dispName="$$22449$$ProtoUnit" varType="protounit">Villager</Param>
- I think protounit simply refers to what unit it is, this is where you select a unit in the trigger. I doubt it can tell us anything about what can be modified.
   <Param name="PlayerID" dispName="$$22301$$Player" VarType="player">1</Param>
- This is the player that you select
      <Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
- This is where you choose what to modify. It looks like "pufield" must be the list of things to modify. Presumably, judging by the problems in the effect, the list must not contain all the correct values. I have no idea where it could be found though, it may be coded into the .exe and pretty much impossible to change. However, if the correct values could be found, maybe this could be changed into a box to type in the correct parameter to modify?
      <Param name="Delta" dispName="$$23944$$Delta" varType="float">1.0</Param>
- The amount that it is modified
      <Command>trModifyProtounit("%ProtoUnit%", %PlayerID%, %Field%, Ūlta%);</Command>
- I think this just tells it to modify a protounit based on the inserted values, again it is probably hard coded and unaccessible, but I think it is the fields, not this, that needs to be changed (no guaranty though :P)

Now I just looked around a bit seeing if I could find anything useful relating to the protounit or field. I've come up with two possibilities. Firstly in the techtree.xml there are techs that modify unit attacks and other fields. It is quite likely that theses are the same things that modify protounit would use, and therefore many of the missing fields could be found and potentially be used in the trigger.

The other possibility is to look in the Data.bar. From my brief look at it all references to protounit in it seem like they won't help for modifying protounits, however the tactics files that it contains may be useful. They contain every units' attacks and actions, and maybe something in there is useful for this. I haven't seen anything yet though, so far the techtree is looking more promising.

I have no experience making triggers, though I might mess around with this stuff if I have some time later this week. It would be nice if we could someone really experienced with modding to work on this too. Anyways good luck, hopefully something in there helped.

ESO: Space_man
AoE3 Cinematics:
Death by Natives and The Last Scenario Designer
Project announcement coming soon!
posted 01-28-08 05:21 PM EDT (US)     8 / 11  
thanks annihilator, i knew the first part.

*before reading on take into account that this is just what i think about modify protounit, not actaul fact.

however on the last part i would have to disagree with you. i think you are right about the
<Param name="Field" dispName="$$23943$$Field" varType="pufield">0</Param>
unless you were talking about where to find the info that stores 'pufield' then i think the best place to look for info is the proto.xml. First let me remind you of some of the feilds in modify protounit that do work;

  • HP
  • speed
  • LOS

    and some that don't

  • range
  • ranged attack crush

    now heres an extract from the proto.xml

    <Unit id ='286' name ='Musketeer'>
    <DBID>3</DBID>
    <DisplayNameID>22805</DisplayNameID>
    <EditorNameID>25023</EditorNameID>
    <PopulationCount>1</PopulationCount>
    <ObstructionRadiusX>0.4900</ObstructionRadiusX>
    <ObstructionRadiusZ>0.4900</ObstructionRadiusZ>
    Ranged
    <MaxVelocity>4.0000</MaxVelocity>
    <MaxRunVelocity>6.0000</MaxRunVelocity>
    <MovementType>land</MovementType>
    <TurnRate>18.0000</TurnRate>
    <AnimFile>units\infantry_ranged\musketeer\musketeer.xml</AnimFile>
    <ImpactType>Flesh</ImpactType>
    <PhysicsInfo>dude</PhysicsInfo>
    <Icon>units\infantry_ranged\musketeer\musketeer_icon_64x64</Icon>
    <PortraitIcon>units\infantry_ranged\musketeer\musketeer_portrait</PortraitIcon>
    <RolloverTextID>22812</RolloverTextID>
    <ShortRolloverTextID>25669</ShortRolloverTextID>
    <InitialHitpoints>150.0000</InitialHitpoints>
    <MaxHitpoints>150.0000</MaxHitpoints>
    <LOS>16.0000</LOS>
    <ProjectileProtoUnit>InvisibleProjectile</ProjectileProtoUnit>
    <UnitAIType>RangedCombative</UnitAIType>
    <TrainPoints>30.0000</TrainPoints>
    <Bounty>10.0000</Bounty>
    <BuildBounty>10.0000</BuildBounty>
    <Cost resourcetype ='Food'>75.0000</Cost>
    <Cost resourcetype ='Gold'>25.0000</Cost>
    <AllowedAge>1</AllowedAge>
    <Armor type ='Hand' value ='0.2000'></Armor>
    <UnitType>LogicalTypeHealed</UnitType>
    <UnitType>LogicalTypeValidSharpshoot</UnitType>
    <UnitType>LogicalTypeNeededForVictory</UnitType>
    <UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
    <UnitType>LogicalTypeLandMilitary</UnitType>
    <UnitType>LogicalTypeScout</UnitType>
    <UnitType>LogicalTypeValidSPCUnitsDeadCondition</UnitType>
    <UnitType>LogicalTypeGarrisonInShips</UnitType>
    <UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
    <UnitType>LogicalTypeVillagersAttack</UnitType>
    <UnitType>LogicalTypeHandUnitsAttack</UnitType>
    <UnitType>LogicalTypeRangedUnitsAttack</UnitType>
    <UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
    <UnitType>Unit</UnitType>
    <UnitType>Military</UnitType>
    <UnitType>UnitClass</UnitType>
    <UnitType>AbstractInfantry</UnitType>
    <UnitType>AbstractHeavyInfantry</UnitType>
    <UnitType>HasBountyValue</UnitType>
    <UnitType>AbstractGunpowderTrooper</UnitType>
    <UnitType>Ranged</UnitType>
    <UnitType>CountsTowardMilitaryScore</UnitType>
    <UnitType>AbstractCavalryInfantry</UnitType>
    <UnitType>ConvertsHerds</UnitType>
    <UnitType>AbstractRangedInfantry</UnitType>
    <Flag>CollidesWithProjectiles</Flag>
    <Flag>ApplyHandicapTraining</Flag>
    <Flag>CorpseDecays</Flag>
    <Flag>ShowGarrisonButton</Flag>
    <Flag>DontRotateObstruction</Flag>
    <Flag>ObscuredByUnits</Flag>
    <Flag>Tracked</Flag>
    <Command page ='10' column ='1'>Stop</Command>
    <Command page ='10' column ='0'>Garrison</Command>
    <Command page ='10' column ='2'>Delete</Command>
    <Tactics>musketBayonet.tactics</Tactics>
    <ProtoAction>
    <Name>BuildingAttack</Name>
    <Damage>20.000000</Damage>
    <DamageType>Siege</DamageType>
    <ROF>3.000000</ROF>
    </ProtoAction>
    <ProtoAction>
    <Name>DefendHandAttack</Name>
    <Damage>13.000000</Damage>
    <DamageType>Hand</DamageType>
    <ROF>1.500000</ROF>
    <DamageBonus type ='AbstractCavalry'>3.000000</DamageBonus>
    <DamageBonus type ='AbstractLightInfantry'>2.250000</DamageBonus>
    </ProtoAction>
    <ProtoAction>
    <Name>DefendRangedAttack</Name>
    <Damage>23.000000</Damage>
    <DamageType>Ranged</DamageType>
    <MaxRange>12.000000</MaxRange>
    <ROF>3.000000</ROF>
    </ProtoAction>
    <ProtoAction>
    <Name>MeleeHandAttack</Name>
    <Damage>13.000000</Damage>
    <DamageType>Hand</DamageType>
    <ROF>1.500000</ROF>
    <DamageBonus type ='AbstractCavalry'>3.000000</DamageBonus>
    <DamageBonus type ='AbstractLightInfantry'>2.250000</DamageBonus>
    </ProtoAction>
    <ProtoAction>
    <Name>StaggerHandAttack</Name>
    <Damage>13.000000</Damage>
    <DamageType>Hand</DamageType>
    <ROF>1.500000</ROF>
    <DamageBonus type ='AbstractCavalry'>3.000000</DamageBonus>
    <DamageBonus type ='AbstractLightInfantry'>2.250000</DamageBonus>
    </ProtoAction>
    <ProtoAction>
    <Name>StaggerRangedAttack</Name>
    <Damage>23.000000</Damage>
    <DamageType>Ranged</DamageType>
    <MaxRange>12.000000</MaxRange>
    <ROF>3.000000</ROF>
    </ProtoAction>
    <ProtoAction>
    <Name>VolleyHandAttack</Name>
    <Damage>13.000000</Damage>
    <DamageType>Hand</DamageType>
    <ROF>1.500000</ROF>
    <DamageBonus type ='AbstractCavalry'>3.000000</DamageBonus>
    <DamageBonus type ='AbstractLightInfantry'>2.250000</DamageBonus>
    </ProtoAction>
    <ProtoAction>
    <Name>VolleyRangedAttack</Name>
    <Damage>23.000000</Damage>
    <DamageType>Ranged</DamageType>
    <MaxRange>12.000000</MaxRange>
    <ROF>3.000000</ROF>
    </ProtoAction>
    </Unit>


    *i think a modder should amybe occrect me if iam wrong on the following{

    Now an important factor here is that the feilds in 'pufield' are probably not the exact thing that it tells the game to modify, but rather a display name. so for example when you get the field;
  • HP
    Hp is only a display name when it actualy modifies 'MaxHitpoints' (proto).

    now if we get the feild i mentioned that didn't work;
    'RangedAttackCrush'
    This was a leftover attack type from AOM, in that there were only 3 attack types (pierce, crush and another that slipls my mind.) then that got split into other groups such as range. in Aoe3 there are many diferent attack types. the ones from the musketeer are

  • BuildingAttack
  • DefendHandAttack
  • DefendRangedAttack
  • MeleeHandAttack
  • StaggerHandAttack
  • StaggerRangedAttack
  • VolleyHandAttack
  • VolleyRangedAttack

    Now then those also have individual sub-feilds, for example:
    <ProtoAction>
    <Name>VolleyHandAttack</Name>
    <Damage>13.000000</Damage>
    <DamageType>Hand</DamageType>
    <ROF>1.500000</ROF>
    <DamageBonus type ='AbstractCavalry'>3.000000</DamageBonus>
    <DamageBonus type ='AbstractLightInfantry'>2.250000</DamageBonus>
    </ProtoAction>


    so if we wanted to fix rate of fire, we would have to be modifying. ROF volleyHandAttack, thats just for one of the musketeers attacks. so you can imagine how many fields would needed to be added to 'pufield'. it is understandable why ES put this off, afterall all the balance guys have to do is change a bit of code in this.

    another example; if we wanted to modify attack of a musketeer, in hi normal hand attack, (VolleyHandAttack). then we would need a feild in pufield like this.
    VolleyHandAttack Damage.
    then if we wanted to do his normal ranged attack (VolleyRangedAttack). we would have to have another like this.
    VolleyRangedAttack Damage.

    If you get it you can skip this final example.

    <ProtoAction>
    <Name>VolleyRangedAttack</Name>
    <Damage>23.000000</Damage>
    <DamageType>Ranged</DamageType>
    <MaxRange>12.000000</MaxRange>
    <ROF>3.000000</ROF>
    </ProtoAction>


    to modify ranged attack we would need;
    VolleyRangedAttack MaxRange (the range).
    }

    so overall a pretty hard task to do, i think one that i would do and so would many other scenario designers, if they simply knew where the files were.

    Scenarios I have made
    Single Player-: CAMPAIGN - Christmas - Forest River RPG - Total Freedom
    MultiPlayer-: Castle Blood Automatic - Mafia Hitman - Warrior Defence
    ESO = sandstorm....................................................................................."I won the bet on 1.04!"
  • posted 01-28-08 06:01 PM EDT (US)     9 / 11  
    posted 01-28-08 07:45 PM EDT (US)     10 / 11  
    Woah, keep up the good work guys!

    It seems like when we put a real interest into something, ES will respond, like with CSO. It sucks that we really have to go down and show them that we really want/need this, but if that's what we gotta do, then oh well. Hopefully the outcome will be the same.

    Check out my YouTube Page!
    ESO - LO12DS_Fry
    posted 01-29-08 11:26 AM EDT (US)     11 / 11  
    I sent an email to Ensemble asking them to take a look at this thread and give us a hint.
    thanks very much, hopefully ES will be able to help. Hopefully if ES gives us enough info we could even fix it and many other problems, even add new 'tr' functions and fields, such as modify tech.

    Scenarios I have made
    Single Player-: CAMPAIGN - Christmas - Forest River RPG - Total Freedom
    MultiPlayer-: Castle Blood Automatic - Mafia Hitman - Warrior Defence
    ESO = sandstorm....................................................................................."I won the bet on 1.04!"
    Age of Empires III Heaven » Forums » Scenario Design » Trigger Command Location?
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Empires III Heaven | HeavenGames