Editing XML/Unit
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | {{XMLs}} | |
− | |||
The [[unit]] [[XML]] is the main body of a mod, defining everything about each unit. Every unit has this XML, which is named the same as their unit folder, and defines their stats and abilities, as well as various other bits of information on the unit. | The [[unit]] [[XML]] is the main body of a mod, defining everything about each unit. Every unit has this XML, which is named the same as their unit folder, and defines their stats and abilities, as well as various other bits of information on the unit. | ||
+ | {{TOC limit|2}} | ||
==XML== | ==XML== | ||
+ | {{XML_definition_header}} | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" standalone="no" ?> | <?xml version="1.0" standalone="no" ?> | ||
Line 11: | Line 12: | ||
<size value="2" /> | <size value="2" /> | ||
<height value="2" /> | <height value="2" /> | ||
+ | <!-- Start MG Only --> | ||
<target-height value="2" /> | <target-height value="2" /> | ||
<burn-height value="2" /> | <burn-height value="2" /> | ||
+ | <!-- End MG Only --> | ||
<max-hp value="800" regeneration="2" /> | <max-hp value="800" regeneration="2" /> | ||
<max-ep value="100" regeneration="5" /> | <max-ep value="100" regeneration="5" /> | ||
Line 20: | Line 23: | ||
<time value="100" /> | <time value="100" /> | ||
<multi-selection value="false" /> | <multi-selection value="false" /> | ||
− | |||
<cellmap value="true" allowEmpty="false"> | <cellmap value="true" allowEmpty="false"> | ||
<row value="10" /> | <row value="10" /> | ||
Line 33: | Line 35: | ||
<properties> | <properties> | ||
<property value="burnable" /> | <property value="burnable" /> | ||
+ | <!-- Start MG Only --> | ||
<property value="rotated_climb" /> | <property value="rotated_climb" /> | ||
+ | <!-- End MG Only --> | ||
</properties> | </properties> | ||
+ | <!-- Start MG Only --> | ||
<rotationAllowed value="false" /> | <rotationAllowed value="false" /> | ||
<max-unit-count value="10" /> | <max-unit-count value="10" /> | ||
Line 46: | Line 51: | ||
<count-kill-for-unit-upgrade value="true" /> | <count-kill-for-unit-upgrade value="true" /> | ||
<count-in-victory-conditions value="true"/> | <count-in-victory-conditions value="true"/> | ||
+ | <!-- End MG Only --> | ||
<light enabled="true" red="0.1" green="0.1" blue="0.3" /> | <light enabled="true" red="0.1" green="0.1" blue="0.3" /> | ||
<unit-requirements> | <unit-requirements> | ||
Line 71: | Line 77: | ||
<tag value="tag_name"/> | <tag value="tag_name"/> | ||
</tags> | </tags> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</parameters> | </parameters> | ||
<skills> | <skills> | ||
Line 84: | Line 85: | ||
<commands> | <commands> | ||
− | <!-- See section: | + | <!-- See section: commands --> |
</commands> | </commands> | ||
Line 126: | Line 127: | ||
===multi-selection=== | ===multi-selection=== | ||
− | If true | + | If true, all units of the same type can be mass selected by double clicking one of them. As well, this must be on for the unit to be selectable by clicking and dragging a selection box (otherwise the selection box ignores that type of unit). This should generally be off for buildings and on for regular units, unless there is any reason you don't want them to be easily mass selected. |
− | |||
− | |||
− | |||
===cellmap=== | ===cellmap=== | ||
Line 140: | Line 138: | ||
===fields=== | ===fields=== | ||
− | Fields are the area that units can traverse. | + | Fields are the area that units can traverse. In Glest and MegaGlest, this is limited to <tt>land</tt> and <tt>air</tt>. Land units can only walk on walkable parts of the land and shallow water, while air units can fly and traverse everywhere. In GAE, the additional fields of <tt>any_water</tt> (deep or shallow water), <tt>deep_water</tt> (only the deep areas that land units cannot enter), or <tt>amphibious</tt> (the unit can traverse both land and water (of any depth) but are still limited by unwalkable terrain). |
===properties=== | ===properties=== | ||
Line 148: | Line 146: | ||
===rotationAllowed=== | ===rotationAllowed=== | ||
− | A [[MegaGlest]] only element which toggles whether or not the building can be rotated. | + | A [[MegaGlest]] only element which toggles whether or not the building can be rotated. In GAE, buildings can always be rotated. Unit particle effects will be rotated with the building. |
===max-unit-count=== | ===max-unit-count=== | ||
Line 184: | Line 182: | ||
===resources-stored=== | ===resources-stored=== | ||
Using the same syntax as resource-requirements above, resources stored is the number of resources that can be stored in this unit. This expands the total maximum storage as shown at the top of the [[HUD]], and also performs the more valuable function of letting units head to it after harvesting that resource. | Using the same syntax as resource-requirements above, resources stored is the number of resources that can be stored in this unit. This expands the total maximum storage as shown at the top of the [[HUD]], and also performs the more valuable function of letting units head to it after harvesting that resource. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===image=== | ===image=== | ||
Line 198: | Line 187: | ||
===image-cancel=== | ===image-cancel=== | ||
− | Path to the cancel icon that will be used by the image, which will be displayed at the bottom of the unit box on the HUD, for canceling their current action (upgrades specify their own cancel icon in the [[Upgrade XML]]). | + | Path to the cancel icon that will be used by the image, which will be displayed at the bottom of the unit box on the HUD, for canceling their current action (upgrades specify their own cancel icon in the [[Upgrade XML]]). In Glest, images can be either BMP or TGA. In MegaGlest and GAE, they can be BMP, TGA, JPG, or PNG. |
===meeting-point=== | ===meeting-point=== | ||
− | If true, a meeting point will be used, which is a selectable location that produced units will be sent to. Generally only given to buildings because otherwise the right click "hotkey" is used for move. The path is the icon that can be used to choose the meeting point location. | + | If true, a meeting point will be used, which is a selectable location that produced units will be sent to. Generally only given to buildings because otherwise the right click "hotkey" is used for move. The path is the icon that can be used to choose the meeting point location. In Glest, images can be either BMP or TGA. In MegaGlest and GAE, they can be BMP, TGA, JPG, or PNG. |
===selection-sounds=== | ===selection-sounds=== | ||
Line 214: | Line 203: | ||
As a result, you could tag all melee units with a tag named "melee", and have an effect that boosts only the attack strength of melee units. Or you could tag a unit as a "building" to have an effect that only affects buildings. | As a result, you could tag all melee units with a tag named "melee", and have an effect that boosts only the attack strength of melee units. Or you could tag a unit as a "building" to have an effect that only affects buildings. | ||
− | Tags are defined in a the parameter node of the unit xml. and are used by adding | + | Tags are defined in a the parameter node of the unit xml. and are used by adding exstra tag lines in skills. |
===skills=== | ===skills=== | ||
Line 226: | Line 215: | ||
==See also== | ==See also== | ||
*[[XMLs]] | *[[XMLs]] | ||
− | + | <!-- Place links to skills and commands here, once they are created --> | |
[[Category:XMLs]] | [[Category:XMLs]] |