Difference between revisions of "XML/Unit"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | |||
<?xml version="1.0" standalone="no" ?> | <?xml version="1.0" standalone="no" ?> | ||
<unit> | <unit> | ||
<parameters> | <parameters> | ||
− | <size value="#" /> | + | <size value="#" /> <!-- How many units per side a building uses --> |
− | <height value="#" /> | + | <height value="#" /> <!-- The height of a unit --> |
− | <max-hp value="#" regeneration="#"/> | + | <max-hp value="#" regeneration="#"/> <!-- Maximum hit points and rate of regeneration --> |
− | <max-ep value="#" regeneration="#"/> | + | <max-ep value="#" regeneration="#"/> <!-- Maximum energy points and rate of regeneration --> |
− | <armor value="#" /> | + | <armor value="#" /> <!-- Armor value of unit --> |
− | <armor-type value="wood"/> | + | <armor-type value="wood"/> <!-- Type of armor - some weapons are more effective against some |
− | armor types; Editable in the [[Tech XML]] file --> | + | armor types; Editable in the [[Tech XML|<font color="green">Tech XML</font>]] file --> |
− | <sight value="#" /> | + | <sight value="#" /> <!-- Range of sight to react to other units --> |
− | <time value="#" /> | + | <time value="#" /> <!-- Time required to build unit. --> |
− | <multi-selection value="false" /> | + | <multi-selection value="false" /> <!-- Is double-click on unit multi-select other unit of same type --> |
− | <cellmap value="true"> | + | <cellmap value="true"> <!-- For Buildings, which Cells in a building a unit can pass through |
(0 can pass, 1 cannot). The number of rows and the number of | (0 can pass, 1 cannot). The number of rows and the number of | ||
− | digits in a line must match the size given above! --> | + | digits in a line must match the size given above! --> |
<row value="1011"/> | <row value="1011"/> | ||
<row value="1011"/> | <row value="1011"/> | ||
Line 22: | Line 21: | ||
<row value="1011"/> | <row value="1011"/> | ||
</cellmap> | </cellmap> | ||
− | <levels/> | + | <levels/> <!-- Levels automatically improve Hit points, Energy Points, and |
− | Armor by 50%, as well as sight by 20%. --> | + | Armor by 50%, as well as sight by 20%. --> |
− | <level name="level_name" kills="#"/> | + | <level name="level_name" kills="#"/> <!-- level_name is the designation, kills denotes how many enemies |
− | must be destroyed to achieve it --> | + | must be destroyed to achieve it --> |
</levels> | </levels> | ||
− | <fields> | + | <fields> <!-- Where is it considered to be for purposes of being attacked; |
− | land weapons can attack land, etcetera --> | + | land weapons can attack land, etcetera --> |
<field value="land" /> | <field value="land" /> | ||
<field value="air" /> | <field value="air" /> | ||
</fields> | </fields> | ||
− | <properties> | + | <properties> <!-- Properties (like flags) that can be set for the unit --> |
− | <property value="burnable"/> | + | <property value="burnable"/> <!-- If set, unit will catch on fire (visually) when damage causes |
it to go below 50% (i.e., wont catch on fire when it's below | it to go below 50% (i.e., wont catch on fire when it's below | ||
− | 50% at the start of construction, for instance). --> | + | 50% at the start of construction, for instance). --> |
</properties> | </properties> | ||
− | + | <!-- If enabled, specifies light generated by unit (currently only | |
− | generates light at night). RGB values must be >= 0 and <= 1. --> | + | generates light at night). RGB values must be >= 0 and <= 1. --> |
<light enabled="false" red="0.0" green="0.0" blue="0.0"/> | <light enabled="false" red="0.0" green="0.0" blue="0.0"/> | ||
− | <unit-requirements> | + | <unit-requirements> <!-- Units required to be in use before creating --> |
<unit name="unit_name" /> | <unit name="unit_name" /> | ||
</unit-requirements> | </unit-requirements> | ||
− | <upgrade-requirements> | + | <upgrade-requirements> <!-- Upgrades required to be in use before creating --> |
<upgrade name="upgrade_name"/> | <upgrade name="upgrade_name"/> | ||
</upgrade-requirements> | </upgrade-requirements> | ||
− | <resource-requirements> | + | <resource-requirements> <!-- Resources used for upgrade (if negative resources will be added |
− | to player) --> | + | to player) --> |
<resource name="resource_name" amount="#" /> | <resource name="resource_name" amount="#" /> | ||
</resource-requirements> | </resource-requirements> | ||
− | <resources-stored> | + | <resources-stored> <!-- Resource that the unit can store for inventory purposes --> |
<resource name="resource_name" amount="#" /> | <resource name="resource_name" amount="#" /> | ||
</resources-stored> | </resources-stored> | ||
− | <image path="images/aerodrome.bmp"/> | + | <image path="images/aerodrome.bmp"/> <!-- Path to Image Icon --> |
− | <image-cancel path="images/cancel.bmp"/> | + | <image-cancel path="images/cancel.bmp"/> <!-- Path to cancellation icon --> |
− | + | <!-- Can the unit be used as a meeting point for other units, and the | |
− | UI icon to be used to initiate. --> | + | UI icon to be used to initiate. --> |
<meeting-point value="true" image-path="../../../../common/tech_meeting_point.bmp"/> | <meeting-point value="true" image-path="../../../../common/tech_meeting_point.bmp"/> | ||
− | <selection-sounds enabled="true"> | + | <selection-sounds enabled="true"> <!-- Audio feedback to note unit selections --> |
<sound path="../../../../common/tech_click.wav" /> | <sound path="../../../../common/tech_click.wav" /> | ||
</selection-sounds> | </selection-sounds> | ||
− | <command-sounds enabled="true"> | + | <command-sounds enabled="true"> <!-- Audio feedback to note unit UI selections --> |
<sound path="../../../../common/tech_click.wav" /> | <sound path="../../../../common/tech_click.wav" /> | ||
</command-sounds> | </command-sounds> | ||
</parameters> | </parameters> | ||
− | <skills> | + | <skills> <!-- Skills are what a unit can do. --> |
<skill> | <skill> | ||
− | <type value="attack"/> | + | <type value="attack"/> <!-- Type of skill --> |
− | <name value="attack_skill"/> | + | <name value="attack_skill"/> <!-- name of this skill (refer to it) --> |
− | <ep-cost value="40"/> | + | <ep-cost value="40"/> <!-- How many energy points used for each use of skill --> |
− | <speed value="60"/> | + | <speed value="60"/> <!-- The speed of skill (more=faster) --> |
− | <anim-speed value="60"/> | + | <anim-speed value="60"/> <!-- Animation speed --> |
− | <animation path="models/battlemage_attacking.g3d"/> | + | <animation path="models/battlemage_attacking.g3d"/> <!-- Animation path --> |
− | <sound enabled="true" start-time="0.3"> | + | <sound enabled="true" start-time="0.3"> <!-- Is sound enabled. Sound start delayed by this |
− | time. --> | + | time. --> |
− | <sound-file path="sounds/battlemage_attack1.wav"/> | + | <sound-file path="sounds/battlemage_attack1.wav"/> <!-- path to sound --> |
</sound> | </sound> | ||
− | <attack-strenght value="140"/> | + | <attack-strenght value="140"/> <!-- attack strength Note Spelling; Minor bug, not corrected as of |
− | Glest 3.1.2 nor GAE 0.2.8a --> | + | Glest 3.1.2 nor GAE 0.2.8a --> |
− | <attack-var value="40"/> | + | <attack-var value="40"/> <!-- attack of unit = attack-strenght +- attack-var --> |
− | <attack-range value="7"/> | + | <attack-range value="7"/> <!-- attack range --> |
− | <attack-type value="magic"/> | + | <attack-type value="magic"/> <!-- Type of weapon - some weapons are more effective against some |
− | armor types; Editable in the [[Tech XML]] file --> | + | armor types; Editable in the [[Tech XML|<font color="green">Tech XML</font>]] file --> |
− | <attack-fields> | + | <attack-fields> <!-- Whom can attack; land weapons can attack land, air - air. --> |
<field value="land"/> | <field value="land"/> | ||
</attack-fields> | </attack-fields> | ||
− | <attack-start-time value="0.6"/> | + | <attack-start-time value="0.6"/> <!-- When the actual attack starts relative to when the unit started |
− | executing the attack skill --> | + | executing the attack skill --> |
− | <projectile value="true"> | + | <projectile value="true"> <!-- Use projectile (true for shooting,false for melee) --> |
− | <particle value="true" path="particle_proj.xml"/> | + | <particle value="true" path="particle_proj.xml"/> <!-- Path to projectile fail --> |
− | <sound enabled="true"> | + | <sound enabled="true"> <!-- path to sound file --> |
<sound-file path="sounds/battlemage_hit1.wav"/> | <sound-file path="sounds/battlemage_hit1.wav"/> | ||
</sound> | </sound> | ||
</projectile> | </projectile> | ||
− | <splash value="true"> | + | <splash value="true"> <!-- Will projectile explode --> |
− | <radius value="0"/> | + | <radius value="0"/> <!-- radius of explosion --> |
− | <damage-all value="true"/> | + | <damage-all value="true"/> <!-- Will it damage all units (enemy & ally) (maybe be broken in both |
− | Glest & GAE) --> | + | Glest & GAE) --> |
− | <particle value="true" path="particle_splash.xml"/> | + | <particle value="true" path="particle_splash.xml"/> <!-- Path to explosion file --> |
</splash> | </splash> | ||
</skill> | </skill> | ||
... | ... | ||
</skills> | </skills> | ||
− | <commands> | + | <commands> <!-- Commands create the specific UI for accessing skills --> |
<command> | <command> | ||
− | <type value="morph"/> | + | <type value="morph"/> <!-- Type of command --> |
− | <name value="promote_to_archmage"/> | + | <name value="promote_to_archmage"/> <!-- In game description --> |
− | <image path="../archmage/images/archmage.bmp"/> | + | <image path="../archmage/images/archmage.bmp"/> <!-- Path to icon image --> |
− | <unit-requirements/> | + | <unit-requirements/> <!-- See above --> |
− | <upgrade-requirements/> | + | <upgrade-requirements/> <!-- See above --> |
− | <morph-skill value="morph_skill"/> | + | <morph-skill value="morph_skill"/> <!-- reference to which skill to use --> |
− | <morph-unit name= "archmage"/> | + | <morph-unit name= "archmage"/> <!-- Morphing to unit --> |
− | <discount value="0"/> | + | <discount value="0"/> <!-- discount to morph (100=free morphing, 0=full unit cost) NOTE: you |
still need to spend full cost at the start,but at the end of | still need to spend full cost at the start,but at the end of | ||
− | morphing you get resources back. --> | + | morphing you get resources back. --> |
</command> | </command> | ||
... | ... |
Revision as of 13:32, 1 June 2010
<?xml version="1.0" standalone="no" ?> <unit> <parameters> <size value="#" /> <!-- How many units per side a building uses --> <height value="#" /> <!-- The height of a unit --> <max-hp value="#" regeneration="#"/> <!-- Maximum hit points and rate of regeneration --> <max-ep value="#" regeneration="#"/> <!-- Maximum energy points and rate of regeneration --> <armor value="#" /> <!-- Armor value of unit --> <armor-type value="wood"/> <!-- Type of armor - some weapons are more effective against some armor types; Editable in the Tech XML file --> <sight value="#" /> <!-- Range of sight to react to other units --> <time value="#" /> <!-- Time required to build unit. --> <multi-selection value="false" /> <!-- Is double-click on unit multi-select other unit of same type --> <cellmap value="true"> <!-- For Buildings, which Cells in a building a unit can pass through (0 can pass, 1 cannot). The number of rows and the number of digits in a line must match the size given above! --> <row value="1011"/> <row value="1011"/> <row value="0000"/> <row value="1011"/> </cellmap> <levels/> <!-- Levels automatically improve Hit points, Energy Points, and Armor by 50%, as well as sight by 20%. --> <level name="level_name" kills="#"/> <!-- level_name is the designation, kills denotes how many enemies must be destroyed to achieve it --> </levels> <fields> <!-- Where is it considered to be for purposes of being attacked; land weapons can attack land, etcetera --> <field value="land" /> <field value="air" /> </fields> <properties> <!-- Properties (like flags) that can be set for the unit --> <property value="burnable"/> <!-- If set, unit will catch on fire (visually) when damage causes it to go below 50% (i.e., wont catch on fire when it's below 50% at the start of construction, for instance). --> </properties> <!-- If enabled, specifies light generated by unit (currently only generates light at night). RGB values must be >= 0 and <= 1. --> <light enabled="false" red="0.0" green="0.0" blue="0.0"/> <unit-requirements> <!-- Units required to be in use before creating --> <unit name="unit_name" /> </unit-requirements> <upgrade-requirements> <!-- Upgrades required to be in use before creating --> <upgrade name="upgrade_name"/> </upgrade-requirements> <resource-requirements> <!-- Resources used for upgrade (if negative resources will be added to player) --> <resource name="resource_name" amount="#" /> </resource-requirements> <resources-stored> <!-- Resource that the unit can store for inventory purposes --> <resource name="resource_name" amount="#" /> </resources-stored> <image path="images/aerodrome.bmp"/> <!-- Path to Image Icon --> <image-cancel path="images/cancel.bmp"/> <!-- Path to cancellation icon --> <!-- Can the unit be used as a meeting point for other units, and the UI icon to be used to initiate. --> <meeting-point value="true" image-path="../../../../common/tech_meeting_point.bmp"/> <selection-sounds enabled="true"> <!-- Audio feedback to note unit selections --> <sound path="../../../../common/tech_click.wav" /> </selection-sounds> <command-sounds enabled="true"> <!-- Audio feedback to note unit UI selections --> <sound path="../../../../common/tech_click.wav" /> </command-sounds> </parameters> <skills> <!-- Skills are what a unit can do. --> <skill> <type value="attack"/> <!-- Type of skill --> <name value="attack_skill"/> <!-- name of this skill (refer to it) --> <ep-cost value="40"/> <!-- How many energy points used for each use of skill --> <speed value="60"/> <!-- The speed of skill (more=faster) --> <anim-speed value="60"/> <!-- Animation speed --> <animation path="models/battlemage_attacking.g3d"/> <!-- Animation path --> <sound enabled="true" start-time="0.3"> <!-- Is sound enabled. Sound start delayed by this time. --> <sound-file path="sounds/battlemage_attack1.wav"/> <!-- path to sound --> </sound> <attack-strenght value="140"/> <!-- attack strength Note Spelling; Minor bug, not corrected as of Glest 3.1.2 nor GAE 0.2.8a --> <attack-var value="40"/> <!-- attack of unit = attack-strenght +- attack-var --> <attack-range value="7"/> <!-- attack range --> <attack-type value="magic"/> <!-- Type of weapon - some weapons are more effective against some armor types; Editable in the Tech XML file --> <attack-fields> <!-- Whom can attack; land weapons can attack land, air - air. --> <field value="land"/> </attack-fields> <attack-start-time value="0.6"/> <!-- When the actual attack starts relative to when the unit started executing the attack skill --> <projectile value="true"> <!-- Use projectile (true for shooting,false for melee) --> <particle value="true" path="particle_proj.xml"/> <!-- Path to projectile fail --> <sound enabled="true"> <!-- path to sound file --> <sound-file path="sounds/battlemage_hit1.wav"/> </sound> </projectile> <splash value="true"> <!-- Will projectile explode --> <radius value="0"/> <!-- radius of explosion --> <damage-all value="true"/> <!-- Will it damage all units (enemy & ally) (maybe be broken in both Glest & GAE) --> <particle value="true" path="particle_splash.xml"/> <!-- Path to explosion file --> </splash> </skill> ... </skills> <commands> <!-- Commands create the specific UI for accessing skills --> <command> <type value="morph"/> <!-- Type of command --> <name value="promote_to_archmage"/> <!-- In game description --> <image path="../archmage/images/archmage.bmp"/> <!-- Path to icon image --> <unit-requirements/> <!-- See above --> <upgrade-requirements/> <!-- See above --> <morph-skill value="morph_skill"/> <!-- reference to which skill to use --> <morph-unit name= "archmage"/> <!-- Morphing to unit --> <discount value="0"/> <!-- discount to morph (100=free morphing, 0=full unit cost) NOTE: you still need to spend full cost at the start,but at the end of morphing you get resources back. --> </command> ... </commands> </unit>
If anyone needs a downloadable version of a rtf format outline, check out mine: http://www.mediafire.com/?ydypxxsyx3x
Back to XML_Definitions