Archive/Glest Advanced Engine
Effects & Upgrades is a tentative name for a code patch that extends upon the existing framework for upgrades and adds the the ability to cause temporary effects on a unit. The code is currently in pre-alpha state.
Upgrades
The upgrade xml format is extended while retaining legacy support for existing upgrades. The new format cleans up the xml file somewhat by not requiring you to have nodes present for attributes your upgrade does not effect, while extending upon the number of attributes you can modify with an upgrade. In addition, attributes can be modified using a multiplier as well as a static value, allowing you to scale the effect across units of varying power.
The following is a sample upgrade.xml file which does the exact same thing as the existing "Energy Sharpening" upgrade.
<?xml version="1.0" standalone="no"?>
<upgrade>
<image path="images/energy_sharpening.bmp"/>
<image-cancel path="../ancient_summoning/images/magic_upgrade_cancel.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<resource-requirements>
<resource name="gold" amount="250"/>
<resource name="wood" amount="200"/>
<resource name="stone" amount="150"/>
</resource-requirements>
<effects>
<unit name="battlemage"/>
<unit name="summoner"/>
<unit name="archmage"/>
</effects>
<static-modifiers>
<attack-strength value="50"/>
<attack-range value="1"/>
</static-modifiers>
<multipliers/>
</upgrade>
You will nodes under <static-modifiers> and <multipliers> are optional. If you wanted to increase the attack strength by 30% instead, you would use the following code for the static-modifiers and multipliers tags.
<static-modifiers>
<attack-range value="1"/>
</static-modifiers>
<multipliers>
<attack-strength value="1.3"/>
</multipliers>
Effects
Attribute List
The following is a complete list of all attributes that can be modified by either a static amount or a multiplier. Static values take a positive or negative number and default to zero (no modification). Multipliers take a floating point number, the default to 1.0 (multiply by one, or no modification). Note that this is not notated as a percentage. If you enter 100.0 for a multiplier, it means that the value increases 100 times.
<max-hp> <max-ep> <hp-regen> <ep-regen> <sight> <armor> <attack-strength> <attack-range> <move-speed> <attack-speed> <!-- increases of decreases rate of attack --%gt <production-speed>