Enhancements are a reoccurring element in GAE which are used in custom leveling, upgrades, effects, and emanations. They can be used to increase the abilities and stats of a unit. There are a few ways to do so.
Static modifiers and multipliersEdit
Static multipliers add a certain absolute value to the stat. Multipliers multiply the stat by a number (thus allowing you to, for example, increase the HP of units by 10% by multiplying it by 1.1). If both a static modifier and a multiplier are used, the multiplier takes effect first.
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. |
Point boostsEdit
Value | Description |
---|---|
<hp-boost> | Applies a one time HP boost to the current HP. |
<ep-boost> | Applies a one time EP boost to the current EP. |
AnalysisEdit
These tags represent very core data structures that drive many aspects of GAE's design. They are used for custom leveling, upgrades, effects, and emanations. On the implementation level, static modifiers are implemented in the C++ UnitStats class and multipliers are implemented in the EnhancementType class (a subclass of UnitStats). Because multiples of these may be applied to a unit, it's important to understand how they are valuated. Put briefly, multipliers are not multiplied against any other bonus, static modifier or multiplier, only against the base stat.
For the long explanation, the static modifiers and multipliers for every unit's level-ups, upgrades, effects and emanations are evaluated in the C++ member function Unit::recalculateStats(). All multipliers for a given stat are added together, rather than multiplied, and then the count minus one is subtracted.
Don't use negative values for multipliers, to apply a penalty set the multiplier to a number less than one, but still positive. For example, <sight value="0.5" /> halves a units sight.
The final multiplier is applied to the base stat only, and then static modifiers are added to that result.
Example oneEdit
A unit with max-hp 1000 is affected by two enhancements, the first has a max-hp multiplier of 1.5 and the second has a max-hp multiplier of 1.3, with these enhancements the unit's current max-hp is,
If multipliers were multiplied by each other, the total multiplier would be 1.95 () and successive multiplier bonuses or penalties would have an exponential effect, the 'multiplier adding' strategy outlined above avoids this problem.
Example twoEdit
If you have a unit with 500 max-hp (base stat), and it gets a static-modifier bonus of +50 and a multiplier bonus of * 1.5, this would look like:
If static modifier were added to the base stat for the multiplier was applied this would have been 825 (). This behavior is important to keep in mind when designing mods where very low stats have multipliers applied against them, because the effect will be nominal, despite any static modifier bonuses.
Example threeEdit
A unit with an attack skill of strength 125 has two levels, each providing a 1.2 multiplier to attack-strength, one upgrade affecting the unit provides a static-modifier of +25 to attack-strength. Using this attack skill the strength of an attack will be,
Now, suppose this unit gets struck by a special attack that leaves a detrimental effect on the unit which causes a 0.4 multiplier to attack-strength. The units current attack-strength with this skill is now:
Note: The above example assumes the Effect was applied with 1.0 strength, this strength factor may have been modified by distance from the center of a splash attack (with the <scale-splash-strength> flag set).