GAE/Upgrade XML
Upgrade
An upgrade is a "producible" type that a unit may produce to bring about changes in other units or pave the way for other units or upgrade to be produced. An upgrade may alter many stats of one or more unit types.
Being a producible type the root node should include all nodes as required by ProducibleType, RequirableType and DisplayableType,
<upgrade>
<image path="images/image.bmp"/>
<image-cancel path="images/cancel.bmp"/>
<time value="500"/>
<unit-requirements/>
<upgrade-requirements/>
<!-- Restrict an upgrade to only be available in a specific list of subfactions. If not supplied, the default is
all subfactions. If present, however, the default list is erased and the upgrade will only be available in
the subfactions you list. Note that the syntax for this is the same for units and commands. -->
<subfaction-restrictions>
<subfaction name="subfaction_name"/> <!-- The subfaction name defined in faction.xml or "base" (note that
the base faction, without having advance to a subfaction that you defined, is actually considered the
"base" subfaction. -->
</subfaction-restrictions>
<!-- Causes this upgrade to "advance" the subfaction from it's current state to the specified subfaction. This is
the node that essentially causes a faction to morph into an altered faction, or even a completely different
one. This tag can also be used on any unit or unit's command. If is-immediate is true, the change will
occur as soon as the upgrade is started, if false, then it will occur when the upgrade is completed. -->
<advances-to-subfaction name="subfaction_name" is-immediate="boolean"/>
<resource-requirements>
<resource name="a_resource" amount="50"/>
</resource-requirements>
<!-- . . . -->
</upgrade>
Lagacy/Deprecated style
(original Glest/early GAE upgrades),
<effects>
<unit name="unit_name"/> <!-- Units affected by the upgrade -->
</effects>
<max-hp value="0"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="0"/> <!-- Note Spelling; Minor bug -->
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="0"/>
<production-speed value="0"/>
Old GAE style
(single 'effect', uses legacy 'effects' node for units affected,
<static-modifiers>
<max-hp value="#"/> <!-- Maximum hit points -->
<max-ep value="#"/> <!-- Maximum energy points -->
<hp-regeneration value="#"/> <!-- HPs regenerated per second -->
<ep-regeneration value="#"/> <!-- EPs regenerated per second -->
<sight value="#"/> <!-- How many spaces the unit can see -->
<armor value="#"/> <!-- Armor rating (specifically, how many hit points are absorbed by an
attack) -->
<attack-strength value="#"/> <!-- How many HPs of damage are done by an attack -->
<effect-strength value="#"/> <!-- A multiplier applied to the effects that are generated by a unit. The
base amount is 100%. If an upgrade supplies (for example) 20 to this
field, it will add to the current effect-strength of the unit, resulting
in 120%, making all of their effects 20% more powerful than before. -->
<attack-percent-stolen value="#"/><!-- How much of the damage dealt by this unit will be transfered into the
unit's own hit points, healing them. -->
<attack-range value="#"/> <!-- The maximum distance the unit can attack enemy units from. -->
<move-speed value="#"/> <!-- Movement speed -->
<attack-speed value="#"/> <!-- Attack speed, the higher the number, the faster the attacks. -->
<production-speed value="#"/> <!-- How fast the unit is able to produce other units by either summoning,
creating, etc. or by building. -->
<repair-speed value="#"/> <!-- How fast the unit is able to repair other units. -->
<harvest-speed value="#"/> <!-- How fast the unit is able to harvest resources. -->
</static-modifiers>
<!-- Multipliers are make relative adjustments to a stat based upon it's current value. When more than one
multiplier are applied to a unit stats, the multipliers are first added together (i.e., multiplier1 - 1.0
+ multiplier2 - 1.0, etc.) and not multiplied together. The same stats specified in <static-modifiers> can be
modified under <multipliers>, except that you pass a multiplier instead of a static value. These nodes do not
accept value in percentage form (i.e., base 1.0 and not 100). -->
<multipliers>
<!-- As an example the below will add 25% to the unit's movement speed. If another upgrade, effect or
emanation also supplies a 25% bonus to movement speed, the total multiplier will be 1.5, or +50%, not 1.5625
(as 125% x 125% would result in). -->
<move-speed value="1.25"/>
</multipliers>
GAE 0.4+ style
In GAE 0.4 upgrades can be specify multiple sets of effects and the units the apply to (via names or tags).
<enhancements>
<enhancement>
<affects>
<unit name="worker" /> <!-- affect worker -->
<tag name="warriors" /> <!-- affect all units tagged 'warriors' -->
</affects>
<effects>
<!-- static-modifiers, multipliers & point-boosts, see GAE/Enhancement_XML -->
<cost-modifiers>
<resource name="stone" addition="-20" />
<resource name="wood" multiplier="1.2" />
</cost-modifiers>
<store-modifiers>
<resource name="gold" addition="600" />
<resource name="stone" addition="250" />
</store-modifiers>
</effects>
</enhancement>
<!-- . . . -->
</enhancements>
See also GAE/Common_XML#Producible_Type_XML_Elements.
Back to GAE XML Reference