Editing XML/Skills

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:
[[XML|Back to XML Overview ]]
+
{{XMLs}}
 
 
 
Skills define the abilities of a unit, and are generally used with commands to provide actions that the unit can perform, but sometimes mandate automated events too, such as the death skill, which fires every time the unit dies. There can be as many skills as you want (though there can only be one of some types of skills, such as the death or be_built skill).
 
Skills define the abilities of a unit, and are generally used with commands to provide actions that the unit can perform, but sometimes mandate automated events too, such as the death skill, which fires every time the unit dies. There can be as many skills as you want (though there can only be one of some types of skills, such as the death or be_built skill).
  
 
+
{{TOC limit|2}}
  
 
==Common tags for skills==
 
==Common tags for skills==
Line 282: Line 281:
  
 
===anim-progress-bound===
 
===anim-progress-bound===
A value that, if true, will lock the animation speed to the progress of the production as it completes. Thus, when the production is half complete, the animation would be halfway through, etc. This will override any specified animation speed and if not used, the entire tag may be omitted.
+
A GAE and MegaGlest only value that, if true, will lock the animation speed to the progress of the production as it completes. Thus, when the production is half complete, the animation would be halfway through, etc. This will override any specified animation speed and if not used, the entire tag may be omitted.
  
 
==Upgrade==
 
==Upgrade==
Line 346: Line 345:
 
==Attack==
 
==Attack==
 
Attacks are the most complex skills, but also have the largest area of customizability. All types of attacks, long ranged, melee, splash attacks, etc all use the same attack skill and are defined via its elements.
 
Attacks are the most complex skills, but also have the largest area of customizability. All types of attacks, long ranged, melee, splash attacks, etc all use the same attack skill and are defined via its elements.
 +
{{XML_definition_header}}
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
 
<skill>
 
<skill>
Line 359: Line 359:
 
<sound-file path="sounds/sound-file.wav" />
 
<sound-file path="sounds/sound-file.wav" />
 
</sound>
 
</sound>
<unit value="unit_name" amount="1" spawnAtTarget="true"/>
+
<unit value="unit_name" amount="1" />
 
<attack-strenght value="150"/>
 
<attack-strenght value="150"/>
 
<attack-var value="50"/>
 
<attack-var value="50"/>
Line 386: Line 386:
 
</damage-particles>
 
</damage-particles>
 
</skill>
 
</skill>
</syntaxhighlight>
+
 
===Alternative way to handle multiple projectiles:===
+
 
<syntaxhighlight lang="xml">
+
alternative way to handle multiple projectiles: ( Megaglest>3.9.1 )
 
<skill>
 
<skill>
 
<type value="attack"/>
 
<type value="attack"/>
Line 402: Line 402:
 
<sound-file path="sounds/shot.ogg"/>
 
<sound-file path="sounds/shot.ogg"/>
 
</sound>  
 
</sound>  
<attack-strength value="90"/>
+
<attack-strenght value="90"/>
 
<attack-var value="40"/>
 
<attack-var value="40"/>
 
<attack-range value="20"/>
 
<attack-range value="20"/>
 
<attack-type value="bite"/>
 
<attack-type value="bite"/>
<unit value="unit_name" amount="1" spawnAtTarget="false"/>
 
 
<attack-fields>
 
<attack-fields>
 
<field value="land"/>
 
<field value="land"/>
 
</attack-fields>
 
</attack-fields>
 
<attack-start-time value="0.25"/>
 
<attack-start-time value="0.25"/>
 +
 
<projectiles>
 
<projectiles>
 
<projectile attack-start-time="0.25" damage-percentage="10">
 
<projectile attack-start-time="0.25" damage-percentage="10">
Line 440: Line 440:
  
 
===unit===
 
===unit===
An optional attribute which is used to spawn units each time this attack is commenced. If this feature is not used, the tag should be excluded completely
+
A MegaGlest only feature which spawns a unit of the specified name and quantity each time this attack is commenced. If this feature is not used, the tag should be excluded completely. Currently, it is not checked if the spawned units are dead before creating more. This feature is most useful for creating a custom unit such as a suicide bomb, or such which will destroy itself eventually.
"value" is the unitType that is spawned
 
"amount" is used to set the number of units that are spawned
 
"spawnAtTarget" is a boolean which let the unit spawn at the target Unit if set to true.
 
  
===attack-strength===
+
===attack-strenght===
The base damage an attack will deal, in HP. Note: in older versions you had to use the misspelling "attack-strenght" in order for the tag to work.
+
The base damage an attack will deal, in HP. Note the misspelling in the element tag, it must be spelled as "attack-strenght" in order for the tag to work.
  
 
===attack-var===
 
===attack-var===
Line 458: Line 455:
  
 
===attack-fields===
 
===attack-fields===
The fields that the attack skill is capable of damaging. Either <tt>land</tt> or <tt>air</tt>, and depends on what the target unit has as their field.
+
The fields that the attack skill is capable of damaging. Either <tt>land</tt> or <tt>air</tt>, and depends on what the target unit has as their field. While GAE technically has additional fields such as any_water, they are not used for attack fields because attacks with the land field will hit such units.
  
 
===attack-start-time===
 
===attack-start-time===
Line 496: Line 493:
 
<particle-file path="unit_particles.xml" minHp="0" maxHp="5000"/>
 
<particle-file path="unit_particles.xml" minHp="0" maxHp="5000"/>
 
</damage-particles>
 
</damage-particles>
<spawn start-time="0.1">
 
<unit value="technician"/>
 
<amount value="1"/>
 
<health-percent min="80" max="100"/>
 
<probability value="100"/>
 
</spawn>
 
 
</skill>
 
</skill>
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 509: Line 500:
 
===fade===
 
===fade===
 
If true, the unit's "corpse" will fade away at the end of the animation, rather than lying "dead" on the ground for a short period of time.
 
If true, the unit's "corpse" will fade away at the end of the animation, rather than lying "dead" on the ground for a short period of time.
 
===spawn===
 
If this tag exists the given number <amount> of units of type <unit> is spawned with a probability of <probability> and a predamage of <health-percent> at the given start-time ( related to the death animation playback.)
 
  
 
==See also==
 
==See also==

Please note that all contributions to MegaGlest are considered to be released under the Creative Commons Attribution Share Alike (see MegaGlest:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: