GAE/Upgrades

From MegaGlest
Revision as of 22:40, 26 April 2011 by Hofmic (talk) (Created.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The upgrade XML in GAE is also cleaned up and expanded a bit. All tags are now optional, thus allowing you to skip those which you do not use. The biggest change is the addition of the static-modifier and multiplier tags, which allow you to better define how unit's stats are modified as well as which stats can be modified.

Static-modifiers

Stats that are modified statically go up or down by a set amount for all effected units. This is basically the old upgrade system.

Multipliers

Multiplied stats are multiplied by a number instead of being increased or decreased by a set amount. Instead of increasing a wide variety of unit's attack by a certain, set amount which may or may not be accurate for their abilities, you can increase it by a percentage. For example, you could give them a static multiplier if 1.1 for attack, which means a 10% increase. This helps ensure that a wide variety of units get their stats raised proportionally instead of by fixed values. This is multiplied as it is, and not a percentage, thus a multiplier of 2 would double that stat, while a multiplier of 0.5 would half it.

Stats

As previously mentioned, there's more stats that can be modified as well. A full list is as follows:

Value Description
<max-hp> Modifies the maximum HP.
<hp-regen> Modifies the HP regeneration rate.
<max-ep> Modifies the maximum EP.
<ep-regen> Modifies the EP regeneration rate.
<sight> Modifies the unit's sight.
<armor> Modifies the unit's armor strength.
<attack-strength> Modifies the unit's attack strength.
<attack-range> Modifies the unit's attack ragen.
<attack-speed> Modifies the unit's attack speed.
<move-speed> Modifies the speed the unit moves at.
<production-speed> Modifies the production speed (speed of creating units or morphing).
<repair-speed> Modifies the speed of the repair skill.
<harvest-speed> Modifies the speed of the harvest skill.
<effect-strength> Modifies the strength of effects.

These can all be children of the <static-modifiers> or <multipliers> tags, and have a single "value" attribute each which defines how much to increase, decrease, or multiply by.

Example

In this example, the guard's attack strength is boosted by +20, and his move speed increases by 20%.

<?xml version="1.0" standalone="no"?>
<upgrade>
    <image path="image.bmp"/>
    <image-cancel path="image.bmp"/>
    
    <resource-requirements>
        <resource name="gold" amount="200"/>
    </resource-requirements>
    <effects>
        <unit name="guard"/>
    </effects>
    <static-modifiers>
        <attack-strength value="20"/>
    </static-modifiers>
    <multipliers>
        <move-speed value="1.2"/>
    </multipliers>
</upgrade>

See also