The Glest Wiki
The Glest Wiki
Engines_icons.png This article documents Glest, GAE, and MegaGlest

This is noted in the colored backgrounds, which denote lines as being engine specific. See the key below.[Editing help]

v  d  e


An upgrade is a one time event which may be executed by a unit via the upgrade command. Once done once, they can never be done again in that game. Upgrades could be used to increase the stats of units, or, by setting a unit to require an upgrade, they can be used as an "unlocking" (or researching) method. The name of the XML will be the name of the upgrade, and must match the name of the folder it is placed in.

XML[]

GAE Only
GAE and MegaGlest Only
<?xml version="1.0" standalone="no"?>
<upgrade>
	<image path="images/image.bmp"/>
	<image-cancel path="images/cancel.bmp"/>
	<time value="500"/>
	<unit-requirements>
		<unit name="unit_name"/>
		<!-- Start GAE Only -->
		<tag name="buildings" />
		<!-- End GAE Only -->
	</unit-requirements>
	<upgrade-requirements>
		<upgrade name="upgrade_name"/>
	</upgrade-requirements>
	<resource-requirements>
		<resource name="resource_name" amount="#"/>
	</resource-requirements>
	<effects>
		<unit name="unit_name"/>
	</effects>
	<max-hp value="0"/>
	<max-ep value="0"/>
	<sight value="0"/>
	<attack-strenght value="0"/>
	<attack-range value="0"/>
	<armor value="0"/>
	<move-speed value="0"/>
	<production-speed value="0"/>
	<!-- Start MG Only -->
	<max-hp value="0" regeneration="0" value-percent-multipler="false" />
	<max-ep value="0" regeneration="0" value-percent-multipler="false" />
	<sight value="0" value-percent-multipler="false" />
	<attack-strenght value="0" value-percent-multipler="false" />
	<attack-range value="0" value-percent-multipler="false" />
	<armor value="0" value-percent-multipler="false" />
	<move-speed value="0" value-percent-multipler="false" />
	<production-speed value="0" value-percent-multipler="false" />
	<!-- End MG Only -->
	<!-- Start GAE Only -->
	<enhancements>
		<enhancement>
			<affects>
				<unit name="worker" />
				<tag name="buildings" />
			</affects>
			<effects>
				<static-modifiers>
					<max-hp value="0"/>
					<max-ep value="0"/>
					<hp-regeneration value="0"/>
					<ep-regeneration value="0"/>
					<sight value="0"/>
					<armor value="0"/>
					<attack-strength value="0"/>
					<effect-strength value="0"/>
					<attack-percent-stolen value="0"/>
					<attack-range value="0"/>
					<move-speed value="0"/>
					<attack-speed value="0"/>
					<production-speed value="0"/>
					<repair-speed value="0"/>
					<harvest-speed value="0"/>
				</static-modifiers>
				<multipliers>
					<max-hp value="1"/>
					<max-ep value="1"/>
					<hp-regeneration value="1"/>
					<ep-regeneration value="1"/>
					<sight value="1"/>
					<armor value="1"/>
					<attack-strength value="1"/>
					<effect-strength value="1"/>
					<attack-percent-stolen value="1"/>
					<attack-range value="1"/>
					<move-speed value="1"/>
					<attack-speed value="1"/>
					<production-speed value="1"/>
					<repair-speed value="1"/>
					<harvest-speed value="1"/>
				</multipliers>
				<point-boosts>
					<hp-boost value="0"/>
					<ep-boost value="0"/>
				</point-boosts>
				<cost-modifiers>
					<resource name="resource_name" addition="0" />
					<resource name="resource_name" multiplier="1" />
				</cost-modifiers>
				<store-modifiers>
					<resource name="resource_name" addition="0" />
					<resource name="resource_name" multiplier="1" />
				</store-modifiers>
			</effects>
		</enhancement>
	</enhancements>
	<static-modifiers>
		<max-hp value="0"/>
		<max-ep value="0"/>
		<hp-regeneration value="0"/>
		<ep-regeneration value="0"/>
		<sight value="0"/>
		<armor value="0"/>
		<attack-strength value="0"/>
		<effect-strength value="0"/>
		<attack-percent-stolen value="0"/>
		<attack-range value="0"/>
		<move-speed value="0"/>
		<attack-speed value="0"/>
		<production-speed value="0"/>
		<repair-speed value="0"/>
		<harvest-speed value="0"/>
	</static-modifiers>
	<multipliers>
		<max-hp value="1"/>
		<max-ep value="1"/>
		<hp-regeneration value="1"/>
		<ep-regeneration value="1"/>
		<sight value="1"/>
		<armor value="1"/>
		<attack-strength value="1"/>
		<effect-strength value="1"/>
		<attack-percent-stolen value="1"/>
		<attack-range value="1"/>
		<move-speed value="1"/>
		<attack-speed value="1"/>
		<production-speed value="1"/>
		<repair-speed value="1"/>
		<harvest-speed value="1"/>
	</multipliers>
	<point-boosts>
		<hp-boost value="0"/>
		<ep-boost value="0"/>
	</point-boosts>
	<subfaction-restrictions>
		<subfaction name="subfaction_name"/>
	</subfaction-restrictions>
	<advances-to-subfaction name="subfaction_name" is-immediate="false"/>
	<!-- End GAE Only -->
</upgrade>

Documentation[]

image[]

The path to the image that will be used as an button for that upgrade.

image-cancel[]

The path to the image that will be used as a cancel button to stop the upgrade.

time[]

The time it takes to perform an action.

unit-requirements[]

A list of units that are required before the upgrade can be commenced.

upgrade-requirements[]

A list of other upgrades that are required before the upgrade can be commenced.

resource-requirements[]

The resources consumed to perform the upgrade. These will not be returned unless the upgrade is canceled.

effects[]

If the upgrade is to increase stats, this is a list of units that will have their stats modified. GAE can use tags as well, which make the upgrade effect all units with that tag specified in their unit XML. Depreciated in GAE for the enhancements version.

max-hp[]

In a stat increasing upgrade, how much to increase the maximum HP by. Depreciated in GAE. In MegaGlest, a regenation attribute controls the HP regeneration. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

max-ep[]

In a stat increasing upgrade, how much to increase the maximum EP by. Depreciated in GAE. In MegaGlest, a regenation attribute controls the EP regeneration. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

sight[]

In a stat increasing upgrade, how much to increase the sight by. Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

attack-strenght[]

In a stat increasing upgrade, how much to increase the strength of all attacks by. Note the slight spelling error, which must be done in order to allow the tag to be recognized. GAE is able to substitute this with the properly spelled "attack-strength". Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

attack-range[]

In a stat increasing upgrade, how much to increase the range of all attacks by. Note that this can backfire if a unit has a ranged and a melee attack, since it will increase the range of both, so the unit could use its melee attack without even touching the foe. Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

armor[]

In a stat increasing upgrade, how much to increase armor by. Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

move-speed[]

In a stat increasing upgrade, how much to increase the move speed by. Note that this affects all move skills, so if using different move skills for different commands, it could backfire. Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

production-speed[]

In a stat increasing upgrade, how much to increase the speed on produce, upgrade, and morph skills. Depreciated in GAE. If the value-percent-multipler is true, the number is a percentage (where 100 is the same as no multiplier, 200 is the same as a doubling the stat, and 50 is the same as halving the stat). If value-percent-multipler is false, then the number is static, meaning it increases or decreases by the amount specified.

enhancements[]

This feature is only available in version 0.4 and later. The current way to boost stats in GAE is with enhancements, special elements that allow an upgrade to affect multiple different units differently. This is done with a parent <enhancements> element which contains as many child <enhancement> elements. These enhancement elements each contain their own <affects> element (same function as the affect element listed above, but can also be applied to tags, which will affect all units who had that tag applied to them in the unit XML), and then contain elements that are able to raise the unit's stats. Note that all elements besides affects are optional, so if a boost in that skill is not used, don't include the element at all. There's a few different kinds of boosts:

static-modifiers[]

Main article: GAE/Upgrades

Stats that are modified statically go up or down by a set amount for all affected units. The tag can be used outside of the enhancements tag, using the original affects tag, but this is depreciated. GAE Only.

Possible modifications:

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.

multipliers[]

Main article: GAE/Upgrades

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. The tag can be used outside of the enhancements tag, using the original affects tag, but this is depreciated. The available values are in the table above. GAE Only.

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>. The tag can be used outside of the enhancements tag, using the original affects tag, but this is depreciated. GAE only.

cost-modifiers[]

Working like static modifiers and multipliers, cost modifiers can change the resource cost of units. There can be as many children <resource> tags as you want, and each one lists the name of the resource to modify, and one of either an addition attribute or a multiplier attribute, which can either decrease or increase the unit's costs.

store-modifiers[]

Almost the same thing as cost-modifiers, store modifiers use the same syntax, with the resource name and an addition or multiplier attribute, but instead of modifying the resource costs, they modify what resources and how much the unit can hold.

subfaction-restriction[]

If the upgrade can only be commenced while in a certain subfaction, this tag is used. The only attribute is the name of the subfaction. GAE only.

advances-to-subfaction[]

If true, this upgrade will advance the faction into the specified subfaction. If is-immediate is false, the faction will advance into the subfaction after the upgrade is complete. If it's true, it advances into the subfaction the moment the upgrade starts. GAE only.

See also[]