XML/Commands

Commands are the actions that a unit can be given. Unlike skills, which are called by commands, commands are directly the result of user interaction. For example, an attack command can be called by the player to issue an attack on the foe. All commands require some types of skills, which they use to find information like speed or the model. }

Stop
The stop command does exactly as its name implies: it stops the unit and cancels their queue. If the unit isn't doing something, it automatically stops.

type
The type of the command, in this case, stop.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

stop-skill
The name of the stop skill to use.

Move
The move command is used to allow the unit to move from place to place.

type
The type of the command, in this case, move.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

move-skill
The name of the move skill to use.

Repair
The repair command is generally used for healing units of any kind, buildings or otherwise.

type
The type of the command, in this case, repair.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

move-skill
The name of the move skill to use.

repair-skill
The name of the repair skill to use.

repaired-units
A list of units that can be repaired with this command. If you have radically different units, such as buildings and regular units, you could make two repair skills, such as one that "heals" humanoids and one that "repairs" buildings.

Build
Build is used to construct buildings, with a given submenu. If you want multiple sub menus, use multiple buildings.

type
The type of the command, in this case, build.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

move-skill
The name of the move skill to use.

build-skill
The name of the build skill to use.

buildings
List of buildings that could be built with this command. These units should all have "be_built" skills.

start-sound
A list of sound files from which one will be randomly played whenever the unit starts building.

built-sound
A list of sound files from which one will be randomly played once the building is complete.

Harvest
Harvest commands are used for gathering resources, such as mining gold or chopping down trees.

type
The type of the command, in this case, harvest.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

move-skill
The name of the move skill to use.

harvest-skill
The name of the harvest skill to use.

stop-loaded-skill
The name of the stop skill to use when the unit stops after harvesting a full load. This is often different because they could be carrying the resource back.

move-loaded-skill
The name of the move skill to use when the unit moves after harvesting a full load. This is often different because they could be carrying the resource back.

harvested-resources
A list of the resources that the unit can harvest (only tech or tileset resources can be harvested).

max-load
Maximum number of the resource the unit can carry before it has to take it back to a building for storage.

hits-per-unit
The number of hits (skill cycles) that must be performed to get each unit of the resource.

Produce
The produce command is used to produce a new unit.

type
The type of the command, in this case, produce.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

produce-skill
The name of the produce skill to use.

produced-unit
The name of the unit to produce.

Upgrade
The upgrade command is used to initiate an upgrade.

type
The type of the command, in this case, upgrade.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

upgrade-skill
The name of the upgrade skill to use.

produced-upgrade
The name of the upgrade to initiate.

Morph
Similar to the produce command, but instead of making a new unit, the morph command converts the current unit into the new one. A unit can have a maximum of six morph commands.

type
The type of the command, in this case, morph.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

morph-skill
The name of the morph skill to use.

morph-unit
The name of the unit to morph into.

discount
The amount of the resources used to return after morphing, as a percentage from 0-100. 0 would mean you pay the full cost, 100 would mean that you are reimbursed the entire cost after morphing. Note that this is returned after morphing, so the initial resources are still needed.

ignore-resource-requirements
If this optional MegaGlest only value is true, the resource requirements of the morphed unit will be ignored (in other words, a free morph). Defaults to false.

Attack
The attack command is used to attack a foe. Most of the information is stored in its linked skill.

type
The type of the command, in this case, attack.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

move-skill
The name of the move skill to use.

attack-skill
The name of the attack skill to use.

Attack stopped
This is like an attack command, but instead of moving towards a foe, it stands still and attacks the foe when they are in range. This makes it useful for buildings which don't have a move skill, and for units in the form of a hold position command.

type
The type of the command, in this case, attack_stopped.

name
The name of the command, as seen ingame.

image
Path to the image which will be used as an icon to initiate the command.

unit-requirements
A list of units that must exist before this command can be used. For example, you might have to construct a testing lab before you can start throwing grenades.

upgrade-requirements
A list of upgrades that must exist before this command can be used. For example, you might have to perform a training field upgrade before you could use a more advanced skill.

stop-skill
The name of the stop skill to use.

attack-skill
The name of the attack skill to use.