# Skills

275pages on
this wiki

Skills are XML events linked to commands. They tell the unit the exact parameters for the linked command, as well as can describe other events which do not have commands, such as death (thus, the death skill can be used to set the death model). Multiple commands can use the same skill, such as using the same move skill for a move and an attack command.

## Types of skillsEdit

• attack
• move
• produce
• morph
• die
• stop
• be_built
• harvest
• cast-spell (GAE only)
• build_self (GAE only)

## Skill cyclesEdit

The speed specified in the skill denotes how long it will take, in world frames, to do the full skill. By default, the world frames run at a constant 40 frames per second on the regular speed, but can be increased in game by making the game speed faster or slower (default hotkeys: + and -). The following formula is used to figure out the time to do a skill cycle:

$\text{World Frames} = ceiling\left(\frac{1}{\left(\frac{\text{speed}}{4000}\right)}\right)$

So if we have an attack that does 100 damage, and has a speed of 100:

$\text{World Frames} = ceiling\left(\frac{1}{\left(\frac{100}{4000}\right)}\right)$
$\text{World Frames} = ceiling\left(\frac{1}{0.025}\right)$
$\text{World Frames} = 40$

Thus, every 40 world frames (1 second on regular game speed), we do our 100 damage. This makes our damage per second ratio 100 damage/second.

## TipsEdit

• You can use different skills for different commands to slightly modify them in a way that is more meaningful to the command, such as having the regular move command use a move skill which has the unit stroll on, while a different move skill for the attack command might have the unit charge.