Skip to main content

Skills Overview

The Skills system lets you define reactive behaviors using a simple action-target-trigger syntax.

Syntax

action{params} @target{params} ~trigger{params}
ComponentPrefixRequiredDescription
Action(none)YesWhat to do
Target@NoWho it affects (default: @Self)
Trigger~YesWhen it happens

Quick Example

Skills:
# Play idle animation while idle
- animation{name=idle, mode=loop} ~idle

# Play walk animation while moving
- animation{name=walk, mode=loop} ~moving

# Deal explosion damage to nearby players on death
- damage{amount=10, type=explosion} @PlayersInRadius{r=5} ~onDeath

Components

Actions

What happens when the skill activates.

ActionDescription
animationPlay an animation
damageDeal damage
hideboneHide a bone
showboneShow a bone

Targets

Who the action affects.

TargetDescription
@SelfThe entity itself (default)
@AttackerEntity that last attacked
@PlayersInRadiusPlayers within range

Triggers

When the skill activates.

Lifecycle triggers:

TriggerDescription
~onSpawnWhen entity spawns
~onDeathWhen entity dies
~onLoadWhen entity loads from save
~onDespawnWhen entity is removed (not death)

Combat triggers:

TriggerDescription
~onHurtWhen entity takes damage
~onAttackWhen entity attacks
~onKillWhen entity kills something
~onEnterCombatWhen entering combat
~onDropCombatWhen leaving combat
~onTargetChangeWhen target changes
~onShootWhen firing ranged attack
~onExplodeWhen exploding (creeper-like)

Utility triggers:

TriggerDescription
~onTimerPeriodic execution
~onInteractWhen player right-clicks
~onSignalWhen receiving a signal

State triggers (active while condition is true):

TriggerDescription
~idleWhile not moving
~movingWhile moving
~healthBased on health %

Pet triggers (require Taming):

TriggerDescription
~tamed / ~untamed / ~sittingPet state triggers

Skill Order

Skills are evaluated in order. For state triggers (like ~idle and ~moving), the first matching animation wins.

Skills:
# These are mutually exclusive - order matters
- animation{name=run, mode=loop} ~moving{speed=0.3} # Fast movement
- animation{name=walk, mode=loop} ~moving # Normal movement
- animation{name=idle, mode=loop} ~idle # Standing still

Common Patterns

Basic Animation Set

Skills:
- animation{name=idle, mode=loop} ~idle
- animation{name=walk, mode=loop} ~moving
- animation{name=hurt} ~onHurt
- animation{name=death} ~onDeath

Boss with Phases

Skills:
- animation{name=idle, mode=loop} ~idle
- animation{name=walk, mode=loop} ~moving
- animation{name=enrage} ~health{below=50, once=true}
- showbone{bone=phase2_effects} ~health{below=50, once=true}
- damage{amount=15, type=fire} @PlayersInRadius{r=8} ~onDeath

Counter-Attack

Skills:
- damage{amount=3, type=magic} @Attacker ~onHurt