GAE/Skill XML

From MegaGlest
Revision as of 13:29, 13 September 2010 by Silnarm (talk) (start page to describe skills)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Common Skill Parameters

Type

This tells the engine what sort of skill this is, and must by one of 'stop', 'move', 'attack', 'build', 'harvest', 'repair', 'be_built', 'produce', 'upgrade', 'morph', 'load', 'unload' or 'die'

<type value="stop"/>

Name

This is a name you give to identify the skill, and is used in command XML elements to identify the skills the command uses.

<name value="idle_skill"/>

Ep Cost

How many energy points used for each use of skill

<ep-cost value="0" />

Speed

This important parameter controls how fast each skill cycle is executed, the effect of this parameter is discussed separately for each skill type.

<speed value="50" />

Anim Speed

This value controls the animation speed of the model.

<anim-speed value="200" />

Animation

Identifies the G3D file to use for the unit while this skill is being executed.

<animation path="path/to/g3d/file" />

Sound

Control if the skill has a sound, and if so an offset into the skill cycle to begin playing it.

<sound enabled="true" start-time="0.3">
   <sound-file path="path/to/sound/file"/>
</sound>

Skills By Type

be-built

If any other unit in a faction has a build command that can build this unit, then this unit must provide a be-built skill. The skill speed of the be-built skill is largely irrelevant.

<skill>
  <type value="be_built"/>
  <name value="be_built_skill"/>
  <ep-cost value="0" />
  <speed value="50" />
  <anim-speed value="300" />
  <animation path="path/to/g3d/file" />
  <sound enabled="false"/>
</skill>

die

Specific Elements:

<fade value="true" />

All units without exception must have a die skill. No commands reference the die skill, it is set when the unit is killed, and plays exactly one cycle, if the fade parameter is false the unit then completely disappears, if fade is true the animation will 'stick' at end, and after a while the corpse will fade and sink into the ground.

<skill>
   <type value="die"/>
   <name value="die_skill"/>
   <ep-cost value="0"/>
   <speed value="300"/>
   <anim-speed value="300"/>
   <animation path="path/to/animation.g3d"/>
   <sound enabled="true" start-time="0">
      <sound-file path="path/to/sound.wav"/>
   </sound>
   <fade value="false"/>
</skill>