GAE/Upgrades

From MegaGlest
Revision as of 19:38, 27 June 2011 by Hofmic (talk) (More realistic example. A point boost to a unit without any max EP wouldn't work)
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. See GAE/Enhancements for a full list.

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 EP 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"/>
    <time value="300"/>
    <resource-requirements>
        <resource name="gold" amount="200"/>
    </resource-requirements>
    <effects>
        <unit name="guard"/>
    </effects>
    <static-modifiers>
        <max-ep value="20"/>
    </static-modifiers>
    <multipliers>
        <move-speed value="1.2"/>
    </multipliers>
    <point-boosts>
        <ep-boost value="20"/>
    </point-boosts>
</upgrade>

See also