XML/Upgrade

From MegaGlest
(Redirected from Upgrade name.xml)
Jump to: navigation, 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[edit]

<?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[edit]

image[edit]

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

image-cancel[edit]

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

time[edit]

The time it takes to perform an action.

unit-requirements[edit]

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

upgrade-requirements[edit]

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

resource-requirements[edit]

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

effects[edit]

If the upgrade is to increase stats, this is a list of units that will have their stats modified.

max-hp[edit]

In a stat increasing upgrade, how much to increase the maximum HP by. 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[edit]

In a stat increasing upgrade, how much to increase the maximum EP by. 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[edit]

In a stat increasing upgrade, how much to increase the sight by. 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[edit]

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. 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[edit]

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. 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[edit]

In a stat increasing upgrade, how much to increase armor by. 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[edit]

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. 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[edit]

In a stat increasing upgrade, how much to increase the speed on produce, upgrade, and morph skills. 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[edit]