GAE/Upgrades

From MegaGlest
Revision as of 06:26, 27 April 2011 by Hofmic (talk) (Added point boosts to the example too)
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.

Point boosts

Point boosts work like max-ep and max-hp, but instead of increasing the maximum, they increase the current. This makes it possible for a unit without EP regeneration to gain one time use EP. Each of these use a single value attribute to define how much to boost by, which must be a positive number. The two possible tags are <ep-boost /> and <hp-boost />. These are both a child of <point-boosts>.

Example

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

<?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>
    <point-boosts>
        <ep-boost value="20"/>
    </point-boosts>
</upgrade>

See also