Guide
Introduction
STILL A WORK IN PROGRESS
In this guide I will tell you everything I know about data editting in AoM:EE. First of all, it is very similar if not completely the same as AoM:TT which is good, because I do not have to relearn everything before writing this guide, and bad... I will thank ES enough for certain things in this guide :P
Anyways, as I've been working with the Proto for about 7 years now (6 of them were useless ^^), Techtree for 5 years (Again wasted 4 years lol). So lets say I've effectively worked 1 year on both :D In that time I managed to learn how to use the engine properly. Now this might scare some of you away but the reason it took me so long to learn it properly is because learning stuff without guides and tutorials is a lot harder. So, that's why I'm writing this guide. To speed up your learning progress :)
So almost done with introducing but before we start with the actual guide there will be two more things to know. First of all, you should check out AoMH! The best and only place to go for modders and scenario designers Link[aom.heavengames.com]!
I will tell you about the second thing in the next section
Guide to the Guide
Okay so here is were I will try to tell you everything you should know before reading the rest of the guide.
Things you need:
- A functional brain
If you do not get why you need this then modding is not something for you :P
- A text editor
We're going to use a text editor most of the time. I would suggest notepad++ but just the regular notepad should do fine.
- Probably more
Things you need to know:
- Guide divisions
Eventually this guide will have atleast a Proto, Techtree, Anim and maybe a Trigger section and I will devide those again in skill levels: Noob, Intermediate, Expert, God. I will also say what kind of skill is required for each part of the guide since for example the God level will require all other sections skills to be atleast Expert. To be honest I'm between Expert and God and to write the God part I will get some help from a triggerer.
- Some files might be offending
Thanks ES for that but you really should not bother it at all, they just love to troll ^^
- Special Terms
AoM(TT/EE): Age of Mythology (The Titans/Extended Edition)
I'll list them here and the list might become longer overtime.
Proto: The file that defines all the units
Techtree: The file that defines all the technologies and godpowers
Anim: The file that defines all the animations
Trigger: My knowledge about these is limited fow now but these define the effects in mostly scenarios but can be used in any game mode.
Unit chaining: Using birth and deathreplacements, you will learn about these later.
Technology chaining: Using the set status effect in technologies to activate other Technologies.
More to come.
Things you need:
- A functional brain
If you do not get why you need this then modding is not something for you :P
- A text editor
We're going to use a text editor most of the time. I would suggest notepad++ but just the regular notepad should do fine.
- Probably more
Things you need to know:
- Guide divisions
Eventually this guide will have atleast a Proto, Techtree, Anim and maybe a Trigger section and I will devide those again in skill levels: Noob, Intermediate, Expert, God. I will also say what kind of skill is required for each part of the guide since for example the God level will require all other sections skills to be atleast Expert. To be honest I'm between Expert and God and to write the God part I will get some help from a triggerer.
- Some files might be offending
Thanks ES for that but you really should not bother it at all, they just love to troll ^^
- Special Terms
AoM(TT/EE): Age of Mythology (The Titans/Extended Edition)
I'll list them here and the list might become longer overtime.
Proto: The file that defines all the units
Techtree: The file that defines all the technologies and godpowers
Anim: The file that defines all the animations
Trigger: My knowledge about these is limited fow now but these define the effects in mostly scenarios but can be used in any game mode.
Unit chaining: Using birth and deathreplacements, you will learn about these later.
Technology chaining: Using the set status effect in technologies to activate other Technologies.
More to come.
Contents
Steam already has something like this but I'll add it anyways.
Contents
- Proto
- Techtree
- Anim
- Triggers
- Models
Proto
The Proto, probably the most important thing in the game besides the engine of course. You could try to remove it but then you won't be able to start the game :P I will tell you everything you should know about the Proto in this section of the guide. First the contents:
Contents: If you're not a noob then you could skip the first few chapters
Noobs: Skills Required: None!
1. What is Proto editing?
2. What is possible with Proto editing?
3. When should I use the Proto?
4. Editing the Protox
Intermediate: Skills Required: Proto Noobs, Anim Noobs, Techtree Noobs
5. Creating your own unit
6. Debugging the Proto
Expert: Skills Required: Proto Intermediate, Anim Intermediate, Techtree Intermediate
7. Unit Chaining
8. Unknown tricks
This might change eventually but for now it will be like this. Oh and the section character limit is really annoying so I'll have to split a lot of parts.
Contents: If you're not a noob then you could skip the first few chapters
Noobs: Skills Required: None!
1. What is Proto editing?
2. What is possible with Proto editing?
3. When should I use the Proto?
4. Editing the Protox
Intermediate: Skills Required: Proto Noobs, Anim Noobs, Techtree Noobs
5. Creating your own unit
6. Debugging the Proto
Expert: Skills Required: Proto Intermediate, Anim Intermediate, Techtree Intermediate
7. Unit Chaining
8. Unknown tricks
This might change eventually but for now it will be like this. Oh and the section character limit is really annoying so I'll have to split a lot of parts.
1) What is Proto Editing?
Proto editing is editing the proto(x).xml :D
In the proto(x).xml you will see a long list of tags that might make no sense to you at all. All you need to know for now is that in this list you can find all the units of AoM(TT). Each unit has a standard format, it starts with an opening tag <unit [data]> and ends with a closing tag </unit>. Everything in the Proto works with opening and closing tags and if one of the two is missing then the Proto will be invalid. Everything in the Techtree works with opening and closing tags and if one of the two is missing then the Techtree will be invalid. Between the <unit> tags there are a lot of other tags and most of them are important. Editing those tags or adding another Unit is what's called Proto editing.
In the proto(x).xml you will see a long list of tags that might make no sense to you at all. All you need to know for now is that in this list you can find all the units of AoM(TT). Each unit has a standard format, it starts with an opening tag <unit [data]> and ends with a closing tag </unit>. Everything in the Proto works with opening and closing tags and if one of the two is missing then the Proto will be invalid. Everything in the Techtree works with opening and closing tags and if one of the two is missing then the Techtree will be invalid. Between the <unit> tags there are a lot of other tags and most of them are important. Editing those tags or adding another Unit is what's called Proto editing.
2) What is possible with Proto editing?
A lot! Every unit in the game is defined in the Proto. That means that you can create a new unit or modify every existing unit! What you will achieve with this depends on how experienced you are. With this guide I will try to explain everything I know and that will make you atleast an intermediate Proto editor but first, what is possible with Proto editing? A lot and it would be impossible to write down everything that is possible, even I don't know everything! So instead I will tell you some things that are impossible with Proto editing:
- Everything is static in the Proto.
What I'm trying to say with this is that unit's can not change other units' data values. This has a few exceptions though, actions like Boost do modify other units stats but the only stats that can be modified are: speed, attack. The only action that can be modified is the RangedAttack just think of the docks in AoMTT they can only attack when something is garrisoned inside.
- The Proto can't effect other data types.
Unlike the Techtree, the Proto is unable to change anything outside the Proto. Things like Techs can't be modified by the Proto but the other way around is possible.
- There might be more eventually
- Everything is static in the Proto.
What I'm trying to say with this is that unit's can not change other units' data values. This has a few exceptions though, actions like Boost do modify other units stats but the only stats that can be modified are: speed, attack. The only action that can be modified is the RangedAttack just think of the docks in AoMTT they can only attack when something is garrisoned inside.
- The Proto can't effect other data types.
Unlike the Techtree, the Proto is unable to change anything outside the Proto. Things like Techs can't be modified by the Proto but the other way around is possible.
- There might be more eventually
3) When should I use the Proto?
If you want to create a new unit or modify an existing unit you will have to use the Proto. If you want to edit Technologies you will also have to use the Proto but you won't have to edit it in most cases.
If you're thinking like a noob Proto editor:
You can't think yet ;) only dream!
If you're thinking like an intermediate Proto editor:
What if I want to create a unit that becomes stronger every age up? Easy just combine the Proto and Techtree!
If you're thinking like an expert Proto editor:
What if I want to create a unit that changes the lightning of the map upon attacking? Throws bombs that cause the enemy to get stuck for a while? Archers and siege on walls? No problem! Just Combine the Proto and Techtree!
If you're thinking like a god Proto editor:
What if I want to create a unit that throws bombs that will knockup the units hit in an area? Raises the land upon command? Will be hard but with the combination of Triggers, Techtree and the Proto it will work!
Now if you understood everything so far (or almost everything) then I will start to explain what everything does in the Proto.
If you're thinking like a noob Proto editor:
You can't think yet ;) only dream!
If you're thinking like an intermediate Proto editor:
What if I want to create a unit that becomes stronger every age up? Easy just combine the Proto and Techtree!
If you're thinking like an expert Proto editor:
What if I want to create a unit that changes the lightning of the map upon attacking? Throws bombs that cause the enemy to get stuck for a while? Archers and siege on walls? No problem! Just Combine the Proto and Techtree!
If you're thinking like a god Proto editor:
What if I want to create a unit that throws bombs that will knockup the units hit in an area? Raises the land upon command? Will be hard but with the combination of Triggers, Techtree and the Proto it will work!
Now if you understood everything so far (or almost everything) then I will start to explain what everything does in the Proto.
4) Editing the Proto
Okay here we go, open the proto(x).xml in a text editor. The proto.xml is for AoM Vanilla and the protox.xml is for AoM Chocolate and AoM:EE. You're probably going to edit the protox.xml as the proto.xml is only read during the first campaign.
I'll guide you through the whole process but if you are sure that you've opened the right file then skip the green part.
//Imagine a Green Background here
The first line you should see is:
<?xml version="1.0" encoding="UTF-8"?>
If not, then you managed to open the wrong file.
Continuing to the next line, skip that one because it is a very useful blank line... The next line should be this for AoM:
<proto version="9">
Or this for AoMTT
<proto version="4">
If it is not proto but techtree or something else then you did not open the right file.
If your version is different then you opened the wrong version.
If everything matches then congratulations you can now start with editing the Proto!
//Stop Imagining a green part :P
Now I will explain how the Proto works.
This line:
<proto version="x">
Is the opening tag of the Proto. It has one value and that value says somethig about the version of the Proto. If you change it the game might ignore it so just leave it as it is.
To find the closing tag scroll down till you've hit the bottom of the file and there it should be. It should be this
</proto>
It does not have a value, neither does any closing tag in the Proto
The next tag should be:
<unit id="0" name="Hawk">
This is the opening tag of a unit, it has two values. The first one is the id of the unit. These ids must be unique otherwise the game will count the two units as one and in that way all units below that get mistargeted by the game. The second value is the name of the unit. This one should also be unique because otherwise the game will see two units with the same name and the targeting gets messed up.
If you scroll down a bit you will find the closing tag:
</unit>
Between the unit tags you will find a lot of other tags and since there are so many tags I will try to separate the unit into areas:
<unit id="Number" name="Name">
General Info Area
Train and Research Area
Contain Area
Action Area
</unit>
I'll guide you through the whole process but if you are sure that you've opened the right file then skip the green part.
//Imagine a Green Background here
The first line you should see is:
<?xml version="1.0" encoding="UTF-8"?>
If not, then you managed to open the wrong file.
Continuing to the next line, skip that one because it is a very useful blank line... The next line should be this for AoM:
<proto version="9">
Or this for AoMTT
<proto version="4">
If it is not proto but techtree or something else then you did not open the right file.
If your version is different then you opened the wrong version.
If everything matches then congratulations you can now start with editing the Proto!
//Stop Imagining a green part :P
Now I will explain how the Proto works.
This line:
<proto version="x">
Is the opening tag of the Proto. It has one value and that value says somethig about the version of the Proto. If you change it the game might ignore it so just leave it as it is.
To find the closing tag scroll down till you've hit the bottom of the file and there it should be. It should be this
</proto>
It does not have a value, neither does any closing tag in the Proto
The next tag should be:
<unit id="0" name="Hawk">
This is the opening tag of a unit, it has two values. The first one is the id of the unit. These ids must be unique otherwise the game will count the two units as one and in that way all units below that get mistargeted by the game. The second value is the name of the unit. This one should also be unique because otherwise the game will see two units with the same name and the targeting gets messed up.
If you scroll down a bit you will find the closing tag:
</unit>
Between the unit tags you will find a lot of other tags and since there are so many tags I will try to separate the unit into areas:
<unit id="Number" name="Name">
General Info Area
Train and Research Area
Contain Area
Action Area
</unit>
4.1) General Info Area
This is the biggest area and because of that I will divide this area into three smaller sections.
-The general stuff
-The variable values
-The constant values
-The general stuff
-The variable values
-The constant values
4.1.1) The General Stuff
The tags I will explain here are tags that every unit will have.
<dbid>Number</dbid>
The "dbid" not sure what the abbreviation means but it could be databaseid, anyways, every unit has a unique dbid and duplicates are not allowed because that could end up having weird effects which could be used for something but that's something for the god part of this guide.
Not modifiable by techs
<displaynameid>Number</displaynameid>
in this case <displaynameid>18794</displaynameid>
The "displaynameid" refers to line 18794 in the (xpack)language.dll and that line will be the name of the unit ingame ingame.
Modifiable by techs
<dbid>Number</dbid>
The "dbid" not sure what the abbreviation means but it could be databaseid, anyways, every unit has a unique dbid and duplicates are not allowed because that could end up having weird effects which could be used for something but that's something for the god part of this guide.
Not modifiable by techs
<displaynameid>Number</displaynameid>
in this case <displaynameid>18794</displaynameid>
The "displaynameid" refers to line 18794 in the (xpack)language.dll and that line will be the name of the unit ingame ingame.
Modifiable by techs
4.1.2.1) The Variable Values
Every unit has atleast one variable value.
<EditorNameID>Number</EditorNameID>
Same as the <displaynameid> but then it will be the name in the editor list.
#Not modifiable by techs
<footprint>Unit Name</footprint>
The footprints a unit leaves behind when walking. Units spawned as footprints are visual only as they do not influence the game in any way. For this we thank microsoft because this makes certain things impossible or just really hard to do.
#Not modifiable by techs
<CreationFadeTimeFootprint>Number</CreationFadeTimeFootprint>
How long the fade in of the footprints are.
#Not modifiable by techs
InitialResourceExcludedBy maybe separated
<icon>File Name</icon>
This defines which texture is displayed when you train the unit. It also is the small icon when you select a unit.
There are a few similar tags:
<cultureicon civ="Culture Name">File Name</cultureicon>
This defines the same things as the <icon> tag does but it looks at the player's Culture to define what icon is displayed. Note that microsoft wasn't really consistent as it says "civ=" and "civ" stands for Civilization. A Civilization in AoM is a god and not a Culture, which is Greek, Egyptian, Norse, Atlantean, so don't get confused by their naming of tags.
<portraiticon>File Name</portraiticon>
This defines which textures is displayed when you select a unit. It's the big icon in that case. A more advanced version is:
<portraiticon civ="Culture Name">File Name</portraiticon>
Defines the same thing but now checks the Culture of the player (again civ = culture in this case) so you can have 4 different icons for one unit that change depending on what culture the player is.
Icons are:
#Not modifiable by techs
<containedattack>0.0300</containedattack>
This defines the attack that is added when this unit garrisons into another unit.
#Not modifiable by techs
<MaxContained>Number</MaxContained>
The maximum number of units that can garrison inside.
#Never tried to modify this, it might be possible.
<ContainedSpeedBonus>Number</ContainedSpeedBonus>
How much speed the unit will add to the unit it garrisons inside.
#Not modifiable by techs
<ContainedAttack>Number</ContainedAttack>
How much Attack the unit will add to the unit it garrisons inside.
#Not modifiable by techs
<BirthReplacement>Unit Name</BirthReplacement>
This one is interesting and I use it quite often. It tells the game to spawn another unit on creation of this unit. Be careful tho do not create infinite loops like a hoplite with a hoplite birthreplacement. If you really want something like that do it with a connector (A unit in between) or use the Techtree.
#Not modifiable by techs
<DeadReplacement>Unit Name</DeadReplacement>
Similar to the <BirthReplacement> tag but instead of spawning a unit on creation this will tell the game to spawn a unit on the death of this unit.
#Not modifiable by techs
<AllowedCulture>Culture</AllowedCulture>
The tag name is what it does. Only the culture define will be able to built this unit. A somewhat special tag if you think about the structure of the data.
#Not modifiable by techs
<initialhitpoints>Number</initialhitpoints>
<maxhitpoints>Number</maxhitpoints>
Example:
<initialhitpoints>20.0000</initialhitpoints>
<maxhitpoints>20.0000</maxhitpoints>
These define the hitpoints of a unit. Initialhitpoints is the hp the unit will have upon creation and maxhitpoints is what it says, the max hitpoints a unit can have. If you set the initialhitpoints to 15 the unit will start with 15 of 20 hp.
<initialhitpoints>15.0000</initialhitpoints>
<maxhitpoints>20.0000</maxhitpoints>
#Modifiable by techs
<los>Number</los>
This defines the LoS (Line of Sight) of a unit. Not really special or something just know that if you set it to 0 the game will take that as a no LoS and techs won't be able to modify it.
#Modifiable by techs
<SocketProtoUnit>Unit Name</SocketProtoUnit>
This tells the game that it requires a Socket unit to be built on. An example of this is the settlement. Cool things can be done with this but I think some stuff here is buggy but I'm not sure what it was because it was too long ago.
#Not modifiable by techs
<ProjectileProtoUnit>Unit Name</ProjectileProtoUnit>
This defines the projectile the unit will firing when using a Rangedattack or ChargedRangedAttack
#Not modifiable by techs
<obstructionradiusx>Number</obstructionradiusx>
<obstructionradiusz>Number</obstructionradiusz>
The obstruction radius of a unit. I'm not 100% but if a unit is a building the obstruction is a square and if it is a unit it is round. You have to know that the y and z are swapped in AoM and the x is width and z is length.
#Not modifiable by techs
<ObstructionRadius>Number</ObstructionRadius>
Another obstruction rad
#Not modifiable by techs
<soundvariant>SoundType</soundvariant>
This determines which sound will be used if the units hits a target with a projectile.
#Not modifiable by techs
<ballisticsplashproto>Unit Name</ballisticsplashproto>
This defines the unit that is spawned upon impact on the ground. Most of the it's a small dust cloud. Again thanks microsoft for this visual only unit :S
#Not modifiable by techs
<ballisticbounceproto>Unit Name</ballisticbounceproto>
Same as the one above but then the unit will appear when the projectile bounces.
#Not modifiable by techs
<formationcategory>Protected, Body and some others</formationcategory>
This has to do something with the formations of Age of Mythology.
<maxvelocity>Number</maxvelocity>
This defines the speed of the unit. Same as with LoS if you set it to 0 the game will take that as no Speed and techs won't be able to modify it.
#Modifiable by techs
<movementtype>Land, Water, Air</movementtype>
This tells the game on what type of land a unit can move. The types are obvious. Land = only on land, Water = only on water and Air = Terrain is ignored. Note that there is no amphibious movementtype or terrain type and thus it has been impossible for anyone to make a full amphibious unit.
#Not modifiable by techs
<turnrate>Number</turnrate>
This defines the speed of the rotation of the unit. If it is too low and the speed too high units are able to walk off the map.
#Not modifiable by techs
<TurnRadius>Number</TurnRadius>
This defines the radius of the rotation of the unit. Another way to make sure you unit walks off the map.
#Not modifiable by techs
<UnitAIType>AI Type</UnitAIType>
Defines the AI the unit will be using. If you do not use it then it will default to Passive. You can define your own AI types in the unitaitypes.txt
#Not modifiable by techs
<ProjectileSpinPeriod>Number</ProjectileSpinPeriod>
This defines how long the projectile needs to make a single rotation.
#Not modifiable by techs
<ResourceSubType>Number?<ResourceSubType>
I'm not sure, never used it, never saw it being used and I'm not sure if it works but if it does it might define the second resource type a unit is carrying.
#Dunno if it is possible to modify this with techs.
<AutoAttackRange>Number</AutoAttackRange>
Normally the auto attack range is defined by the LoS of the unit. If you add this tag to the unit, this will define it.
#Not modifiable by techs
<ResourceDecay>Number</ResourceDecay>
This tag tells the game how much of the resources are lost per second when for example a deer is killed.
#Not modifiable by techs
<buttonpos row="x" page="x" column="x"></buttonpos>
Should not have an effect anymore, maybe it did in the beta.
#Not modifiable by techs
<MinimapSize>Number</MinimapSize>
The size of the unit on the minimap.
#Not modifiable by techs
<MinimapShape>A shape<MinimapShape>
The shape of the unit on the minimap. Dunno what shapes are allowed
#Not modifiable by techs
<BoredTimeout>Number</BoredTimeout>
Never used it
#Not modifiable by techs
<IdleTimeout>Number</IdleTimeout>
Same as above
#Not modifiable by techs
<EditorNameID>Number</EditorNameID>
Same as the <displaynameid> but then it will be the name in the editor list.
#Not modifiable by techs
<footprint>Unit Name</footprint>
The footprints a unit leaves behind when walking. Units spawned as footprints are visual only as they do not influence the game in any way. For this we thank microsoft because this makes certain things impossible or just really hard to do.
#Not modifiable by techs
<CreationFadeTimeFootprint>Number</CreationFadeTimeFootprint>
How long the fade in of the footprints are.
#Not modifiable by techs
InitialResourceExcludedBy maybe separated
<icon>File Name</icon>
This defines which texture is displayed when you train the unit. It also is the small icon when you select a unit.
There are a few similar tags:
<cultureicon civ="Culture Name">File Name</cultureicon>
This defines the same things as the <icon> tag does but it looks at the player's Culture to define what icon is displayed. Note that microsoft wasn't really consistent as it says "civ=" and "civ" stands for Civilization. A Civilization in AoM is a god and not a Culture, which is Greek, Egyptian, Norse, Atlantean, so don't get confused by their naming of tags.
<portraiticon>File Name</portraiticon>
This defines which textures is displayed when you select a unit. It's the big icon in that case. A more advanced version is:
<portraiticon civ="Culture Name">File Name</portraiticon>
Defines the same thing but now checks the Culture of the player (again civ = culture in this case) so you can have 4 different icons for one unit that change depending on what culture the player is.
Icons are:
#Not modifiable by techs
<containedattack>0.0300</containedattack>
This defines the attack that is added when this unit garrisons into another unit.
#Not modifiable by techs
<MaxContained>Number</MaxContained>
The maximum number of units that can garrison inside.
#Never tried to modify this, it might be possible.
<ContainedSpeedBonus>Number</ContainedSpeedBonus>
How much speed the unit will add to the unit it garrisons inside.
#Not modifiable by techs
<ContainedAttack>Number</ContainedAttack>
How much Attack the unit will add to the unit it garrisons inside.
#Not modifiable by techs
<BirthReplacement>Unit Name</BirthReplacement>
This one is interesting and I use it quite often. It tells the game to spawn another unit on creation of this unit. Be careful tho do not create infinite loops like a hoplite with a hoplite birthreplacement. If you really want something like that do it with a connector (A unit in between) or use the Techtree.
#Not modifiable by techs
<DeadReplacement>Unit Name</DeadReplacement>
Similar to the <BirthReplacement> tag but instead of spawning a unit on creation this will tell the game to spawn a unit on the death of this unit.
#Not modifiable by techs
<AllowedCulture>Culture</AllowedCulture>
The tag name is what it does. Only the culture define will be able to built this unit. A somewhat special tag if you think about the structure of the data.
#Not modifiable by techs
<initialhitpoints>Number</initialhitpoints>
<maxhitpoints>Number</maxhitpoints>
Example:
<initialhitpoints>20.0000</initialhitpoints>
<maxhitpoints>20.0000</maxhitpoints>
These define the hitpoints of a unit. Initialhitpoints is the hp the unit will have upon creation and maxhitpoints is what it says, the max hitpoints a unit can have. If you set the initialhitpoints to 15 the unit will start with 15 of 20 hp.
<initialhitpoints>15.0000</initialhitpoints>
<maxhitpoints>20.0000</maxhitpoints>
#Modifiable by techs
<los>Number</los>
This defines the LoS (Line of Sight) of a unit. Not really special or something just know that if you set it to 0 the game will take that as a no LoS and techs won't be able to modify it.
#Modifiable by techs
<SocketProtoUnit>Unit Name</SocketProtoUnit>
This tells the game that it requires a Socket unit to be built on. An example of this is the settlement. Cool things can be done with this but I think some stuff here is buggy but I'm not sure what it was because it was too long ago.
#Not modifiable by techs
<ProjectileProtoUnit>Unit Name</ProjectileProtoUnit>
This defines the projectile the unit will firing when using a Rangedattack or ChargedRangedAttack
#Not modifiable by techs
<obstructionradiusx>Number</obstructionradiusx>
<obstructionradiusz>Number</obstructionradiusz>
The obstruction radius of a unit. I'm not 100% but if a unit is a building the obstruction is a square and if it is a unit it is round. You have to know that the y and z are swapped in AoM and the x is width and z is length.
#Not modifiable by techs
<ObstructionRadius>Number</ObstructionRadius>
Another obstruction rad
#Not modifiable by techs
<soundvariant>SoundType</soundvariant>
This determines which sound will be used if the units hits a target with a projectile.
#Not modifiable by techs
<ballisticsplashproto>Unit Name</ballisticsplashproto>
This defines the unit that is spawned upon impact on the ground. Most of the it's a small dust cloud. Again thanks microsoft for this visual only unit :S
#Not modifiable by techs
<ballisticbounceproto>Unit Name</ballisticbounceproto>
Same as the one above but then the unit will appear when the projectile bounces.
#Not modifiable by techs
<formationcategory>Protected, Body and some others</formationcategory>
This has to do something with the formations of Age of Mythology.
<maxvelocity>Number</maxvelocity>
This defines the speed of the unit. Same as with LoS if you set it to 0 the game will take that as no Speed and techs won't be able to modify it.
#Modifiable by techs
<movementtype>Land, Water, Air</movementtype>
This tells the game on what type of land a unit can move. The types are obvious. Land = only on land, Water = only on water and Air = Terrain is ignored. Note that there is no amphibious movementtype or terrain type and thus it has been impossible for anyone to make a full amphibious unit.
#Not modifiable by techs
<turnrate>Number</turnrate>
This defines the speed of the rotation of the unit. If it is too low and the speed too high units are able to walk off the map.
#Not modifiable by techs
<TurnRadius>Number</TurnRadius>
This defines the radius of the rotation of the unit. Another way to make sure you unit walks off the map.
#Not modifiable by techs
<UnitAIType>AI Type</UnitAIType>
Defines the AI the unit will be using. If you do not use it then it will default to Passive. You can define your own AI types in the unitaitypes.txt
#Not modifiable by techs
<ProjectileSpinPeriod>Number</ProjectileSpinPeriod>
This defines how long the projectile needs to make a single rotation.
#Not modifiable by techs
<ResourceSubType>Number?<ResourceSubType>
I'm not sure, never used it, never saw it being used and I'm not sure if it works but if it does it might define the second resource type a unit is carrying.
#Dunno if it is possible to modify this with techs.
<AutoAttackRange>Number</AutoAttackRange>
Normally the auto attack range is defined by the LoS of the unit. If you add this tag to the unit, this will define it.
#Not modifiable by techs
<ResourceDecay>Number</ResourceDecay>
This tag tells the game how much of the resources are lost per second when for example a deer is killed.
#Not modifiable by techs
<buttonpos row="x" page="x" column="x"></buttonpos>
Should not have an effect anymore, maybe it did in the beta.
#Not modifiable by techs
<MinimapSize>Number</MinimapSize>
The size of the unit on the minimap.
#Not modifiable by techs
<MinimapShape>A shape<MinimapShape>
The shape of the unit on the minimap. Dunno what shapes are allowed
#Not modifiable by techs
<BoredTimeout>Number</BoredTimeout>
Never used it
#Not modifiable by techs
<IdleTimeout>Number</IdleTimeout>
Same as above
#Not modifiable by techs
4.1.2.2) More Variable Values
<WanderDistance>Number</WanderDistance>
This tells the game how far a unit can wander. When a unit Wanders it moves around like a wild animals do.
<AllowedHeightVariance>Number</AllowedHeightVariance>
This tells the game to check how rough the ground is before you can place a building.
#Not modifiable by techs
<initialunitaistance>Aggressive, Defensive, Passive</initialunitaistance>
This defines the unit's initial AI stance.
#Never tried to modify it
<lifespan>Number</lifespan>
This tag defines the lifespan of a unit. There is one problem with transforming units that have a lifespan. If you transform a unit that has a lifespan it will be transferred to the transformed unit in other words, there is no escaping from this tag.
#Modifiable by techs
<buildingworkrate>Number</buildingworkrate>
The rate at which trainpoints, researchpoints are points? dunno how to say it really haha, just know that the way to calculate the times is points/buildingworkrate
<trainpoints>Number</trainpoints>
This tag defines the trainpoints of a unit. Most of the time Trainpoints are 1 per sec but this depends on the buildingworkrate tag.
<cost resourcetype="Food, Wood, Gold and Favor">Number</cost>
This defines the cost of a unit. First value is the resourse type and the second is the amount.
#Modifiable by techs
<RolloverUpgradeAtID>String number</RolloverUpgradeAtID>
Info about where you can upgrade the unit. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverCounterWithID>String number</RolloverCounterWithID>
Info about the counters of the unit. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverUseAgainstID>String number</RolloverUseAgainstID>
Info about what the unit counters. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverBonusDamageID>String number</RolloverBonusDamageID>
Info about the bonus damage the unit has against certain units. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverAbilitiesID>String number</RolloverAbilitiesID>
Info about the abilities of the unit. Never used I think.
#Not modifiable by techs
<RolloverTextID>String number</RolloverTextID>
Info that shows when you hover over an icon of a unit.
#Not modifiable by techs
<decay delay="Number" duration="Number"></decay>
The first value tells the game how long a unit will be above the ground when death and the second then how long it takes to disappear.
#Not modifiable by techs
<CorpseDecayDelay>Number</CorpseDecayDelay>
Probably a second tag that allows you to change the decay delay
#Not modifiable by techs
<CorpseDecalTime>Number</CorpseDecalTime>
How long the Decal animation takes. Or in other words, how long it will take before the corps disappears below the ground surface
#Not modifiable by techs
<PartisanCount>Number</PartisanCount>
This tag is a poseidon only tag and tells the game how many Partisans will be spawned upon the death of the unit. In AoM(TT) Partisans are militia. Don't ask me why ensemble did not just add a culture option and replacement count to the death replacement...
#Not modifiable by techs
<PartisanType>Unit Name</PartisanType>
Almost the same as the <deathreplacement> tag beside the fact that it is hardcoded and thus only available for Poseidon! Thanks ES...
#Not modifiable by techs
<bountyfactor resourcetype="Favor or Gold">Number</bountyfactor>
Not 100% about this one never modified it.
This tag has two values. One defines the resourcetype and the other how much is granted. The tag itself tells the game to grant it on unit kill when playing Norse
#Modifiable by techs
<bountyfactor resourcetype="Favor">1.0000</bountyfactor>
This tells the game to grant a Norse unit Favor generation while it is fighting.
#Modifiable by techs
<minimapcolor red="Number" blue="Number" green="Number"></minimapcolor>
This tag defines the colour the unit will have on the minimap. Quite useful for gaia units but otherwise it wouldn't really work out. Note that it is not 0-255 but 0-1
#Not modifiable by techs
<heightbob period="Number" magnitude="Number"></heightbob>
Probably only for flying units. This tag defines the up and down movement of certain flying units. The first value is the period of the movement and the second is the height difference.
#Not modifiable by techs
That were all the variable values :D
This tells the game how far a unit can wander. When a unit Wanders it moves around like a wild animals do.
<AllowedHeightVariance>Number</AllowedHeightVariance>
This tells the game to check how rough the ground is before you can place a building.
#Not modifiable by techs
<initialunitaistance>Aggressive, Defensive, Passive</initialunitaistance>
This defines the unit's initial AI stance.
#Never tried to modify it
<lifespan>Number</lifespan>
This tag defines the lifespan of a unit. There is one problem with transforming units that have a lifespan. If you transform a unit that has a lifespan it will be transferred to the transformed unit in other words, there is no escaping from this tag.
#Modifiable by techs
<buildingworkrate>Number</buildingworkrate>
The rate at which trainpoints, researchpoints are points? dunno how to say it really haha, just know that the way to calculate the times is points/buildingworkrate
<trainpoints>Number</trainpoints>
This tag defines the trainpoints of a unit. Most of the time Trainpoints are 1 per sec but this depends on the buildingworkrate tag.
<cost resourcetype="Food, Wood, Gold and Favor">Number</cost>
This defines the cost of a unit. First value is the resourse type and the second is the amount.
#Modifiable by techs
<RolloverUpgradeAtID>String number</RolloverUpgradeAtID>
Info about where you can upgrade the unit. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverCounterWithID>String number</RolloverCounterWithID>
Info about the counters of the unit. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverUseAgainstID>String number</RolloverUseAgainstID>
Info about what the unit counters. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverBonusDamageID>String number</RolloverBonusDamageID>
Info about the bonus damage the unit has against certain units. This is shown when you rightclick the portrait of the unit.
#Not modifiable by techs
<RolloverAbilitiesID>String number</RolloverAbilitiesID>
Info about the abilities of the unit. Never used I think.
#Not modifiable by techs
<RolloverTextID>String number</RolloverTextID>
Info that shows when you hover over an icon of a unit.
#Not modifiable by techs
<decay delay="Number" duration="Number"></decay>
The first value tells the game how long a unit will be above the ground when death and the second then how long it takes to disappear.
#Not modifiable by techs
<CorpseDecayDelay>Number</CorpseDecayDelay>
Probably a second tag that allows you to change the decay delay
#Not modifiable by techs
<CorpseDecalTime>Number</CorpseDecalTime>
How long the Decal animation takes. Or in other words, how long it will take before the corps disappears below the ground surface
#Not modifiable by techs
<PartisanCount>Number</PartisanCount>
This tag is a poseidon only tag and tells the game how many Partisans will be spawned upon the death of the unit. In AoM(TT) Partisans are militia. Don't ask me why ensemble did not just add a culture option and replacement count to the death replacement...
#Not modifiable by techs
<PartisanType>Unit Name</PartisanType>
Almost the same as the <deathreplacement> tag beside the fact that it is hardcoded and thus only available for Poseidon! Thanks ES...
#Not modifiable by techs
<bountyfactor resourcetype="Favor or Gold">Number</bountyfactor>
Not 100% about this one never modified it.
This tag has two values. One defines the resourcetype and the other how much is granted. The tag itself tells the game to grant it on unit kill when playing Norse
#Modifiable by techs
<bountyfactor resourcetype="Favor">1.0000</bountyfactor>
This tells the game to grant a Norse unit Favor generation while it is fighting.
#Modifiable by techs
<minimapcolor red="Number" blue="Number" green="Number"></minimapcolor>
This tag defines the colour the unit will have on the minimap. Quite useful for gaia units but otherwise it wouldn't really work out. Note that it is not 0-255 but 0-1
#Not modifiable by techs
<heightbob period="Number" magnitude="Number"></heightbob>
Probably only for flying units. This tag defines the up and down movement of certain flying units. The first value is the period of the movement and the second is the height difference.
#Not modifiable by techs
That were all the variable values :D
4.1.3) The Constant Values
There are a lot of constant values in the Proto and that's why I'm going to divide this area division into two smaller subdivisions.
-UnitTypes
-Flags
-UnitTypes
-Flags
4.1.3.1) Constant Type: UnitTypes
LogicalTypeGates
LogicalTypeHouses
LogicalTypeAbstractVillNotHero
LogicalTypeShipNotFishinghip
LogicalTypeMythUnitNotTitan
LogicalTypeEscapesFrostOnTransform
LogicalTypeNoFlailOnThrow
LogicalTypeBuildingsNotWalls
LogicalTypeBuildingNotTitanGate
LogicalTypeEasySelectAvoid
LogicalTypeInvulnerableToGaia
LogicalTypeTimeshift
LogicalTypeScreamsOnSpiderPull
LogicalTypeMummyMinionTarget
LogicalTypePerseusCanStone
LogicalTypeAffectedByFrostGiant
LogicalTypeCanBeStoned
LogicalTypeImplodeAttack
LogicalTypeValidSpiderTarget
LogicalTypeAffectedByHeroize
LogicalTypeDoesNotCreateLush
LogicalTypeAffectedByVortex
LogicalTypeTartarianGateValidOverlapPlacement
LogicalTypeCanBeThrown
LogicalTypeValidReverseWonderTarget
LogicalTypeAffectedByChaos
LogicalTypeValidTremorAttack
LogicalTypeValidDeconstructionTarget
LogicalTypeVolcanoAttack
LogicalTypeSuperPredatorsAutoAttack
LogicalTypeSuperPredatorsAttack
LogicalTypeValidTraitorsTarget
LogicalTypeOdinRegenerates
LogicalTypeMilitaryUnitsAndBuildings
LogicalTypeGreekHeroes
LogicalTypeValidFlamingWeaponsTarget
LogicalTypeAffectedByTownBell
LogicalTypeValidSPCUnitsDeadCondition
LogicalTypeLandMilitary WalkingWood
LogicalTypeAutoattackTargetsBuildings
LogicalTypeValidForestFireTarget
LogicalTypeFimbulWinterTCEvalType
LogicalTypeVillagersRespondToAttack
LogicalTypeRamAttack
LogicalTypeBuildingsThatTrainMilitary
LogicalTypeParticipatesInBattlecries
LogicalTypeValidShiftingSandsTarget
LogicalTypeValidLocustSwarmTarget
LogicalTypeConvertsHerds
LogicalTypeFavoriteMythUnit
LogicalTypeFavoriteUnit
LogicalTypeSeaSerpentAttack
LogicalTypeValidMeteorTarget
LogicalTypeValidFrostTarget
LogicalTypeNavalMilitary
LogicalTypeValidSpyTarget
LogicalTypeMinimapFilterMilitary
LogicalTypeMinimapFilterEconomic
LogicalTypeCanBeHealed
LogicalTypeSiegeAutoAttack
LogicalTypeEarthquakeAttack
LogicalTypeVillagersAttack
LogicalTypeNonGreekUnit
LogicalTypeCavalryAndScout
LogicalTypeGarrisonOnBoats
LogicalTypeAffectedByRestoration
LogicalTypeAffectedByHealingSpring
LogicalTypeValidBoltTarget
LogicalTypeIdleHero
LogicalTypeNeededForVictory
LogicalTypeTornadoAttack
LogicalTypeIdleMilitary
LogicalTypeIdleCivilian
LogicalTypeDangerousAnimals
LogicalTypeUnitsNotBuildings
LogicalTypeRangedUnitsAutoAttack
LogicalTypeRangedUnitsAttack
LogicalTypeBuildingsNotHouses
LogicalTypeScoutsRespondToAttack
LogicalTypePredatorsAttack
LogicalTypeHandUnitsAutoAttack
LogicalTypeMeanPredatorsAutoAttack
LogicalTypePredatorsAutoAttack
LogicalTypeHandUnitsAttack
TransportShip
Teleporter
SetAnimal
AutoupgradedUnit
AbstractScout
AbstractCart
SiegeShip
HammerShip
ArcherShip
AbstractArmory
UtilityShip
MythUnitSiege
MythUnitArcher
MythUnitCavalry
MythUnitInfantry
AbstractPharaoh
AnimalPredator
AnimalReactive
AnimalPrey
ConvertableBuilding
EarlyGoldDropsite
EarlyFoodDropsite
EarlyWoodDropsite
AbstractArcheryRange
AbstractBarracks
AbstractFortress
AbstractStable
SharedBuilding
Pierce
Crush
Hack
SettlementsThatTrainVillagers
AbstractMonumentHuntable
HumanSoldier
GoldDropsite
WoodDropsite
FoodDropsite
Age1Building
WildCrops
Wood
Gold
Food
Favor
Age1Temple
Age3Building
Age2Building
LokiHero
AbstractTradeUnit
AbstractTitan
MythUnit
GodPower
BuildingsThatShoot
Herdable
AbstractWall
Unit class
All
E3Class
TestClass
EmbellishmentClass
NatureClass
BuildingClass
UnitClass
LogicalTypeHouses
LogicalTypeAbstractVillNotHero
LogicalTypeShipNotFishinghip
LogicalTypeMythUnitNotTitan
LogicalTypeEscapesFrostOnTransform
LogicalTypeNoFlailOnThrow
LogicalTypeBuildingsNotWalls
LogicalTypeBuildingNotTitanGate
LogicalTypeEasySelectAvoid
LogicalTypeInvulnerableToGaia
LogicalTypeTimeshift
LogicalTypeScreamsOnSpiderPull
LogicalTypeMummyMinionTarget
LogicalTypePerseusCanStone
LogicalTypeAffectedByFrostGiant
LogicalTypeCanBeStoned
LogicalTypeImplodeAttack
LogicalTypeValidSpiderTarget
LogicalTypeAffectedByHeroize
LogicalTypeDoesNotCreateLush
LogicalTypeAffectedByVortex
LogicalTypeTartarianGateValidOverlapPlacement
LogicalTypeCanBeThrown
LogicalTypeValidReverseWonderTarget
LogicalTypeAffectedByChaos
LogicalTypeValidTremorAttack
LogicalTypeValidDeconstructionTarget
LogicalTypeVolcanoAttack
LogicalTypeSuperPredatorsAutoAttack
LogicalTypeSuperPredatorsAttack
LogicalTypeValidTraitorsTarget
LogicalTypeOdinRegenerates
LogicalTypeMilitaryUnitsAndBuildings
LogicalTypeGreekHeroes
LogicalTypeValidFlamingWeaponsTarget
LogicalTypeAffectedByTownBell
LogicalTypeValidSPCUnitsDeadCondition
LogicalTypeLandMilitary WalkingWood
LogicalTypeAutoattackTargetsBuildings
LogicalTypeValidForestFireTarget
LogicalTypeFimbulWinterTCEvalType
LogicalTypeVillagersRespondToAttack
LogicalTypeRamAttack
LogicalTypeBuildingsThatTrainMilitary
LogicalTypeParticipatesInBattlecries
LogicalTypeValidShiftingSandsTarget
LogicalTypeValidLocustSwarmTarget
LogicalTypeConvertsHerds
LogicalTypeFavoriteMythUnit
LogicalTypeFavoriteUnit
LogicalTypeSeaSerpentAttack
LogicalTypeValidMeteorTarget
LogicalTypeValidFrostTarget
LogicalTypeNavalMilitary
LogicalTypeValidSpyTarget
LogicalTypeMinimapFilterMilitary
LogicalTypeMinimapFilterEconomic
LogicalTypeCanBeHealed
LogicalTypeSiegeAutoAttack
LogicalTypeEarthquakeAttack
LogicalTypeVillagersAttack
LogicalTypeNonGreekUnit
LogicalTypeCavalryAndScout
LogicalTypeGarrisonOnBoats
LogicalTypeAffectedByRestoration
LogicalTypeAffectedByHealingSpring
LogicalTypeValidBoltTarget
LogicalTypeIdleHero
LogicalTypeNeededForVictory
LogicalTypeTornadoAttack
LogicalTypeIdleMilitary
LogicalTypeIdleCivilian
LogicalTypeDangerousAnimals
LogicalTypeUnitsNotBuildings
LogicalTypeRangedUnitsAutoAttack
LogicalTypeRangedUnitsAttack
LogicalTypeBuildingsNotHouses
LogicalTypeScoutsRespondToAttack
LogicalTypePredatorsAttack
LogicalTypeHandUnitsAutoAttack
LogicalTypeMeanPredatorsAutoAttack
LogicalTypePredatorsAutoAttack
LogicalTypeHandUnitsAttack
TransportShip
Teleporter
SetAnimal
AutoupgradedUnit
AbstractScout
AbstractCart
SiegeShip
HammerShip
ArcherShip
AbstractArmory
UtilityShip
MythUnitSiege
MythUnitArcher
MythUnitCavalry
MythUnitInfantry
AbstractPharaoh
AnimalPredator
AnimalReactive
AnimalPrey
ConvertableBuilding
EarlyGoldDropsite
EarlyFoodDropsite
EarlyWoodDropsite
AbstractArcheryRange
AbstractBarracks
AbstractFortress
AbstractStable
SharedBuilding
Pierce
Crush
Hack
SettlementsThatTrainVillagers
AbstractMonumentHuntable
HumanSoldier
GoldDropsite
WoodDropsite
FoodDropsite
Age1Building
WildCrops
Wood
Gold
Food
Favor
Age1Temple
Age3Building
Age2Building
LokiHero
AbstractTradeUnit
AbstractTitan
MythUnit
GodPower
BuildingsThatShoot
Herdable
AbstractWall
Unit class
All
E3Class
TestClass
EmbellishmentClass
NatureClass
BuildingClass
UnitClass
4.1.3.2) Constant Type: Flags
RotateReplacement
UseTitanGateMinimap
Forces the game to use the titan gate minimap icon.
ForceBattleMusic
Forces the game to play the battle music when the unit gets attacked.
PlaySoundOnConversion
Forces the game to play the creation sound of the unit on conversion instead of the normal conversion sound. Plenty vault is an example of this.
SummonWorkersButton
Adds a button that allows you to call all your villagers to start working on the building.
ArmoredFoundation
Normally foundations do not have armor but this flag will force the game to apply the armor of the building to the foundation.
HasDummyTargetPoints
UseAlternateGarrisonFlag
This tag tells the game to use the garrison flag of the sky passage what looks like a beam of light.
ShakesCameraOnMoveAndAttack
Used by the titans
DoNotAutoAttack
Does exactly what it is called.
KillsTargetAfterPickupAction
Does exactly what it is called.
DamageToBuildPercent
Used by the titan gate. If it gets damaged the build process gets set back too.
ShowCounterForBuildProgress
Also used by the titan gate. Shows the percentage of completion of a unit.
DestroyWhenCompleted
Another thing used by the titan gate. Destroys the unit on completion. Apparently this does not trigger the AnnounceDestruction flag. I think ES has a few different ways to destroy a unit. Kill ,destroy and destroyed. Kill = removing a unit without leaving anything behind. Death counters can't count this kill. Destroy = destroying a unit without destructing it. Destroyed = when a unit gets slaughtered it is destroyed. ES logics :D
DiesAfterDoingPickupAction
Gets killed after pickup. Sometimes Dies = kill. Again ES logics.
GatherDirectToPlayer
Does what ES called it. A unit with this tag gathers the resources to the player instead of having to drop it off at a dropsite.
GodPowerExclusionHesperides
Gives the unit the Hesperides Tree god power block. This is similar to the Isis monument god power block.
HideOnGodPickerScreens
Hides the unit on the GodPicker screen.
SuperDeathReplacement
When combined with a <deathreplacement> tag it will make two units spawn instead of 1.
SharedGarrison
Used by the sky passages and allows the units to enter one unit and ungarrison at another.
PreventsWallBuilding
Does what ES called it.
HideCostFromDetailHelp
Not sure where it hides the cost of the unit but it does it somewhere :D
HeroName2
Norse hero names
HeroName1
Egyptian pharaoh names.
AdjustPositionOnTerrain
CollisionForce
Sounds awesome but does not seem to do anything :S
Rotateable
BattleMusicTrigger
Triggers the battle music when attacked.
AnnounceDestruction
Does what ES called it.
FadeOutDecalOnDeath
Does what ES called it.
ExperienceUnit
This one is awesome and is used by the hydra and defines when the hydra grows another head. Normally 3 units are required but I think this can be modified (I saw the code somewhere). Every 3 units the attack of the unit gets dealt one time more.
VariationLocked
TrainOnceHealableDeath
Automatons use this to have a healable death.
RMCanRotate
VisibleUnderFogOnlyAfterSeen
Does what ES called it.
DontMarkExtraFog
DontSortAlphaPolys
RenderAfterWater
Does what ES called it. Skybox seems to love this and added it to certain things causing some of those things to become nearly invisible at the water.
UseAlignedObstructionOnMinimap
UseObstructionOnMinimap
InvalidTownBellLocation
MutateDopples
Could a dev tell us what Dopple means in AoM? Several lines of code contain Dopple and no one knows what it does...
BurnablePaintTextureWhenPlacing
VictoryBuilding
Wonder countdown trigger
AnnounceFoundationStarted
Does what ES called it.
FlareOnFullyBuilt
Does what ES called it.
HideHitpointsIfGaia
Does what ES called it.
NeverShowButton
CorpseDecays
Does what ES called it.
InvulnerableIfGaia
Does what ES called it.
SingleGatherer
Allows one gatherer. Farms and fish are an example of resources that have this effect.
DeadReplaceOnlyOnTimeout
Spawns the death
Invulnerable
Does what ES called it.
GodPowerExclusion
God power block area effect.
NotScalable
Does what ES called it.
DestroyUnderBuilding
NotRotateable
HideResourceInventory
Does what ES called it.
HideFromHelp
NavalUnit
VisibleOwnerOnly
Does what ES called it. Spy god power uses this.
Tracked
Forces the game to track this unit so it can be targetted by certain effects.
ApplyHandicapTraining
DamageToUpgrade
ColorTransformNonGaia
RevealFoundation
Makes the foundation visible for everyone when the construction of it has started. This does not give LOS.
MeteredGarrison
TownBellButton
Adds a town bell button to the unit.
OverrideInitialGarrison
AllowAutoGarrison
DecalStickToWaterSurface
ResourceLimitedAttack
ChargedAttacks
DontDestroyAfterUsed
ForceBuildingData
Only works when you add this to a non-building unit. Enables the unit to train and research units.
DirectProjectile
RevertToSocketAtZeroHitpoints
Does what ES called it. Used by the settlement level 1 (AKA Town center)
UpgradeSocket
Used by the settlement unit so it can be upgraded as a socket.
DoppleOnlyWhenDead
Dopple mystery
HideGarrisonFlag
Does what ES called it.
SolidFoundation
ExcludeFromPlaytest
MakeUnbuiltAtZeroHitpoints
Does what ES called it.
ConvertToGaiaAtZeroHitpoints
Does what ES called it.
PlaceAsFoundation
Editor only I think, forces to place the unit as it's foundation(unbuilt).
ConvertOnStartBuild
Does what ES called it.
SelectWithObstruction
Does what ES called it.
AnnounceConversion
Does what ES called it.
RequiresMaintenance
Dunno what this does, might be obsolete.
DeadReplacementDuringDeathAction
Does what ES called it.
StartOnNoUpdate
This will force the unit to start when there is no update. Not exactly sure but most of the time (if not every) it forces the unit to be active immediately.
StartOnAnimationUpdate
This will force the unit to start on an animation update. If the unit has a birth animation it will start after the animation.
PrayableTo
Does what ES called it.
PlaceSocketWhenPlacing
Editor only but it might not be limited to. Forces the game to place the socketunit underneath the unit when placing it in the editor. Never tested it but it might also work outside the editor.
PlayerOwnsObstruction
Awesome effect used by gates. Allows the allies to walk through the unit and denies enemies to do that. (Water elemtal unit hint hint)
ProjectileTerrainOnly
PlaceAnywhere
Forces the game to skip the placement check when placing a unit.
DestroySocket
Destroys the socket when it is used.
NoProjectileDamage
FieldAbilityLimited
FireDamage
NoIdleActions
AreaDamageConstant
AlwaysCheckCollisions
KillOnAnimLoop
NotCommandable
ShowGarrisonButton
WallBuild
InitialGarrisonOnly
ConstrainOrientation
AlwaysFullColorAsCursor
OrientUnitWithGround
UseTitanGateMinimap
Forces the game to use the titan gate minimap icon.
ForceBattleMusic
Forces the game to play the battle music when the unit gets attacked.
PlaySoundOnConversion
Forces the game to play the creation sound of the unit on conversion instead of the normal conversion sound. Plenty vault is an example of this.
SummonWorkersButton
Adds a button that allows you to call all your villagers to start working on the building.
ArmoredFoundation
Normally foundations do not have armor but this flag will force the game to apply the armor of the building to the foundation.
HasDummyTargetPoints
UseAlternateGarrisonFlag
This tag tells the game to use the garrison flag of the sky passage what looks like a beam of light.
ShakesCameraOnMoveAndAttack
Used by the titans
DoNotAutoAttack
Does exactly what it is called.
KillsTargetAfterPickupAction
Does exactly what it is called.
DamageToBuildPercent
Used by the titan gate. If it gets damaged the build process gets set back too.
ShowCounterForBuildProgress
Also used by the titan gate. Shows the percentage of completion of a unit.
DestroyWhenCompleted
Another thing used by the titan gate. Destroys the unit on completion. Apparently this does not trigger the AnnounceDestruction flag. I think ES has a few different ways to destroy a unit. Kill ,destroy and destroyed. Kill = removing a unit without leaving anything behind. Death counters can't count this kill. Destroy = destroying a unit without destructing it. Destroyed = when a unit gets slaughtered it is destroyed. ES logics :D
DiesAfterDoingPickupAction
Gets killed after pickup. Sometimes Dies = kill. Again ES logics.
GatherDirectToPlayer
Does what ES called it. A unit with this tag gathers the resources to the player instead of having to drop it off at a dropsite.
GodPowerExclusionHesperides
Gives the unit the Hesperides Tree god power block. This is similar to the Isis monument god power block.
HideOnGodPickerScreens
Hides the unit on the GodPicker screen.
SuperDeathReplacement
When combined with a <deathreplacement> tag it will make two units spawn instead of 1.
SharedGarrison
Used by the sky passages and allows the units to enter one unit and ungarrison at another.
PreventsWallBuilding
Does what ES called it.
HideCostFromDetailHelp
Not sure where it hides the cost of the unit but it does it somewhere :D
HeroName2
Norse hero names
HeroName1
Egyptian pharaoh names.
AdjustPositionOnTerrain
CollisionForce
Sounds awesome but does not seem to do anything :S
Rotateable
BattleMusicTrigger
Triggers the battle music when attacked.
AnnounceDestruction
Does what ES called it.
FadeOutDecalOnDeath
Does what ES called it.
ExperienceUnit
This one is awesome and is used by the hydra and defines when the hydra grows another head. Normally 3 units are required but I think this can be modified (I saw the code somewhere). Every 3 units the attack of the unit gets dealt one time more.
VariationLocked
TrainOnceHealableDeath
Automatons use this to have a healable death.
RMCanRotate
VisibleUnderFogOnlyAfterSeen
Does what ES called it.
DontMarkExtraFog
DontSortAlphaPolys
RenderAfterWater
Does what ES called it. Skybox seems to love this and added it to certain things causing some of those things to become nearly invisible at the water.
UseAlignedObstructionOnMinimap
UseObstructionOnMinimap
InvalidTownBellLocation
MutateDopples
Could a dev tell us what Dopple means in AoM? Several lines of code contain Dopple and no one knows what it does...
BurnablePaintTextureWhenPlacing
VictoryBuilding
Wonder countdown trigger
AnnounceFoundationStarted
Does what ES called it.
FlareOnFullyBuilt
Does what ES called it.
HideHitpointsIfGaia
Does what ES called it.
NeverShowButton
CorpseDecays
Does what ES called it.
InvulnerableIfGaia
Does what ES called it.
SingleGatherer
Allows one gatherer. Farms and fish are an example of resources that have this effect.
DeadReplaceOnlyOnTimeout
Spawns the death
Invulnerable
Does what ES called it.
GodPowerExclusion
God power block area effect.
NotScalable
Does what ES called it.
DestroyUnderBuilding
NotRotateable
HideResourceInventory
Does what ES called it.
HideFromHelp
NavalUnit
VisibleOwnerOnly
Does what ES called it. Spy god power uses this.
Tracked
Forces the game to track this unit so it can be targetted by certain effects.
ApplyHandicapTraining
DamageToUpgrade
ColorTransformNonGaia
RevealFoundation
Makes the foundation visible for everyone when the construction of it has started. This does not give LOS.
MeteredGarrison
TownBellButton
Adds a town bell button to the unit.
OverrideInitialGarrison
AllowAutoGarrison
DecalStickToWaterSurface
ResourceLimitedAttack
ChargedAttacks
DontDestroyAfterUsed
ForceBuildingData
Only works when you add this to a non-building unit. Enables the unit to train and research units.
DirectProjectile
RevertToSocketAtZeroHitpoints
Does what ES called it. Used by the settlement level 1 (AKA Town center)
UpgradeSocket
Used by the settlement unit so it can be upgraded as a socket.
DoppleOnlyWhenDead
Dopple mystery
HideGarrisonFlag
Does what ES called it.
SolidFoundation
ExcludeFromPlaytest
MakeUnbuiltAtZeroHitpoints
Does what ES called it.
ConvertToGaiaAtZeroHitpoints
Does what ES called it.
PlaceAsFoundation
Editor only I think, forces to place the unit as it's foundation(unbuilt).
ConvertOnStartBuild
Does what ES called it.
SelectWithObstruction
Does what ES called it.
AnnounceConversion
Does what ES called it.
RequiresMaintenance
Dunno what this does, might be obsolete.
DeadReplacementDuringDeathAction
Does what ES called it.
StartOnNoUpdate
This will force the unit to start when there is no update. Not exactly sure but most of the time (if not every) it forces the unit to be active immediately.
StartOnAnimationUpdate
This will force the unit to start on an animation update. If the unit has a birth animation it will start after the animation.
PrayableTo
Does what ES called it.
PlaceSocketWhenPlacing
Editor only but it might not be limited to. Forces the game to place the socketunit underneath the unit when placing it in the editor. Never tested it but it might also work outside the editor.
PlayerOwnsObstruction
Awesome effect used by gates. Allows the allies to walk through the unit and denies enemies to do that. (Water elemtal unit hint hint)
ProjectileTerrainOnly
PlaceAnywhere
Forces the game to skip the placement check when placing a unit.
DestroySocket
Destroys the socket when it is used.
NoProjectileDamage
FieldAbilityLimited
FireDamage
NoIdleActions
AreaDamageConstant
AlwaysCheckCollisions
KillOnAnimLoop
NotCommandable
ShowGarrisonButton
WallBuild
InitialGarrisonOnly
ConstrainOrientation
AlwaysFullColorAsCursor
OrientUnitWithGround
4.1.3.3) Constant Type: Moar Flags
AlwaysShowButton
CannotAttackDisabledUnits
Does what its name says if it actually works
StartDormant
No one knows what this does :(
OnlyInEditor
DestroyProjectile
GarrisonSpeedBonus
Gets a speed bonus when units are garissoned
GarrisonBonus
Enables the bonus
GarrisonAttack
Attack bonus
NotDeleteable
Can't be deleted
Doppled
Nope
GivesLOSToAll
Does what it is called
MarketAbility
Dunno, either enables the buttons and or enables to start a trade route with this unit
DoNotYawDuringMovement
ForceToGaia
Does what it's called
FadeOutDuringDeathAnimation
Does what it's called, note that this can cause some lag because AoM's transparency engine sucks
SplitAtMaxInventory
Deprecated I think
SnapPlacement
Docks use this
FaceOutwards
Don't know if it works
UnlimitedSupply
Farms?
HasRuins
Deprecated?
NotSearchable
DontFadeInOnBuild
CollidesWithProjectiles
Wanders
AlphaFadeLifespan
VisibleUnderFogIfGaia
VisibleUnderFog
DoNotCreateUnitGroupAutomatically
DontRotateObstruction
NonAutoFormedUnit
DoNotShowOnMinimap
ObscuredByUnits
ObscuresUnits
FadeInOnCreation
FlattenGround
NotSelectable
SelectableNonSolid
PlayerPlaceable
HasGatherPoint
DoesNotHaveGatherPoint
BloodOnDeath
NoBloodOnDeath
DoNotValidateResourceInventory
ValidateResourceInventory
DoNotDieAtZeroResources
DieAtZeroResources
DoNotDieAtZeroHitpoints
DieAtZeroHitpoints
NoHPBar
Immoveable
CannotAttackDisabledUnits
Does what its name says if it actually works
StartDormant
No one knows what this does :(
OnlyInEditor
DestroyProjectile
GarrisonSpeedBonus
Gets a speed bonus when units are garissoned
GarrisonBonus
Enables the bonus
GarrisonAttack
Attack bonus
NotDeleteable
Can't be deleted
Doppled
Nope
GivesLOSToAll
Does what it is called
MarketAbility
Dunno, either enables the buttons and or enables to start a trade route with this unit
DoNotYawDuringMovement
ForceToGaia
Does what it's called
FadeOutDuringDeathAnimation
Does what it's called, note that this can cause some lag because AoM's transparency engine sucks
SplitAtMaxInventory
Deprecated I think
SnapPlacement
Docks use this
FaceOutwards
Don't know if it works
UnlimitedSupply
Farms?
HasRuins
Deprecated?
NotSearchable
DontFadeInOnBuild
CollidesWithProjectiles
Wanders
AlphaFadeLifespan
VisibleUnderFogIfGaia
VisibleUnderFog
DoNotCreateUnitGroupAutomatically
DontRotateObstruction
NonAutoFormedUnit
DoNotShowOnMinimap
ObscuredByUnits
ObscuresUnits
FadeInOnCreation
FlattenGround
NotSelectable
SelectableNonSolid
PlayerPlaceable
HasGatherPoint
DoesNotHaveGatherPoint
BloodOnDeath
NoBloodOnDeath
DoNotValidateResourceInventory
ValidateResourceInventory
DoNotDieAtZeroResources
DieAtZeroResources
DoNotDieAtZeroHitpoints
DieAtZeroHitpoints
NoHPBar
Immoveable
TechTree
The TechTree is not as important as the Proto but without it you won't be able to do a lot. The game can launch without a TechTree but you won't be able to research any technologies so, creating units and researching technologies ingame will not be possible. I will tell you everything about the TechTree I know in this section of the guide but first the contents of this section:
Contents: If you're not a noob then you could skip the first few chapters and start with the intermediate/expert chapters
Noobs: Skills Required: None!
1. What is Techtree editing?
2. What is possible with Techtree editing?
3. When should I use the Techtree?
4. Editing the Techtree
Intermediate: Skills Required: Proto Noobs
5. Creating your own techs (tutorial, probably last chapter that will be written)
6. Easy technology chaining(meh)
7. Debugging the Techtree (tutorial, 2nd last chapter)
Expert:
7. Hard technology chaining(after 6)
8. Combining Proto and Techtree
9. Unknown tricks
Data editor god:
10. Combining triggers, Proto and Techtree
Contents: If you're not a noob then you could skip the first few chapters and start with the intermediate/expert chapters
Noobs: Skills Required: None!
1. What is Techtree editing?
2. What is possible with Techtree editing?
3. When should I use the Techtree?
4. Editing the Techtree
Intermediate: Skills Required: Proto Noobs
5. Creating your own techs (tutorial, probably last chapter that will be written)
6. Easy technology chaining(meh)
7. Debugging the Techtree (tutorial, 2nd last chapter)
Expert:
7. Hard technology chaining(after 6)
8. Combining Proto and Techtree
9. Unknown tricks
Data editor god:
10. Combining triggers, Proto and Techtree
1) What is Techtree Editing?
Techtree editing is editing the techtree(x).xml :D
In the techtree(x).xml you will see a long list of tags that might make no sense to you at all. All you need to know for now is that in this list you can find all the technologies of AoM(TT). Each technology has a standard format, it starts with a opening tag and <tech [data]> and ends with a closing tag </tech>. Everything in the Techtree works with opening and closing tags and if one of the two is missing then the Techtree will be invalid. Between the <tech> tags there are a lot of other tags and most of them are important. Editing those tags or adding another Technology is what's called Techtree editing or by some people Technology editing (Both are correct I guess)
In the techtree(x).xml you will see a long list of tags that might make no sense to you at all. All you need to know for now is that in this list you can find all the technologies of AoM(TT). Each technology has a standard format, it starts with a opening tag and <tech [data]> and ends with a closing tag </tech>. Everything in the Techtree works with opening and closing tags and if one of the two is missing then the Techtree will be invalid. Between the <tech> tags there are a lot of other tags and most of them are important. Editing those tags or adding another Technology is what's called Techtree editing or by some people Technology editing (Both are correct I guess)
2) What is possible with Techtree editing?
Probably more than we know :) This really depends on what you know and how experienced you are. With this guide I will try to explain everything I know and that will make you atleast an intermediate Techtree editor. Now what is possible with Techtree editing on its own? Quite a lot, you could for example change the costs of other technologies and units, stats of units, granting godpowers and even enabling and disabling shared LOS. Listing everything you could do with Techtree editing on its own would be stupid, not to mention the things you could do when you combine Techtree editing with other data editing, but I will tell you what is impossible with Techtree editing.
-You cannot change certain stats of a unit
This is microsofts fault and it's one of the biggest limitations of the Engine, besides not having an amphibious movementtype. You cannot simply add something that is not there. Example: A unit that has no rangedattack (hoplite) cannot get a rangedattack without Proto editing. The closest you can get to adding something is enabling and disabling special attacks, just look at the ra priests.
-Changing other technologies is limited
I guess we'll have to live with this because it is not really necesary as far as I know... The only three thing you can change about other Technologies are the cost and the status of the technology. The third one is excluding. Example: Isis reduces all the technology costs, this is a technology. When you research a second age minor god a minor god tech's status will be set to obtainable and the other option will be excluded.
-Changing bla bla bla is impossible
More will come but for now just think: Changing something else than data is not possible.
-You cannot change certain stats of a unit
This is microsofts fault and it's one of the biggest limitations of the Engine, besides not having an amphibious movementtype. You cannot simply add something that is not there. Example: A unit that has no rangedattack (hoplite) cannot get a rangedattack without Proto editing. The closest you can get to adding something is enabling and disabling special attacks, just look at the ra priests.
-Changing other technologies is limited
I guess we'll have to live with this because it is not really necesary as far as I know... The only three thing you can change about other Technologies are the cost and the status of the technology. The third one is excluding. Example: Isis reduces all the technology costs, this is a technology. When you research a second age minor god a minor god tech's status will be set to obtainable and the other option will be excluded.
-Changing bla bla bla is impossible
More will come but for now just think: Changing something else than data is not possible.
3) When should I use the Techtree?
If you want to do anything of the stuff I told you in the last chapter, when you want to create a new unit/tech, when you want create a unit or research a tech if x amount of units are on the map etc... What people tend to forget (or don't know) is that the effects of some triggers that can cause lag (or just some regular triggers) can be replicated by lagless technologies that can be looped every ms (or 10ms who cares). For example +1 of any stat, enabling and disabling an attack, changing the appearance of a unit or just kill all of the (or a certain type of) units on the map. These effects are all doable through technologies.
If you're thinking like a noob Techtree editor:
You can't think yet ;) you're still dazed by the rest of the guide!
If you're thinking like an intermediate Techtree editor:
What if you want to use console commands? That's no problem since Magnum Pi found out how to trigger console commands with technologies. Things like transform all (or a certain type of) units on the map or set lightning.
As a expert Techtree editor:
How can I make a infinite researchable tech? Easy peasy just use the proto(x) and some requirements a delay and a few technologies with a few statuses.
And as a Data editor god:
How can I make a unit cast godpowers, transform without using a transform, convert enemy units into something else than minions and be unique?
As I'm probably the first that tried this and even I do not control this properly I won't give a short summary here to give you an idea of how it would work.
Now if you're still following me (or partly), here comes the editing part.
If you're thinking like a noob Techtree editor:
You can't think yet ;) you're still dazed by the rest of the guide!
If you're thinking like an intermediate Techtree editor:
What if you want to use console commands? That's no problem since Magnum Pi found out how to trigger console commands with technologies. Things like transform all (or a certain type of) units on the map or set lightning.
As a expert Techtree editor:
How can I make a infinite researchable tech? Easy peasy just use the proto(x) and some requirements a delay and a few technologies with a few statuses.
And as a Data editor god:
How can I make a unit cast godpowers, transform without using a transform, convert enemy units into something else than minions and be unique?
As I'm probably the first that tried this and even I do not control this properly I won't give a short summary here to give you an idea of how it would work.
Now if you're still following me (or partly), here comes the editing part.
4) Editing the Techtree
Now open the techtree(x).xml in a text editor.
I'll guide you through the whole process but if you are sure that you've opened the right file then skip the green part.
//Imagine Green Part here
The first line you should see is:
<?xml version="1.0" encoding="UTF-8"?>
If not, then you managed to open the wrong file.
That line is not important for us, it says something about a version and about the encoding, which is only useful when you want to create a converter or something.
Continuing to the next line, skip that one because it is a very useful blank line... The next line should be this for AoM:
<techtree version="11">
Or this for AoMTT
<techtree version="5">
If it is not techtree but proto or something else then you did not open the right file.
If your version is different then you opened the wrong version.
If everything matches then congratulations you can now start with editing the Techtree!
//Stop Imagining Green Part
Now I will explain you how the Techtree works
This line:
<techtree version="x">
Is the opening tag of the Techtree. It has one value and that value says something about the version of the Techtree. If you change it then the game might ignore your Techtree so, better not change it.
If you scroll down to the bottom of the Techtree you will find the closing tag:
</techtree>
This one does not have a value, neither does any closing tag in the Techtree.
As I said earlier a lot of stuff in the Techtree have an opening and a closing tag. If there misses one then the Techtree will become invalid.
The next tag should be:
<tech name="Age 1" type="Normal">
If its not the case then I dunno what you did ^^
If its similar then you might have a heavily modded Techtree but make sure its something like this:
<tech name="Name" type="Type">
So, what does this line of code tell us?
-It is an opening tech tag <tech> and inside the tag there are two values
--The name of the tech
This can be anything but certain symbols are not allowed and I think uppercase and lowercase are the same but I never tested this. Just don't make it too long as you might want to use it in a chain of techs.
--The type of the tech
Only two options that I know. Normal for regular techs and Power for godpowers. Note that godpowers are defined somewhere outside the Techtree and that the Tecthree only refers to it.
--What is inside the tech
Everything between the opening and the closing tag is inside the tech and adds its value to it. Most of the techs (if not all) follow this format:
<tech name="Name" type="Type">//Opening tag
General Info Area
Prerequisites Area
Effects Area
Exclude Area
</tech>//Closing tag
I'll guide you through the whole process but if you are sure that you've opened the right file then skip the green part.
//Imagine Green Part here
The first line you should see is:
<?xml version="1.0" encoding="UTF-8"?>
If not, then you managed to open the wrong file.
That line is not important for us, it says something about a version and about the encoding, which is only useful when you want to create a converter or something.
Continuing to the next line, skip that one because it is a very useful blank line... The next line should be this for AoM:
<techtree version="11">
Or this for AoMTT
<techtree version="5">
If it is not techtree but proto or something else then you did not open the right file.
If your version is different then you opened the wrong version.
If everything matches then congratulations you can now start with editing the Techtree!
//Stop Imagining Green Part
Now I will explain you how the Techtree works
This line:
<techtree version="x">
Is the opening tag of the Techtree. It has one value and that value says something about the version of the Techtree. If you change it then the game might ignore your Techtree so, better not change it.
If you scroll down to the bottom of the Techtree you will find the closing tag:
</techtree>
This one does not have a value, neither does any closing tag in the Techtree.
As I said earlier a lot of stuff in the Techtree have an opening and a closing tag. If there misses one then the Techtree will become invalid.
The next tag should be:
<tech name="Age 1" type="Normal">
If its not the case then I dunno what you did ^^
If its similar then you might have a heavily modded Techtree but make sure its something like this:
<tech name="Name" type="Type">
So, what does this line of code tell us?
-It is an opening tech tag <tech> and inside the tag there are two values
--The name of the tech
This can be anything but certain symbols are not allowed and I think uppercase and lowercase are the same but I never tested this. Just don't make it too long as you might want to use it in a chain of techs.
--The type of the tech
Only two options that I know. Normal for regular techs and Power for godpowers. Note that godpowers are defined somewhere outside the Techtree and that the Tecthree only refers to it.
--What is inside the tech
Everything between the opening and the closing tag is inside the tech and adds its value to it. Most of the techs (if not all) follow this format:
<tech name="Name" type="Type">//Opening tag
General Info Area
Prerequisites Area
Effects Area
Exclude Area
</tech>//Closing tag
4.1) The General Info Area
I divide this area into three smaller sections because it is big.
-The General stuff
-The Variable Values
-The Constant Values
-The General stuff
-The Variable Values
-The Constant Values
4.1.1) The General Stuff
This is what every tech has
<dbid>x</dbid>
in this case <dbid>64</dbid>
The "dbid" not sure what the abbreviation means but it could be databaseid, anyways, every tech has a unique dbid and duplicates are not allowed because that could end up having weird effects which could be used for something but that's something for the god part.
#Not modifiable by other techs
<displaynameid>x</displaynameid>
in this case <displaynameid>10850</displaynameid>
The "displaynameid" refers to line 10850(in this case) in the (xpack)language.dll and that line will be the name of the tech ingame.
#Not modifiable by other techs
<status>x</status>
in this case <status>ACTIVE</status>
This sets the status of the tech. There are 5 working statuses and 1 I never tested. Statuses tell the game whether a tech is researched, not researched, researching, available, active and looping.
#Modifiable by other techs
Status: OBTAINABLE
This status tells us that the tech will be researched as soon as the prereqs are met.
Status: AVAILABLE
This status tells us that the tech can be researched by anyone.
Status: UNOBTAINABLE
This status tells us that the tech cannot be researched by anyone.
Status: ACTIVE
This status tells us that the tech will "run" immediately.
Status: PERSISTANT
This status tells us that the tech will be looped.
Status: RESEARCHING
Only read about this in a list dunno if it exists
This is just a little bit about statuses. Later on you will learn a lot more about them.
<dbid>x</dbid>
in this case <dbid>64</dbid>
The "dbid" not sure what the abbreviation means but it could be databaseid, anyways, every tech has a unique dbid and duplicates are not allowed because that could end up having weird effects which could be used for something but that's something for the god part.
#Not modifiable by other techs
<displaynameid>x</displaynameid>
in this case <displaynameid>10850</displaynameid>
The "displaynameid" refers to line 10850(in this case) in the (xpack)language.dll and that line will be the name of the tech ingame.
#Not modifiable by other techs
<status>x</status>
in this case <status>ACTIVE</status>
This sets the status of the tech. There are 5 working statuses and 1 I never tested. Statuses tell the game whether a tech is researched, not researched, researching, available, active and looping.
#Modifiable by other techs
Status: OBTAINABLE
This status tells us that the tech will be researched as soon as the prereqs are met.
Status: AVAILABLE
This status tells us that the tech can be researched by anyone.
Status: UNOBTAINABLE
This status tells us that the tech cannot be researched by anyone.
Status: ACTIVE
This status tells us that the tech will "run" immediately.
Status: PERSISTANT
This status tells us that the tech will be looped.
Status: RESEARCHING
Only read about this in a list dunno if it exists
This is just a little bit about statuses. Later on you will learn a lot more about them.
4.1.2) The Variable Values
Most of the techs have these but they are not required.
<cost resourcetype="x">x</cost>
The cost of the tech. resourcetype options are Wood, Gold, Food, Favor. The cost can be anything thats not too big for the game or too small to notice. It should handle doubles. Example:
<cost resourcetype="Wood">150.0000</cost>
<researchpoints>x</researchpoints>
or in this case <researchpoints>0.0000</researchpoints>
This code tells the game how long you need to research the tech before you have researched it. Not sure but since the status of the tech is active the researchpoints are ignored.
<icon>x</icon>
This line tells the game what icon needs to be used. Example:
<icon>Icon Achievement Age 2</icon>
<rollovertextid>x</rollovertextid>
The "rollovertextid" refers to line x in the (xpack)language.dll and that line will be the description of the tech ingame. It will appear when you hover with your mouse over it.
<prereqsnotmetrollovertextid>x</prereqsnotmetrollovertextid>
The "prereqsnotmetrollovertextid" refers to line x in the (xpack)language.dll and that line will be the message you will get when you can't research the tech because you do not meet the requirements ingame.
<delay>x</delay>
or in this case <delay>0.0100</delay>
This tells the game how long it should wait before the effects of tech start to have effect. Will be one of the keys of the GOD part of this guide.
<buttonpos row="x" column="x"></buttonpos>
Ignore this it's useless because the position of the button can't be defined in the tech itself.
These are all the variable values I think.
<cost resourcetype="x">x</cost>
The cost of the tech. resourcetype options are Wood, Gold, Food, Favor. The cost can be anything thats not too big for the game or too small to notice. It should handle doubles. Example:
<cost resourcetype="Wood">150.0000</cost>
<researchpoints>x</researchpoints>
or in this case <researchpoints>0.0000</researchpoints>
This code tells the game how long you need to research the tech before you have researched it. Not sure but since the status of the tech is active the researchpoints are ignored.
<icon>x</icon>
This line tells the game what icon needs to be used. Example:
<icon>Icon Achievement Age 2</icon>
<rollovertextid>x</rollovertextid>
The "rollovertextid" refers to line x in the (xpack)language.dll and that line will be the description of the tech ingame. It will appear when you hover with your mouse over it.
<prereqsnotmetrollovertextid>x</prereqsnotmetrollovertextid>
The "prereqsnotmetrollovertextid" refers to line x in the (xpack)language.dll and that line will be the message you will get when you can't research the tech because you do not meet the requirements ingame.
<delay>x</delay>
or in this case <delay>0.0100</delay>
This tells the game how long it should wait before the effects of tech start to have effect. Will be one of the keys of the GOD part of this guide.
<buttonpos row="x" column="x"></buttonpos>
Ignore this it's useless because the position of the button can't be defined in the tech itself.
These are all the variable values I think.
4.1.3) The Constant Values
The flag tags are the Constant Values of the technologies
<flag>x</flag>
They add an effect to the tech itself
<flag>Volatile</flag>
This flag is used with techs that have a prereq that needs to be checked every millisecond. Without it, techs will be checked every tenth of a second.
<flag>HideFromDetailHelp</flag>
This flag tells the game to hide the technology from the unit details when you rightclick on its portrait.
<flag>AlwaysShowButton</flag>
This flag tells the game to show the research button even if the tech is not researchable.
<flag>DynamicCost</flag>
This flag tells the game to count every enemy unit multiply that number by something (10-100?) and that is the cost of the tech. Only used by the omniscience tech
<flag>AgeUpgrade</flag>
So far it looks like this flag is useless. But it might have to do something with the postgame graph.
These are all the constant values unless I forgot some.
<flag>x</flag>
They add an effect to the tech itself
<flag>Volatile</flag>
This flag is used with techs that have a prereq that needs to be checked every millisecond. Without it, techs will be checked every tenth of a second.
<flag>HideFromDetailHelp</flag>
This flag tells the game to hide the technology from the unit details when you rightclick on its portrait.
<flag>AlwaysShowButton</flag>
This flag tells the game to show the research button even if the tech is not researchable.
<flag>DynamicCost</flag>
This flag tells the game to count every enemy unit multiply that number by something (10-100?) and that is the cost of the tech. Only used by the omniscience tech
<flag>AgeUpgrade</flag>
So far it looks like this flag is useless. But it might have to do something with the postgame graph.
These are all the constant values unless I forgot some.
4.2) The Prerequisites Area
This area is found between the prereqs tags:
<prereqs>'
other tags
</prereqs>
The prereqs are the conditions that must be met before the technology's status will have effect. There are a lot of conditions and I will explain all the conditions I know in this guide.
<specificage>x</specificage>
This prereq tells the game to look if the player reached x age. You can choose between Classical Age, Heroic Age, Mythic Age. There is no need for Archaic age because that condition is always true and the Titan Age is never set. I will tell more about setting an Age in the effect area
<techstatus status="Status">Name of tech</techstatus>
This prereq tells the game to look at another tech's status. This is used quite often in chaining techs. Chained tech example:
<techstatus status="Active">Medium Archers</techstatus>
This line of code is found in the "Heavy Archers" tech and because of it the tech can only be researched if the "Medium Archers" tech is Active/Researched. In this case it is RESEARCHED because you cannot undo the "Medium Archers" tech.
Advanced prereqs:
<culture>
<culturename>Culture name</culturename>
</culture>
This prereq is a bit more advanced than the other two. It tells the game to look at the player's culture. There are 3 cultures in AoM and 4 in AoMTT, Greek, Norse, Egyptian for AoM and add Atlantean for AoMTT. The reason why this prereq is more advanced is that the game looks at the conditions in a different way than the prereqs above. I'll give an example:
<culture>
<culturename>Greek</culturename>
<culturename>Atlantean</culturename>
</culture>
Now, if you apply the normal rules then no one would be able to research this tech because you can't be Greek and Atlantean. The reason why it works is that the culture prereq works with options or "or" so the condition here is:
Player's culture name is Greek or Atlantean.
<civilization>
<civname>Civilization name</civname>
</civilization>
This prereq works in the same way as the culture prereq but then with civilization names. The available names are Isis, Ra, Set, Hades, Poseidon, Zeus, Loki, Odin, Thor, Kronos, Gaia and Ouranos (Yes Ouranos). Kronos, Gaia and Ouranos are AoMTT only.
Another thing this prereq does is that when you research a god tech all the techs that have the same civname as the god you just researched will be shown on the minorgod selection interface.
<typecount unit="ProtoUnit Name" count="Number" state="Unit State" operator="gt,lt,e,gte or lte"></typecount>
This prereq is the most advanced prereq in the game. It searches for a given ProtoUnit that is in the given state, counts it and checks it with the given operator. The available unit states are:
-aliveState
The easiest, this state is used when a unit is alive.
-deadState
I guess this state is used when a unit is dead. It is not used ingame so it might not work but I've never tested it.
-buildingState
Not sure, techs that spawn units use this. Might be the state when a unit is in queue or when the game gets a signal that it is going to be created. Would be cool if it checked units in queue because then you could speed up a building's workrate when x units are queued.
-anyState
Probably the three states above combined.
-noneState
No idea why it is used but it could be that when a unit is garrisoned its state will be noneState. I have to test this though.
Just stick to the normal state that is used if you're going to use it:
"noneState aliveState"
These are all the prereqs unless I forgot one.
<prereqs>'
other tags
</prereqs>
The prereqs are the conditions that must be met before the technology's status will have effect. There are a lot of conditions and I will explain all the conditions I know in this guide.
<specificage>x</specificage>
This prereq tells the game to look if the player reached x age. You can choose between Classical Age, Heroic Age, Mythic Age. There is no need for Archaic age because that condition is always true and the Titan Age is never set. I will tell more about setting an Age in the effect area
<techstatus status="Status">Name of tech</techstatus>
This prereq tells the game to look at another tech's status. This is used quite often in chaining techs. Chained tech example:
<techstatus status="Active">Medium Archers</techstatus>
This line of code is found in the "Heavy Archers" tech and because of it the tech can only be researched if the "Medium Archers" tech is Active/Researched. In this case it is RESEARCHED because you cannot undo the "Medium Archers" tech.
Advanced prereqs:
<culture>
<culturename>Culture name</culturename>
</culture>
This prereq is a bit more advanced than the other two. It tells the game to look at the player's culture. There are 3 cultures in AoM and 4 in AoMTT, Greek, Norse, Egyptian for AoM and add Atlantean for AoMTT. The reason why this prereq is more advanced is that the game looks at the conditions in a different way than the prereqs above. I'll give an example:
<culture>
<culturename>Greek</culturename>
<culturename>Atlantean</culturename>
</culture>
Now, if you apply the normal rules then no one would be able to research this tech because you can't be Greek and Atlantean. The reason why it works is that the culture prereq works with options or "or" so the condition here is:
Player's culture name is Greek or Atlantean.
<civilization>
<civname>Civilization name</civname>
</civilization>
This prereq works in the same way as the culture prereq but then with civilization names. The available names are Isis, Ra, Set, Hades, Poseidon, Zeus, Loki, Odin, Thor, Kronos, Gaia and Ouranos (Yes Ouranos). Kronos, Gaia and Ouranos are AoMTT only.
Another thing this prereq does is that when you research a god tech all the techs that have the same civname as the god you just researched will be shown on the minorgod selection interface.
<typecount unit="ProtoUnit Name" count="Number" state="Unit State" operator="gt,lt,e,gte or lte"></typecount>
This prereq is the most advanced prereq in the game. It searches for a given ProtoUnit that is in the given state, counts it and checks it with the given operator. The available unit states are:
-aliveState
The easiest, this state is used when a unit is alive.
-deadState
I guess this state is used when a unit is dead. It is not used ingame so it might not work but I've never tested it.
-buildingState
Not sure, techs that spawn units use this. Might be the state when a unit is in queue or when the game gets a signal that it is going to be created. Would be cool if it checked units in queue because then you could speed up a building's workrate when x units are queued.
-anyState
Probably the three states above combined.
-noneState
No idea why it is used but it could be that when a unit is garrisoned its state will be noneState. I have to test this though.
Just stick to the normal state that is used if you're going to use it:
"noneState aliveState"
These are all the prereqs unless I forgot one.
4.3) The Effects Area
Now to the most important part of editing the Techtree, the effects. This area is found between the:
<effects>
other tags
</effects>
In the effects area the effects that the tech has ingame will be defined. There are a few effects in AoM and I will try to explain every effect but because this area is big I will devide this into 2 smaller sections.
-Simple Effects
-Advanced Effects
-Expert Effects
<effects>
other tags
</effects>
In the effects area the effects that the tech has ingame will be defined. There are a few effects in AoM and I will try to explain every effect but because this area is big I will devide this into 2 smaller sections.
-Simple Effects
-Advanced Effects
-Expert Effects
4.3.1) Simple Effects
Simple effects are effects that are easily defined and do not require a lot of brain to use but that does not mean that they are less usefull.
This is how a simple effect is defined most of the time:
<effect type="Type">Target</effect>
The type says something about the effect that the tech will have and the target is about what is going to be affected or used. There is no maximum amount of effects a tech can have but certain things are not allowed. I will start with explaining every effect now:
<effect type="TextOutput">Line number in (xpack)language.dll</effect>
I think most of you already have an idea about what this does but for the slowpokes, this effect will look for the given line number in the (xpack)language.dll and will send a message with that line. A more advanced version of this is:
<effect all="true" type="TextOutput">x</effect>
all="true" is added to the line. This tells the game to post a message to everyone in the game except for the player that triggers the tech.
<effect type="Sound">Sound file</effect>
This tells the game to play a sound file when the effect occurs. Adding all="true" might work here too but it is not used in AoM or AoMTT and I never tested it.
<effect type="TechStatus" status="Status">Tech name</effect>
This tells the game to set the status of another tech. This is really useful as it makes things a lot easier when chaining techs. Instead of adding a line to the prereqs of another tech you could also change the status of it and on top of that you could make turn an OBTAINABLE tech into a PERSISTENT tech which is impossible with prereqs. There is one more thing you need to know and that is when you set another tech's status to ACTIVE it won't be ACTIVE but a modifiable RESEARCHED status as it will ignore the prereqs of that tech but still be modifiable as if it had an ACTIVE status. You can do a lot with this and I will explain more about this in the expert chapters. One thing that is not allowed by the game is a tech that sets its own status. This will result in a frozen game or a crashed game.
<effect type="SetName" proto="ProtoUnit" culture="Culture name" newname="Line number in (xpack)language.dll"></effect>
This effect tells the game to change the name of a given ProtoUnit into the line in the (xpack)language.dll. This is used for upgrades like medium archers etc. Not sure why culture="Culture name" is used but it might have something to do with the prereqs, just set it to none to ignore it.
<effect type="SetAge">Age</effect>
This effect tells the game to change the current age into another age. Now I've never used this so my knowledge about this is small but I know that it can be checked in the prereqs <specificage>Age</specificage> I do not see a reason why you cannot set the age to NewAge or any other name (Titan Age) and then check it with <specificage>NewAge</specificage>
This is how a simple effect is defined most of the time:
<effect type="Type">Target</effect>
The type says something about the effect that the tech will have and the target is about what is going to be affected or used. There is no maximum amount of effects a tech can have but certain things are not allowed. I will start with explaining every effect now:
<effect type="TextOutput">Line number in (xpack)language.dll</effect>
I think most of you already have an idea about what this does but for the slowpokes, this effect will look for the given line number in the (xpack)language.dll and will send a message with that line. A more advanced version of this is:
<effect all="true" type="TextOutput">x</effect>
all="true" is added to the line. This tells the game to post a message to everyone in the game except for the player that triggers the tech.
<effect type="Sound">Sound file</effect>
This tells the game to play a sound file when the effect occurs. Adding all="true" might work here too but it is not used in AoM or AoMTT and I never tested it.
<effect type="TechStatus" status="Status">Tech name</effect>
This tells the game to set the status of another tech. This is really useful as it makes things a lot easier when chaining techs. Instead of adding a line to the prereqs of another tech you could also change the status of it and on top of that you could make turn an OBTAINABLE tech into a PERSISTENT tech which is impossible with prereqs. There is one more thing you need to know and that is when you set another tech's status to ACTIVE it won't be ACTIVE but a modifiable RESEARCHED status as it will ignore the prereqs of that tech but still be modifiable as if it had an ACTIVE status. You can do a lot with this and I will explain more about this in the expert chapters. One thing that is not allowed by the game is a tech that sets its own status. This will result in a frozen game or a crashed game.
<effect type="SetName" proto="ProtoUnit" culture="Culture name" newname="Line number in (xpack)language.dll"></effect>
This effect tells the game to change the name of a given ProtoUnit into the line in the (xpack)language.dll. This is used for upgrades like medium archers etc. Not sure why culture="Culture name" is used but it might have something to do with the prereqs, just set it to none to ignore it.
<effect type="SetAge">Age</effect>
This effect tells the game to change the current age into another age. Now I've never used this so my knowledge about this is small but I know that it can be checked in the prereqs <specificage>Age</specificage> I do not see a reason why you cannot set the age to NewAge or any other name (Titan Age) and then check it with <specificage>NewAge</specificage>
4.3.2) Advanced Effects
Advanced Effects are a little bit harder to define and can require multiple lines of code.
<effect type="Data" x="type x">
<target type=Target></target>
</effect>
The data effect type is the most important and useful effect that the engine can handle. It has a lot of different options and I'm not going to explain every combination example of it but I will explain every option in steps.
Changing a ProtoUnit Action:
<effect type="Data" action="ProtoUnit Action">
action="ProtoUnit Action" tells the game what action is effected by the tech effect.
Here is a list of all the useful ProtoUnit Actions:
AutoLOS
BuckAttack
Teleport
Boost
Eat
LightningAttack
Trade
ConvertAttack
FreezeAttack
ChargedRangedAttack
WhirlwindAttack
Dropoff
Gore
Throw
AutoGather
Empower
Regenerate
DiveBomb
Pickup
JumpAttack
Light
AreaAttack
AutoConvert
Train
Repair
RangedAttack
Idle
Hunting
Heal
HandAttack
Gather
Convert
Build
These can be modified through techs. Next step is the amount the tech will be changed:
<effect type="Data" action="Action" amount="Amount">
Now the game knows that a certain action is getting a value but this is useless because the game does not know where the value is going to be added.
Next step:
<effect type="Data" action="Action" amount="Amount" subtype="type">
Now a subtype is specified in the code and the game knows where to go but were not done yet. The next step depends on what subtype is used.
Subtype Damage:
<effect type="Data" action="Action" amount="Amount" subtype="Damage" damagetype="Damagetype">
Now the game knows that an action's damagetype will be increased by the given amount. Example:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack">
This tells the game that damagetype of the HandAttack action will be modified but the problem here is that the amount does not have a real value yet. It's 1.05*nothing now.
That will bring us to the 2nd last step of the change ProtoUnit effect:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack" relativity="Percent, BasePercent, Absolute, Assign">
Relativity tells the game what kind of value the amount is.
-Percent makes amount a percentage (105%)
For example the HandAttack hack damage was 10 after the tech is researched it will be 10.5 apply this twice and you will have 11.025 .
-BasePercent does the same but it takes the base value instead of the used value.
For example the HandAttack hack damage was 10 after the tech is researched it will be 10.5 apply this twice and you will have 11.0 .
-Absolute adds the amount ontop of the old value.
For example the HandAttack hack damage was 10 after the tech is researched it will be 11.05
-Assign turns the value into the amount.
For example the HandAttack hack damage was 10 after the tech is researched it will be 1.05
Now the last step, targetting and closing:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack" relativity="BasePercent">
<target type="ProtoUnit">Swordsman Hero</target>
</effect>
Nothing really special or new here.
Remember that you cannot change a value that is not there.
For example the Swordsman Hero has no pierce damage. If this tech is researched:
<effect type="Data" action="HandAttack" amount="any amount" subtype="Damage" damagetype="Pierce" relativity="Any relativity">
<target type="ProtoUnit">Swordsman Hero</target>
</effect>
Nothing will happen unless you add this piece of code to the Swordsman Hero in the Proto:
<param name="Damage" type="Pierce" value1="0"></param>
Now the value is there eventhough its 0, it's there and that's all the game needs. Now it can add the amount to it, just don't use percentages and wonder why nothing gets added.
Oh and Swordsman Hero is a murmillo ingame. You can't use murmillo as target as it does not exist in the Proto.
Changing a ProtoUnit Stats:
<effect type="Data" amount="3000.00" subtype="Hitpoints" relativity="Absolute">
<target type="ProtoUnit">Titan Atlantean</target>
</effect>
Nothing new here, just make sure that you know why action="Action" is missing from this effect.
Answer: no action is modified.
If you want to enable a unit:
<effect type="Data" amount="1.00" subtype="Enable" relativity="Absolute">
<target type="ProtoUnit">Granary</target>
</effect>
Disabling a unit would be assigning the Enable subtype to 0.
If you change something like armor:
<effect type="Data" amount="-0.15" subtype="ArmorVulnerability" damagetype="Hack" relativity="Percent">
<target type="ProtoUnit">Building</target>
</effect>
Again nothing new besides the targetting and that you need to subtract ArmorVulnerability to improve a unit's armor. "Building" means that all units that have a Building unittype <unittype>Building</unittype> are targetted.
Or cost:
<effect type="Data" amount="0.80" subtype="Cost" resource="Wood" relativity="BasePercent">
<target type="ProtoUnit">Hero</target>
</effect>
Here the game gets another value which is resource="Wood". This tells the game what resource type is used. Again nothing really special, a think you should know is that here you could target techs too:
<effect type="Data" amount="0.70" subtype="Cost" resource="Food" relativity="Percent">
<target type="TechBuilding">Guild</target>
</effect>
This makes all the techs cheaper in the Guild.
You could also target a single tech:
<effect type="Data" amount="80.00" subtype="Cost" resource="Wood" relativity="Absolute">
<target type="Tech">Secrets of the Titans</target>
</effect>
Or all techs:
<effect type="Data" amount="0.90" subtype="Cost" resource="Wood" relativity="Percent">
<target type="techAll"></target>
</effect>
<effect type="Data" x="type x">
<target type=Target></target>
</effect>
The data effect type is the most important and useful effect that the engine can handle. It has a lot of different options and I'm not going to explain every combination example of it but I will explain every option in steps.
Changing a ProtoUnit Action:
<effect type="Data" action="ProtoUnit Action">
action="ProtoUnit Action" tells the game what action is effected by the tech effect.
Here is a list of all the useful ProtoUnit Actions:
AutoLOS
BuckAttack
Teleport
Boost
Eat
LightningAttack
Trade
ConvertAttack
FreezeAttack
ChargedRangedAttack
WhirlwindAttack
Dropoff
Gore
Throw
AutoGather
Empower
Regenerate
DiveBomb
Pickup
JumpAttack
Light
AreaAttack
AutoConvert
Train
Repair
RangedAttack
Idle
Hunting
Heal
HandAttack
Gather
Convert
Build
These can be modified through techs. Next step is the amount the tech will be changed:
<effect type="Data" action="Action" amount="Amount">
Now the game knows that a certain action is getting a value but this is useless because the game does not know where the value is going to be added.
Next step:
<effect type="Data" action="Action" amount="Amount" subtype="type">
Now a subtype is specified in the code and the game knows where to go but were not done yet. The next step depends on what subtype is used.
Subtype Damage:
<effect type="Data" action="Action" amount="Amount" subtype="Damage" damagetype="Damagetype">
Now the game knows that an action's damagetype will be increased by the given amount. Example:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack">
This tells the game that damagetype of the HandAttack action will be modified but the problem here is that the amount does not have a real value yet. It's 1.05*nothing now.
That will bring us to the 2nd last step of the change ProtoUnit effect:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack" relativity="Percent, BasePercent, Absolute, Assign">
Relativity tells the game what kind of value the amount is.
-Percent makes amount a percentage (105%)
For example the HandAttack hack damage was 10 after the tech is researched it will be 10.5 apply this twice and you will have 11.025 .
-BasePercent does the same but it takes the base value instead of the used value.
For example the HandAttack hack damage was 10 after the tech is researched it will be 10.5 apply this twice and you will have 11.0 .
-Absolute adds the amount ontop of the old value.
For example the HandAttack hack damage was 10 after the tech is researched it will be 11.05
-Assign turns the value into the amount.
For example the HandAttack hack damage was 10 after the tech is researched it will be 1.05
Now the last step, targetting and closing:
<effect type="Data" action="HandAttack" amount="1.05" subtype="Damage" damagetype="Hack" relativity="BasePercent">
<target type="ProtoUnit">Swordsman Hero</target>
</effect>
Nothing really special or new here.
Remember that you cannot change a value that is not there.
For example the Swordsman Hero has no pierce damage. If this tech is researched:
<effect type="Data" action="HandAttack" amount="any amount" subtype="Damage" damagetype="Pierce" relativity="Any relativity">
<target type="ProtoUnit">Swordsman Hero</target>
</effect>
Nothing will happen unless you add this piece of code to the Swordsman Hero in the Proto:
<param name="Damage" type="Pierce" value1="0"></param>
Now the value is there eventhough its 0, it's there and that's all the game needs. Now it can add the amount to it, just don't use percentages and wonder why nothing gets added.
Oh and Swordsman Hero is a murmillo ingame. You can't use murmillo as target as it does not exist in the Proto.
Changing a ProtoUnit Stats:
<effect type="Data" amount="3000.00" subtype="Hitpoints" relativity="Absolute">
<target type="ProtoUnit">Titan Atlantean</target>
</effect>
Nothing new here, just make sure that you know why action="Action" is missing from this effect.
Answer: no action is modified.
If you want to enable a unit:
<effect type="Data" amount="1.00" subtype="Enable" relativity="Absolute">
<target type="ProtoUnit">Granary</target>
</effect>
Disabling a unit would be assigning the Enable subtype to 0.
If you change something like armor:
<effect type="Data" amount="-0.15" subtype="ArmorVulnerability" damagetype="Hack" relativity="Percent">
<target type="ProtoUnit">Building</target>
</effect>
Again nothing new besides the targetting and that you need to subtract ArmorVulnerability to improve a unit's armor. "Building" means that all units that have a Building unittype <unittype>Building</unittype> are targetted.
Or cost:
<effect type="Data" amount="0.80" subtype="Cost" resource="Wood" relativity="BasePercent">
<target type="ProtoUnit">Hero</target>
</effect>
Here the game gets another value which is resource="Wood". This tells the game what resource type is used. Again nothing really special, a think you should know is that here you could target techs too:
<effect type="Data" amount="0.70" subtype="Cost" resource="Food" relativity="Percent">
<target type="TechBuilding">Guild</target>
</effect>
This makes all the techs cheaper in the Guild.
You could also target a single tech:
<effect type="Data" amount="80.00" subtype="Cost" resource="Wood" relativity="Absolute">
<target type="Tech">Secrets of the Titans</target>
</effect>
Or all techs:
<effect type="Data" amount="0.90" subtype="Cost" resource="Wood" relativity="Percent">
<target type="techAll"></target>
</effect>
4.3.3) Expert Effects
Expert Effects are the hardest to define but also very usefull.
The CreateUnit effect:
<effect type="CreateUnit" unit="ProtoUnit" delay="delay in ms" generator="What ProtoUnit spawns it">
<pattern type="Leaving" speed="0.00" radius="0.00" quantity="1.00" minradius="0.00">
<offset x="-5.00" y="0.00" z="0.00"></offset>
</pattern>
</effect>
This is a nice effect that can be used for many things, especially when you're at the Expert or God level. This effect tells the game to create a unit at another unit with a delay and the pattern says something about the direction the unit will move to. All you need to know about the pattern is that there is another type that is scatter. Just change some values in the pattern tags to see what they do if you do not understand the names of the value types.
The ConsoleCommand effect:
<effect type="ConsoleCommand">unitTransform("ProtoUnit1", "ProtoUnit2")</effect>
I haven't used this in a while so I can't remember the ConsoleCommands now but I might look them up later. This command is I think one of the most important things you can do with ConsoleCommands. This effect will transform all ProtoUnit1 into ProtoUnit2. For example:
<effect type="ConsoleCommand">unitTransform("Villager Norse", "Villager Greek")</effect>
Changes all the Villager Norse into Villager Greek. You can do a lot with this for example converting an enemy unit with a mummy as greek but then instead of spawning a minion spawn another mummy.
Other tech effects:
<effect tech="Vision" type="Data" amount="1.00" subtype="GrantedTech" relativity="Absolute">
<target type="Player"></target>
</effect>
This effect grants the player the Vision godpower. It is slightly different from other effects because of the tech="Vision" which refers to the Vision godpower reference in the Techtree.
And this unknown effect:
<effect stat="AttackPierce" type="Data" amount="1.00" subtype="UpgradeLevel" relativity="Absolute">
<target type="ProtoUnit">AbstractSiegeWeapon</target>
</effect>
<effect stat="AttackNormal" type="Data" amount="1.00" subtype="UpgradeLevel" relativity="Absolute">
<target type="ProtoUnit">AbstractSiegeWeapon</target>
</effect>
I've no idea what it is and it doesn't seem to do anything BUT it might have to do something with the anim upgradelogic if you're not willing to reach the God level then forget about this.
This was the effect part and that means that we're almost done with this chapter! (yay!)
The CreateUnit effect:
<effect type="CreateUnit" unit="ProtoUnit" delay="delay in ms" generator="What ProtoUnit spawns it">
<pattern type="Leaving" speed="0.00" radius="0.00" quantity="1.00" minradius="0.00">
<offset x="-5.00" y="0.00" z="0.00"></offset>
</pattern>
</effect>
This is a nice effect that can be used for many things, especially when you're at the Expert or God level. This effect tells the game to create a unit at another unit with a delay and the pattern says something about the direction the unit will move to. All you need to know about the pattern is that there is another type that is scatter. Just change some values in the pattern tags to see what they do if you do not understand the names of the value types.
The ConsoleCommand effect:
<effect type="ConsoleCommand">unitTransform("ProtoUnit1", "ProtoUnit2")</effect>
I haven't used this in a while so I can't remember the ConsoleCommands now but I might look them up later. This command is I think one of the most important things you can do with ConsoleCommands. This effect will transform all ProtoUnit1 into ProtoUnit2. For example:
<effect type="ConsoleCommand">unitTransform("Villager Norse", "Villager Greek")</effect>
Changes all the Villager Norse into Villager Greek. You can do a lot with this for example converting an enemy unit with a mummy as greek but then instead of spawning a minion spawn another mummy.
Other tech effects:
<effect tech="Vision" type="Data" amount="1.00" subtype="GrantedTech" relativity="Absolute">
<target type="Player"></target>
</effect>
This effect grants the player the Vision godpower. It is slightly different from other effects because of the tech="Vision" which refers to the Vision godpower reference in the Techtree.
And this unknown effect:
<effect stat="AttackPierce" type="Data" amount="1.00" subtype="UpgradeLevel" relativity="Absolute">
<target type="ProtoUnit">AbstractSiegeWeapon</target>
</effect>
<effect stat="AttackNormal" type="Data" amount="1.00" subtype="UpgradeLevel" relativity="Absolute">
<target type="ProtoUnit">AbstractSiegeWeapon</target>
</effect>
I've no idea what it is and it doesn't seem to do anything BUT it might have to do something with the anim upgradelogic if you're not willing to reach the God level then forget about this.
This was the effect part and that means that we're almost done with this chapter! (yay!)
4.4) The Exclude Area
<exclude>Tech</exclude>
No idea if it has any other effect than:
<effect type="TechStatus" status="unobtainable">Tech</effect>
It might disable it without changing the status of the tech.
No idea if it has any other effect than:
<effect type="TechStatus" status="unobtainable">Tech</effect>
It might disable it without changing the status of the tech.
5) Creating your own techs
Finally you should know everything to create any basic tech so, here is where the first tutorial part of my guide starts.
In this tutorial we will be (eventually) creating 3 techs. Not going to write the tutorial now because the rest of the guide is more important and eventually the tutorial will only give you some basic ideas and that's not what I'm trying to achieve with this guide.
For now here are the 3 techs if you want to test yourself:
Tech 1
Create a tech that will be automatically researched if you are loki or thor and have 5 norse villagers on the map.
The effects will be norse villager hitpoints + 10, food cost - 10% and pierce attack + 20.
Tech 2
Create a tech that will turn all the villagers on the map into goats when you have 2 armories.
Tech 3
Create a tech that spawns a villager every 15 seconds if you have less than 10 villagers alive.
All these techs can be made without editing something else than the Techtree
In this tutorial we will be (eventually) creating 3 techs. Not going to write the tutorial now because the rest of the guide is more important and eventually the tutorial will only give you some basic ideas and that's not what I'm trying to achieve with this guide.
For now here are the 3 techs if you want to test yourself:
Tech 1
Create a tech that will be automatically researched if you are loki or thor and have 5 norse villagers on the map.
The effects will be norse villager hitpoints + 10, food cost - 10% and pierce attack + 20.
Tech 2
Create a tech that will turn all the villagers on the map into goats when you have 2 armories.
Tech 3
Create a tech that spawns a villager every 15 seconds if you have less than 10 villagers alive.
All these techs can be made without editing something else than the Techtree
Anim
I'm skipping this section for now.
Triggers
Triggers are in my opinion the most useful thing in AoM after the Proto. They can do everything the Techtree does and more but the only problem is that they are harder to process for your CPU and thus cause lag. But before we continue you will have to know about the different types of triggers and triggering. I think that atleast some of you know about the scenario triggers and have already or are about to skip this area because scenario modding is not what you want BUT this guide is not about that kind of triggering and neither about creating those triggers. For the experienced map scripters that are reading this, this is not about map triggers. This guide is about the victory conditions. Something most of you didn't even know it had triggers. Don't worry though it seems like 99% on AoMH never knew about it's powers neither.
In the thi section of this guide I will tell you everything you need to know about VC triggering but first the contents:
Contents: if you're not a noob then you could skip the first part (but I doubt you aren't a noob :P)
Noobs: Skills required: Skills Required: Proto Noob, Techtree Noob ,(Anim Noob)
1. What is VC triggering?
2. What is possible with VC triggers?
3. When should I use VC triggers?
4. Editing the VC
Intermediate: Skills Required: Triggers Noob
5. Creating your own rules
6. Debugging the VC
Expert:Skills Required: Proto Intermediate, Techtree Intermediate, Triggers Intermediate
7. Rule chaining
8. Combining Proto, Techtree and VC triggers
Data editor god: Skills required: Proto Expert, Techtree Expert, Triggers Expert
9. Creating advanced VC triggers
In the thi section of this guide I will tell you everything you need to know about VC triggering but first the contents:
Contents: if you're not a noob then you could skip the first part (but I doubt you aren't a noob :P)
Noobs: Skills required: Skills Required: Proto Noob, Techtree Noob ,(Anim Noob)
1. What is VC triggering?
2. What is possible with VC triggers?
3. When should I use VC triggers?
4. Editing the VC
Intermediate: Skills Required: Triggers Noob
5. Creating your own rules
6. Debugging the VC
Expert:Skills Required: Proto Intermediate, Techtree Intermediate, Triggers Intermediate
7. Rule chaining
8. Combining Proto, Techtree and VC triggers
Data editor god: Skills required: Proto Expert, Techtree Expert, Triggers Expert
9. Creating advanced VC triggers
1) What is VC scripting
VC triggering is mostly editing the basicvcnomain.xs but could also be any VC file you created as you can define for some maps what VC has to be used. In the basicvcnomain.xs you will see some code which looks a bit similar (Only a tiny bit) to coding languages like C++. Don't worry though the syntax is very similar with the Techtree. Instead of a tech name we have a rule name, instead of prereqs we have if statements and switches, instead of effects we have system calls and instead of opening and closing tags there are opening and closing brackets or also known as curly braces. Adding anything of above is what I call VC triggering. Not sure how the others call it since most of them are inactive now but they always seem to lurk around in AoMH.
2) What is possible with VC scripting?
At AoMH they're still finding out new trigger effects and normal triggers can be converted into a VC trigger so as long as AoMH continues with finding out new effects more will be possible. The VC seem to be a bit more limited than scenario triggers but this is also because of the knowledge about VC is very limited.
3) When should I use VC scripting?
As I already said if you want to replace your Techtree with VC triggers then that's possible but it would lag a lot. To avoid lag only use VC triggers if you want an effect that is not possible through Proto, Techtree or Anim. If that's the case then you should use VC triggering as the other data types cause less lag. Or if you want to look like a pro in the eyes of all noob modders that did not read this guide or section of course. Just make sure that it doesn't cause any lag.
4) Editing the VC
Now open the basicvcnomain.xs located in Age of Mythology\trigger2
If the file starts with this:
Now we're going to take a look at the basicVC1. I've added some comments to explain even more stuff.
Before we're going to edit the VC we need to know the basics of the language
{} opening closing brackets / curly braces. I don't think I need to explain this
== equal to
!= is not equal
> greater than
< less than
>= greater than or equal
<= less than or equal
if() checks if the expression inside is true for example
|| or
for example
Now we're going to add something to the VC. Go to this area of the code
If the file starts with this:
//==============================================================================
// BASICVC.xs
//
// A really, really simple victory condition script.
//==============================================================================
Then you've opened the right file.// BASICVC.xs
//
// A really, really simple victory condition script.
//==============================================================================
Now we're going to take a look at the basicVC1. I've added some comments to explain even more stuff.
rule BasicVC1// The name of the rule
minInterval 4// A rule always loops if it is active and this sets the smallest interval of the loop
maxInterval 5// Guess what this does
active// Sets the state of the rule, only inactive and active are allowed
// You can also define priority here 0-100 and tell the game to run the rule as soon as possible
// Example:
// Priority 32
// RunImmediately
{// Opening bracket/ curly brace
// never fire VCs instantly
if (trTimeMS() < 10000)// Checks if the ingame time in milliseconds is smaller than 10000 or 10 sconds
return;// if that's true it ends the rule here else it continues
int prevPlayer = xsGetContextPlayer();// Stores the current player
//Iterate over the players.
for (i=1; < cNumberPlayers)
{
xsSetContextPlayer(i);// Sets the current player
//Don't check players who have already lost
if (kbHasPlayerLost(i) == false)
{
int count = 0;
count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);// Searches for all units of player i (look at the for loop) that have the tag cUnitTypeLogicalTypeNeededForVictory, and are Alive.
//If we don't have any, this player is done.
if (count <= 0)
{
//trEcho("You have lost, Player #"+i+". You suxor.");// ES Devs having some fun
trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines
// Looks like it already is called synchronously as nothing in this code says it is so it is save to use this I guess.
}
}
}
xsSetContextPlayer(prevPlayer);
}// Closing bracket/ curly brace
minInterval 4// A rule always loops if it is active and this sets the smallest interval of the loop
maxInterval 5// Guess what this does
active// Sets the state of the rule, only inactive and active are allowed
// You can also define priority here 0-100 and tell the game to run the rule as soon as possible
// Example:
// Priority 32
// RunImmediately
{// Opening bracket/ curly brace
// never fire VCs instantly
if (trTimeMS() < 10000)// Checks if the ingame time in milliseconds is smaller than 10000 or 10 sconds
return;// if that's true it ends the rule here else it continues
int prevPlayer = xsGetContextPlayer();// Stores the current player
//Iterate over the players.
for (i=1; < cNumberPlayers)
{
xsSetContextPlayer(i);// Sets the current player
//Don't check players who have already lost
if (kbHasPlayerLost(i) == false)
{
int count = 0;
count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);// Searches for all units of player i (look at the for loop) that have the tag cUnitTypeLogicalTypeNeededForVictory, and are Alive.
//If we don't have any, this player is done.
if (count <= 0)
{
//trEcho("You have lost, Player #"+i+". You suxor.");// ES Devs having some fun
trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines
// Looks like it already is called synchronously as nothing in this code says it is so it is save to use this I guess.
}
}
}
xsSetContextPlayer(prevPlayer);
}// Closing bracket/ curly brace
Before we're going to edit the VC we need to know the basics of the language
{} opening closing brackets / curly braces. I don't think I need to explain this
== equal to
!= is not equal
> greater than
< less than
>= greater than or equal
<= less than or equal
if() checks if the expression inside is true for example
x = 1;
if ( x == 1)
&& andif ( x == 1)
|| or
for example
x = 1
y = 1
z = 1
if (x == 1&& y+1 = 2||z -1 == 0)
every line containing a system call needs to stop somewhere and that is done by adding ";" for example:y = 1
z = 1
if (x == 1&& y+1 = 2||z -1 == 0)
count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);
if statements do not require a ";".Now we're going to add something to the VC. Go to this area of the code
int count = 0;
count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);
/* Add the following */
trChatSend(0, "Number of units required for victory alive: "+count);// Now every time this code is run gaia will send "Number of units required for victory alive: " + the variable count which is 0 if someone is dead
//If we don't have any, this player is done.
if (count <= 0)
{
//trEcho("You have lost, Player #"+i+". You suxor.");// ES Devs having some fun
trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines
// Looks like it already is called synchronously as nothing in this code says it is so it is save to use this I guess.
}
count = count + kbUnitCount(i, cUnitTypeLogicalTypeNeededForVictory, cUnitStateAlive);
/* Add the following */
trChatSend(0, "Number of units required for victory alive: "+count);// Now every time this code is run gaia will send "Number of units required for victory alive: " + the variable count which is 0 if someone is dead
//If we don't have any, this player is done.
if (count <= 0)
{
//trEcho("You have lost, Player #"+i+". You suxor.");// ES Devs having some fun
trSetPlayerDefeated(i); // note that this func must be called synchronously on all machines
// Looks like it already is called synchronously as nothing in this code says it is so it is save to use this I guess.
}