XML/Techtree

From MegaGlest
Revision as of 13:58, 26 March 2011 by Hofmic (talk) (Internal links, formatting, intro paragraph)
Jump to: navigation, search

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 forks of Glest.

XML Definition

<?xml version="1.0" standalone="no"?>

<tech-tree>
    <description value="experimental tech tree"/>
    <attack-types>          <!--naming types of attacks -->
        <attack-type name="sword"/>
        <attack-type name="arrow"/>
        <attack-type name="magic"/>	
    </attack-types>
    <armor-types>           <!--naming types of armor -->
        <armor-type name="leather"/>
        <armor-type name="plate"/>
        <armor-type name="stone"/>
        <armor-type name="wood"/>
        <armor-type name="organic"/>
    </armor-types>
    <damage-multipliers>    <!--attack vs armor multipliers -->
        <damage-multiplier attack="arrow" armor="plate" value="0.5"/>
        <damage-multiplier attack="arrow" armor="leather" value="1.3"/>
        <damage-multiplier attack="arrow" armor="stone" value="0.3"/>
        <damage-multiplier attack="magic" armor="plate" value="0.8"/>
        <damage-multiplier attack="magic" armor="stone" value="0.5"/>
        <damage-multiplier attack="sword" armor="stone" value="0.5"/>	
    </damage-multipliers>
</tech-tree>

See Also