XML/Upgrade

From MegaGlest
Revision as of 03:12, 10 October 2019 by Titi (talk | contribs)
Jump to navigation Jump to search

(Back to XML Overview )

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

<?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"/>
	</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"/>
	<max-hp value="0" regeneration="0" value-percent-multiplier="false" />
	<max-ep value="0" regeneration="0" value-percent-multiplier="false" />
	<sight value="0" value-percent-multiplier="false" />
	<attack-strenght value="0" value-percent-multiplier="false" />
	<attack-range value="0" value-percent-multiplier="false" />
	<armor value="0" value-percent-multiplier="false" />
	<move-speed value="0" value-percent-multiplier="false" />
	<production-speed value="0" value-percent-multiplier="false" />
</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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier 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-multiplier is false, then the number is static, meaning it increases or decreases by the amount specified.


See also