Adding custom effects
From AgeofWiki
| Table of contents |
Introduction
AoE3 uses AoM TT's effects/conditions, and more newer ones. So it is possible to add new effects and conditions to the editor.
Step 1: Opening The File
First, you need to unmake aoe3's typtest.xml read-only. To do this, simply go to C:/ProgramFiles/MicrosoftGames/AgeofEmiresIII/Trigger and right click on typetest.xml and hit properties. At the bottom of the window that pops up, uncheck the read only. Now open up the typetest.xml.
Step 2: Copying, Pasting
For this guide, I will be using the QV set stat value. Highlight all the contents of the QV set stat value, right click and copy it. Now, open AoE3's typetest.xml. Scroll all the way down to the bottom of the page and paste it under the last </Effect> line. Make sure that it looks like this:
<Effect name="Show SPC Note">
<Param name="Title" dispName="$$37025$$Title" VarType="stringid">Default</Param>
<Param name="Text" dispName="$$22531$$Text" VarType="stringid">Default</Param>
<Command>trShowSPCNote("%Title%", "%Text%");</Command>
</Effect>
<Effect name="QV Set Stat Value">
<Param name="QVName" dispName="Var Name" VarType="string">QV1</Param>
<Param name="PlayerID" dispName="$$22534$$Fake Player" VarType="player">1</Param>
<Param name="StatID" dispName="$$25424$$Stat Type" VarType="kbstat">0</Param>
<Command>trQuestVarSet("%QVName%", trGetStatValue(%PlayerID%, %StatID%));</Command>
</Effect>
</Effects>
</trigger>
Make sure that the <Param> Lines are under the <Effect name=Qv Set Stat Value>'s last t in the Effect part and that the last </Effect> is above the </Effects>'s C. When done, delete the numbers that start and end with $$. Save.
Closing
Well, there you have it! You have just added a new effect to the typtest.xml. You can do the same thing with conditions, just put the condition in the conditions section of the typtest.xml!
