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 ]])
+
{{XMLs}}
 
 
 
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.
 
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.
  
 
+
{{TOC limit|2}}
  
 
==XML==
 
==XML==
 +
{{XML_definition_header}}
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
 
<?xml version="1.0" standalone="no"?>
 
<?xml version="1.0" standalone="no"?>
 
<tech-tree>
 
<tech-tree>
     <description value="my techtree" />
+
     <description value="my techtree"/>
 
     <attack-types>
 
     <attack-types>
         <attack-type name="attack1" />
+
         <attack-type name="attack1"/>
         <attack-type name="attack2" />
+
         <attack-type name="attack2"/>
 
     </attack-types>
 
     </attack-types>
 
     <armor-types>
 
     <armor-types>
         <armor-type name="armor1" />
+
         <armor-type name="armor1"/>
         <armor-type name="armor2" />
+
         <armor-type name="armor2"/>
 
     </armor-types>
 
     </armor-types>
 
     <damage-multipliers>
 
     <damage-multipliers>
         <damage-multiplier attack="attack1" armor="armor1" value="0.5" />
+
         <damage-multiplier attack="attack1" armor="armor1" value="0.5"/>
         <damage-multiplier attack="attack1" armor="armor2" value="1.25" />
+
         <damage-multiplier attack="attack1" armor="armor2" value="1.25"/>
 
     </damage-multipliers>
 
     </damage-multipliers>
 +
<!-- Start GAE Only -->
 +
<loading-screen>
 +
<background-image path="loading_screen.png" />
 +
</loading-screen>
 +
<!-- End GAE Only -->
 +
<!-- Start MG Only -->
 +
<!-- No need for loading-screen tag -->
 +
<!-- End MG Only -->
 
</tech-tree>
 
</tech-tree>
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 38: Line 46:
 
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.
 
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.
+
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. A more complex techtree might have as many as 10 different attack and armor types, with multipliers for each one, such as that of the [[Military/Attack_Types|Military mod]].
 +
 
 
===loading-screen===
 
===loading-screen===
MG does look for a loading screen which must be called <tt>loading_screen.*</tt> in the techtree folder.
+
A GAE only option which specifies a path to a loading screen. As of 0.4, it can only support a single image, but will later support shuffling through random images. If a [[XML/Faction|faction]] or [[scenario]] loading screen image is chosen, they will take priority over this one.
 +
 
 +
MG does not need this tag, as it always looks for a loading screen which must be called <tt>loading_screen.*</tt>.
  
 
==See Also==
 
==See Also==

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)