Skill Sprite Entity

The skills_skill_animations entity configures visual animations for skills, providing rich visual feedback for skill execution.

Managing skill animations in the admin panel

Skill animations are in the Skills section of the admin sidebar, under Animations (/reldens-admin/skills-skill-animations). Each row is one animation phase of one skill:

Admin Panel - Skills Animations list

To create a skill animation:

  1. Copy the spritesheet PNG into the assets/custom/actions/sprites/ folder of your theme. For a directional animation add one file per direction with the direction suffix (for example fireball_bullet_left.png and fireball_bullet_right.png). See Skill Sprites and Animations.
  2. Log in to the admin panel at /reldens-admin and open Skills > Animations.
  3. Click Create New (the form opens at /reldens-admin/skills-skill-animations/edit).
  4. Select the Skill ID (required).
  5. Fill in the Key (required), the animation phase: cast, bullet or hit (see "Animation Phases" below). The game combines it with the skill key, for example fireball_cast.
  6. Leave the ClassKey empty for the spritesheet animations.
  7. Fill in the AnimationData JSON (required). It must include "enabled": true (disabled animations are skipped), "type": "spritesheet" and the img file name without the extension (see "AnimationData Reference" below).
  8. Click Save, restart the server and test the skill in game to adjust the timing and the visual effect.
Admin Panel - Create Animations form

In the form, r marks a required field. The AnimationData of the default fireball cast animation:

{
  "enabled": true,
  "type": "spritesheet",
  "img": "fireball_cast",
  "frameWidth": 64,
  "frameHeight": 70,
  "start": 0,
  "end": 3,
  "repeat": -1,
  "destroyTime": 2000,
  "depthByPlayer": "above"
}

Key Properties

  • skill_id: Parent skill reference
  • key: Animation identifier
  • classKey: Custom animation class
  • animationData: JSON animation configuration

Animation Phases

The default skills use these keys:

  • cast: Played on the skill owner while the skill is casting. When a skill has no cast animation the client uses the default_cast animation.
  • bullet: The projectile sprite of the physical skills (Physical Attack and Physical Effect), it moves with the projectile body.
  • hit: Played on the target when the skill hits it.

AnimationData Reference

  • enabled: Must be true, a disabled animation is not loaded.
  • type: spritesheet, the type loaded and created by the client.
  • img: The image file name in assets/custom/actions/sprites/, without the .png extension.
  • frameWidth / frameHeight: Size of each frame in the spritesheet.
  • start / end: First and last frame of the animation.
  • frameRate: Frames per second (the game configured frame rate when omitted), or duration in milliseconds instead.
  • repeat: Repeat count, -1 repeats forever.
  • hide: Hide the sprite when the animation completes (default true).
  • destroyTime: Milliseconds after which the animation sprite is destroyed.
  • depthByPlayer: above draws the animation over the player sprite, otherwise it is drawn below.
  • dir: Directional files: 0 (default) one file, 2 up / down files, 3 left / right files. The file names get the direction suffix, for example fireball_bullet_left.png.

The AnimationData of the default fireball bullet animation, with left / right files:

{
  "enabled": true,
  "type": "spritesheet",
  "img": "fireball_bullet",
  "frameWidth": 64,
  "frameHeight": 64,
  "start": 0,
  "end": 3,
  "repeat": -1,
  "frameRate": 1,
  "dir": 3
}

Database Relations

  • skills_skill: Parent skill

Implementation

On startup the server adds every row to the client skills configuration (client/skills/animations) under the skillKey_key name, and the client preloads and creates the spritesheet animations with Phaser 3 (lib/actions/client/preloader-handler.js).

Go Up