Editing XML/Techtree

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
([[XML|Back to XML Overview ]])
+
<?xml version="1.0" standalone="no"?>
 
+
The [[techtree]] [[XML]] is placed in the root folder of a [[techtree]], and stores all the attack and armor types, as well as the damage multipliers that result from them. The techtree XML is the same among all [[Engines|forks]] of Glest.
+
<tech-tree>
 
+
    <description value="experimental tech tree"/>
 
+
    <attack-types>          <font color="green">&lt;!--naming types of attacks --&gt;</font>
 
+
        <attack-type name="sword"/>
==XML==
+
        <attack-type name="arrow"/>
<syntaxhighlight lang="xml">
+
        <attack-type name="magic"/>
<?xml version="1.0" standalone="no"?>
+
    </attack-types>
<tech-tree>
+
    <armor-types>          <font color="green">&lt;!--naming types of armor --&gt;</font>
    <description value="my techtree" />
+
        <armor-type name="leather"/>
    <attack-types>
+
        <armor-type name="plate"/>
        <attack-type name="attack1" />
+
        <armor-type name="stone"/>
        <attack-type name="attack2" />
+
        <armor-type name="wood"/>ti
    </attack-types>
+
        <armor-type name="organic"/>
    <armor-types>
+
    </armor-types>
        <armor-type name="armor1" />
+
    <static-modifiers>    <font color="green">&lt;!--attack vs armor static modifiers (note to Daniel.santos: i noticed you deleted the static modifiers. I'm not sure you are aware that they actually work. I tried them and apparently they work for me. --&gt;</font>
        <armor-type name="armor2" />
+
        <static-modifier attack="arrow" armor="plate" value="-1"/>
    </armor-types>
+
    </static-modifiers>
    <damage-multipliers>
+
    <damage-multipliers>   <font color="green">&lt;!--attack vs armor multipliers --&gt;</font>
        <damage-multiplier attack="attack1" armor="armor1" value="0.5" />
+
        <damage-multiplier attack="arrow" armor="plate" value="0.5"/>
        <damage-multiplier attack="attack1" armor="armor2" value="1.25" />
+
        <damage-multiplier attack="arrow" armor="leather" value="1.3"/>
    </damage-multipliers>
+
        <damage-multiplier attack="arrow" armor="stone" value="0.3"/>
</tech-tree>
+
        <damage-multiplier attack="magic" armor="plate" value="0.8"/>
</syntaxhighlight>
+
        <damage-multiplier attack="magic" armor="stone" value="0.5"/>
 
+
        <damage-multiplier attack="sword" armor="stone" value="0.5"/>
==Documentation==
+
    </damage-multipliers>
===description===
+
</tech-tree>
Unused, but meant to be a short name for the techtree. Unlikely to ever be used in the future.
 
 
 
===attack-types===
 
A list of attack type names. These are the names you can give attack skills in the [[Unit XML]], and will be used to create damage multipliers.
 
 
 
===armor-types===
 
A list of armor type names. These are the names you can give each unit's armor (each unit must have a type) and will be used to create damage multipliers.
 
 
 
===damage-multipliers===
 
A list of multipliers for the different damage types. If the attack and armor type match, the damage will be multiplied by that amount. For example, if one attack type is "arrow", it might not be very effective against units who have the armor type "stone". Thus, we might give it a multiplier of 0.5, which halves our damage. However, if this arrow is very effective against leather armor, we might increase the damage it can do against leather by giving it a multiplier of 1.25, doing 25% (one quarter) more damage.
 
 
 
You can have as many damage multipliers, attack types, and armor types as you want. However, attack and armor types referenced in the damage multipliers tag, as well as in the unit XML must exist here.
 
===loading-screen===
 
MG does look for a loading screen which must be called <tt>loading_screen.*</tt> in the techtree folder.
 
 
 
==See Also==
 
*[[XMLs]]
 
*[[Techtrees]]
 
[[Category:XMLs]]
 

Please note that all contributions to MegaGlest are considered to be released under the Creative Commons Attribution Share Alike (see MegaGlest:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)