Skip to content

Animation Process Events

Sleys edited this page Sep 12, 2026 · 2 revisions

Animation Process Events allow animations to execute logic at specific points in the animation lifecycle.

Unlike Animation Time Events, which are triggered according to the playback time, Process Events are tied to the animation's execution process.

Three process types are available:

  • ON_BEGIN
  • ON_TICKS
  • ON_END

Every event references a registered event type, specifies the execution side, and supplies the parameters required by that event.

These events are lists, so multiple process events can be used in the same animation. Different process types and event types can also be combined.


📚 Event Parameters

Field Description
process Process type.
type Registered event type
side Client, Server, Both (Client + Server) & local_client
params Event-specific parameters

On Begin

Executes the event when the animation begins.

Animation
│
●──────────────────────────────►
↑
ON_BEGIN

ON_BEGIN is intended for logic that should happen once when the animation starts.


Example

{
  "process": "ON_BEGIN",
  "type": "some_event",
  "side": "server",
  "params": {
    "value": 10
  }
}

💡 ON_BEGIN is useful for initializing effects or logic that should only occur once (and always) when an animation starts.


On Ticks

Executes the event during the animation's tick process.

Animation
│
├──●──●──●──●──●──●──●──●────►
    ↑  ↑  ↑  ↑  ↑  ↑  ↑
        ON_TICKS

ON_TICKS is intended for logic that needs to be evaluated repeatedly while the animation is being processed.

Unlike an In Interval (Animation Time Events), the execution frequency of ON_TICKS is tied to the animation's tick processing, rather than a time interval defined in the JSON.


Example

{
  "process": "ON_TICKS",
  "type": "some_tick_event",
  "side": "client",
  "params": {
    "amount": 1.0
  }
}

💡 Use ON_TICKS when an event needs to continuously react to the animation's processing rather than execute at a specific animation timestamp.


On End

Executes the event when the animation ends.

Animation
│
├──────────────────────────────●
                               ↑
                             ON_END

ON_END is intended for cleanup or finalization logic that should happen when the animation reaches its end.


Example

{
  "process": "ON_END",
  "type": "some_cleanup_event",
  "side": "server",
  "params": {}
}

💡 ON_END can be used to terminate temporary logic, remove effects, or perform actions that should occur after an animation finishes.


Example

{
  "mod_id": "sowl",
  "type": "attack",
  "transition_time": 0.25,
  "animation": "biped/skill/land_of_light",
  "armature": "epicfight:entity/biped",

  "basis_attack_speed": 0.85,
  "cancellable_movement": true,

  "on_process_events": [
    {
      "process": "on_begin",
      "type": "laser_floor_world_damage",
      "side": "both",
      "params": {
        "damage": 20,
        "radius": 20,
        "count": 30
      }
    }
  ],

  "phases": [
    {
      "antic": 0.0,
      "pre_delay": 0.2,
      "contact": 0.4,
      "recovery": 0.45,
      "hand": "main_hand",
      "properties": {
        "damage": 0.95
      },
      "colliders": [
        {
          "joint": "Root",
          "collider": {
            "array_length": 3,
            "vertex": [2.5, 2.5, 2.5],
            "center": [0.0, 0.0, 0.0]
          }
        }
      ]
    },
    {
      "antic": 0.45,
      "pre_delay": 0.5,
      "contact": 0.7,
      "recovery": 1.4,
      "hand": "main_hand",
      "properties": {
        "damage": 1.35
      },
      "colliders": [
        {
          "joint": "Root",
          "collider": {
            "array_length": 3,
            "vertex": [2.5, 2.5, 2.5],
            "center": [0.0, 0.0, 0.0]
          }
        }
      ]
    }
  ]
}

⚠️ Process vs. Time Events

Animation Process Events and Animation Time Events use different scheduling mechanisms.

Event System Trigger
On Begin Animation starts
On Ticks Animation is processed
On End Animation ends
In Time Specific animation timestamp
In Period While inside a time range
In Interval Repeated at a defined time interval

⚠️ Implementation Note

The process type is independent of the event implementation.

Any registered animation event can be associated with ON_BEGIN, ON_TICKS, or ON_END. The process wrapper is responsible for attaching the event to the corresponding animation property:

  • ON_BEGIN → StaticAnimationProperty.ON_BEGIN_EVENTS
  • ON_TICKS → StaticAnimationProperty.TICK_EVENTS
  • ON_END → StaticAnimationProperty.ON_END_EVENTS

This means event implementations do not need to implement separate versions for each process type. The same registered event can be reused across different animation processes.

EF: Extended Datapacks

📦 Data

🧰 Core

👁️ Visuals

⚔️ Combat

🗝️ Skill Builder

🛠️ Innate Builder

🗡️ Animation Operations

⚙️ Third-Party

Clone this wiki locally