Difference between revisions of "XML/Commands"
(This iinshgt's just the way to kick life into this debate.) |
(→unit) |
||
(23 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
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. | 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== | ==Stop== | ||
Line 8: | Line 7: | ||
<command> | <command> | ||
<type value="stop" /> | <type value="stop" /> | ||
− | <name value="stop | + | <name value="stop" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 23: | Line 22: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, stop | + | The type of the command, in this case, stop. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 44: | Line 43: | ||
<command> | <command> | ||
<type value="move" /> | <type value="move" /> | ||
− | <name value="move | + | <name value="move" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 59: | Line 58: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, move | + | The type of the command, in this case, move. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 80: | Line 79: | ||
<command> | <command> | ||
<type value="repair" /> | <type value="repair" /> | ||
− | <name value="repair | + | <name value="repair" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 99: | Line 98: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, repair | + | The type of the command, in this case, repair. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 126: | Line 125: | ||
<command> | <command> | ||
<type value="build" /> | <type value="build" /> | ||
− | <name value="build | + | <name value="build" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 137: | Line 136: | ||
<build-skill value="build_skill"/> | <build-skill value="build_skill"/> | ||
<buildings> | <buildings> | ||
− | <building name="building_name | + | <building name="building_name" /> |
</buildings> | </buildings> | ||
<start-sound enabled="true"> | <start-sound enabled="true"> | ||
Line 151: | Line 150: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, build | + | The type of the command, in this case, build. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 172: | Line 171: | ||
===buildings=== | ===buildings=== | ||
− | List of buildings that could be built with this command. These units should all have "be_built" [[skills]] | + | List of buildings that could be built with this command. These units should all have "be_built" [[skills]]. |
===start-sound=== | ===start-sound=== | ||
Line 184: | Line 183: | ||
<command> | <command> | ||
<type value="harvest" /> | <type value="harvest" /> | ||
− | <name value="harvest | + | <name value="harvest" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 207: | Line 206: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, harvest | + | The type of the command, in this case, harvest. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 224: | Line 223: | ||
The name of the move skill to use. | The name of the move skill to use. | ||
− | + | ===harvest-skill=== | |
− | + | The name of the harvest skill to use. | |
===stop-loaded-skill=== | ===stop-loaded-skill=== | ||
Line 246: | Line 245: | ||
<command> | <command> | ||
<type value="produce" /> | <type value="produce" /> | ||
− | <name value="produce | + | <name value="produce" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 256: | Line 255: | ||
<produce-skill value="produce_skill" /> | <produce-skill value="produce_skill" /> | ||
<produced-unit name="my_unit" /> | <produced-unit name="my_unit" /> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</command> | </command> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 267: | Line 261: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, produce | + | The type of the command, in this case, produce. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 286: | Line 280: | ||
===produced-unit=== | ===produced-unit=== | ||
The name of the unit to produce. | The name of the unit to produce. | ||
− | |||
− | |||
− | |||
==Upgrade== | ==Upgrade== | ||
Line 294: | Line 285: | ||
<command> | <command> | ||
<type value="upgrade" /> | <type value="upgrade" /> | ||
− | <name value="upgrade | + | <name value="upgrade" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 304: | Line 295: | ||
<upgrade-skill value="upgrade_skill" /> | <upgrade-skill value="upgrade_skill" /> | ||
<produced-upgrade name="my_upgrade" /> | <produced-upgrade name="my_upgrade" /> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</command> | </command> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 315: | Line 301: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, upgrade | + | The type of the command, in this case, upgrade. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 334: | Line 320: | ||
===produced-upgrade=== | ===produced-upgrade=== | ||
The name of the upgrade to initiate. | The name of the upgrade to initiate. | ||
− | |||
− | |||
− | |||
==Morph== | ==Morph== | ||
Line 342: | Line 325: | ||
<command> | <command> | ||
<type value="morph" /> | <type value="morph" /> | ||
− | <name value="morph | + | <name value="morph" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 352: | Line 335: | ||
<morph-skill value="morph_skill" /> | <morph-skill value="morph_skill" /> | ||
<morph-unit name="my_unit" /> | <morph-unit name="my_unit" /> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<discount value="0" /> | <discount value="0" /> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!-- Start MG Only --> | <!-- Start MG Only --> | ||
<ignore-resource-requirements value="false" /> | <ignore-resource-requirements value="false" /> | ||
Line 373: | Line 345: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, morph | + | The type of the command, in this case, morph. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 393: | Line 365: | ||
The name of the unit to morph into. | The name of the unit to morph into. | ||
− | |||
− | |||
===discount=== | ===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. | 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=== | ===ignore-resource-requirements=== | ||
Line 412: | Line 376: | ||
<command> | <command> | ||
<type value="attack" /> | <type value="attack" /> | ||
− | <name value="attack | + | <name value="attack" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 422: | Line 386: | ||
<move-skill value="move_skill" /> | <move-skill value="move_skill" /> | ||
<attack-skill value="attack_skill" /> | <attack-skill value="attack_skill" /> | ||
− | + | <unit value="unit_toSpawn" amount="0" spawnAtTarget="false"> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</command> | </command> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 437: | Line 393: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, attack | + | The type of the command, in this case, attack. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 456: | Line 412: | ||
===attack-skill=== | ===attack-skill=== | ||
The name of the attack skill to use. | The name of the attack skill to use. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==Attack stopped== | ==Attack stopped== | ||
Line 466: | Line 417: | ||
<command> | <command> | ||
<type value="attack_stopped" /> | <type value="attack_stopped" /> | ||
− | <name value="attack_stopped | + | <name value="attack_stopped" /> |
<image path="images/image.bmp" /> | <image path="images/image.bmp" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 476: | Line 427: | ||
<stop-skill value="stop_skill" /> | <stop-skill value="stop_skill" /> | ||
<attack-skill value="attack_skill" /> | <attack-skill value="attack_skill" /> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</command> | </command> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 491: | Line 433: | ||
===type=== | ===type=== | ||
− | The type of the command, in this case, attack_stopped | + | The type of the command, in this case, attack_stopped. |
===name=== | ===name=== | ||
− | The name of the command, as seen ingame | + | The name of the command, as seen ingame. |
===image=== | ===image=== | ||
Line 510: | Line 452: | ||
===attack-skill=== | ===attack-skill=== | ||
The name of the attack skill to use. | The name of the attack skill to use. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==See also== | ==See also== |
Latest revision as of 22:55, 14 April 2021
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[edit]
<command>
<type value="stop" />
<name value="stop" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<stop-skill value="stop_skill" />
</command>
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[edit]
The type of the command, in this case, stop.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the stop skill to use.
Move[edit]
<command>
<type value="move" />
<name value="move" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<move-skill value="move_skill" />
</command>
The move command is used to allow the unit to move from place to place.
type[edit]
The type of the command, in this case, move.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the move skill to use.
Repair[edit]
<command>
<type value="repair" />
<name value="repair" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<move-skill value="move_skill" />
<repair-skill value="repair_skill" />
<repaired-units>
<unit name="my_unit" />
</repaired-units>
</command>
The repair command is generally used for healing units of any kind, buildings or otherwise.
type[edit]
The type of the command, in this case, repair.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the move skill to use.
repair-skill[edit]
The name of the repair skill to use.
repaired-units[edit]
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[edit]
<command>
<type value="build" />
<name value="build" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<move-skill value="move_skill"/>
<build-skill value="build_skill"/>
<buildings>
<building name="building_name" />
</buildings>
<start-sound enabled="true">
<sound-file path="sounds/sound_file.wav"/>
</start-sound>
<built-sound enabled="false"/>
<sound-file path="sounds/sound_file.wav"/>
</built-sound>
</command>
Build is used to construct buildings, with a given submenu. If you want multiple sub menus, use multiple buildings.
type[edit]
The type of the command, in this case, build.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the move skill to use.
build-skill[edit]
The name of the build skill to use.
buildings[edit]
List of buildings that could be built with this command. These units should all have "be_built" skills.
start-sound[edit]
A list of sound files from which one will be randomly played whenever the unit starts building.
built-sound[edit]
A list of sound files from which one will be randomly played once the building is complete.
Harvest[edit]
<command>
<type value="harvest" />
<name value="harvest" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<move-skill value="move_skill"/>
<harvest-skill value="harvest_skill"/>
<stop-loaded-skill value="stop_skill"/>
<move-loaded-skill value="move_skill"/>
<harvested-resources>
<resource name="resource"/>
</harvested-resources>
<max-load value="25"/>
<hits-per-unit value="1"/>
</command>
Harvest commands are used for gathering resources, such as mining gold or chopping down trees.
type[edit]
The type of the command, in this case, harvest.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the move skill to use.
harvest-skill[edit]
The name of the harvest skill to use.
stop-loaded-skill[edit]
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[edit]
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[edit]
A list of the resources that the unit can harvest (only tech or tileset resources can be harvested).
max-load[edit]
Maximum number of the resource the unit can carry before it has to take it back to a building for storage.
hits-per-unit[edit]
The number of hits (skill cycles) that must be performed to get each unit of the resource.
Produce[edit]
<command>
<type value="produce" />
<name value="produce" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<produce-skill value="produce_skill" />
<produced-unit name="my_unit" />
</command>
The produce command is used to produce a new unit.
type[edit]
The type of the command, in this case, produce.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the produce skill to use.
produced-unit[edit]
The name of the unit to produce.
Upgrade[edit]
<command>
<type value="upgrade" />
<name value="upgrade" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<upgrade-skill value="upgrade_skill" />
<produced-upgrade name="my_upgrade" />
</command>
The upgrade command is used to initiate an upgrade.
type[edit]
The type of the command, in this case, upgrade.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the upgrade skill to use.
produced-upgrade[edit]
The name of the upgrade to initiate.
Morph[edit]
<command>
<type value="morph" />
<name value="morph" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<morph-skill value="morph_skill" />
<morph-unit name="my_unit" />
<discount value="0" />
<!-- Start MG Only -->
<ignore-resource-requirements value="false" />
<!-- End MG Only -->
</command>
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[edit]
The type of the command, in this case, morph.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the morph skill to use.
morph-unit[edit]
The name of the unit to morph into.
discount[edit]
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[edit]
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[edit]
<command>
<type value="attack" />
<name value="attack" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<move-skill value="move_skill" />
<attack-skill value="attack_skill" />
<unit value="unit_toSpawn" amount="0" spawnAtTarget="false">
</command>
The attack command is used to attack a foe. Most of the information is stored in its linked skill.
type[edit]
The type of the command, in this case, attack.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the move skill to use.
attack-skill[edit]
The name of the attack skill to use.
Attack stopped[edit]
<command>
<type value="attack_stopped" />
<name value="attack_stopped" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<stop-skill value="stop_skill" />
<attack-skill value="attack_skill" />
</command>
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[edit]
The type of the command, in this case, attack_stopped.
name[edit]
The name of the command, as seen ingame.
image[edit]
Path to the image which will be used as an icon to initiate the command.
unit-requirements[edit]
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[edit]
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[edit]
The name of the stop skill to use.
attack-skill[edit]
The name of the attack skill to use.