Systems
Player Animations
Packs can ship custom animations for the player (casting poses, charge-ups, scripted scenes) as plain JSON. The animation keyframes are injected into the player's real shape at runtime, so no shape files are patched and it works for the vanilla seraph and for custom player models.
The system is part of ArcanumLib (config/playeranimations/*.json from any mod or pack is picked up).
File Format
{
"animations": [
{
"meta": {
"code": "albase-staffcharge",
"animation": "albase-staffcharge",
"blendMode": "Add",
"easeInSpeed": 5,
"easeOutSpeed": 6,
"elementWeight": { "UpperArmR": 100, "LowerArmR": 100 },
"elementBlendMode": { "UpperArmR": "AddAverage", "LowerArmR": "AddAverage" }
},
"animation": {
"name": "Staff charge",
"code": "albase-staffcharge",
"quantityframes": 40,
"onActivityStopped": "EaseOut",
"onAnimationEnd": "Repeat",
"keyframes": [
{ "frame": 0, "elements": { "UpperArmR": { "rotationX": 6, "rotationY": 0, "rotationZ": -55 } } },
{ "frame": 20, "elements": { "UpperArmR": { "rotationX": 6, "rotationY": 0, "rotationZ": -60 } } }
]
}
}
]
}| Part | Contents |
|---|---|
meta | What player.json would hold for an animation: code, blendMode, easeInSpeed, easeOutSpeed, elementWeight, elementBlendMode and so on |
animation | What the seraph shape would hold: quantityframes, onAnimationEnd, onActivityStopped and the keyframes with per-bone rotations/offsets |
Rules:
meta.codeis what you reference everywhere.animation.codeis forced to equalmeta.animation, so a typo cannot silently do nothing.- An entry whose code ends with
-fpis the first-person variant of the entry without the suffix and is picked automatically. - A duplicate
meta.codeis replaced by the later file (warning in the log). - Entries without
meta.codeoranimationare skipped with a warning. - Keyframes must be lower than
quantityframes; looping clips wrap by themselves. - Use
Averageblending for full-body poses andAdd/AddAveragewithelementWeightfor arm-only layers.
Hooking Animations Up
Items
In config/itemconfig entries for charge/cast items:
| Field | Description |
|---|---|
castAnimation | Animation held while casting or charging |
releaseAnimation | One-shot animation played when the cast fires |
castLoopSound | Looping sound while charging (pitch rises with charge). Empty = the shared default loop |
Abilities
Rune/ability definitions (config/abilities/*.json) take castAnimation and releaseAnimation too. Every nearby client animates the caster:
"castAnimation": "albase-runebarrage",
"releaseAnimation": "albase-runebarrage-release"See quests/albase/assets/albase/config/abilities/void-barrage.json and the clips in quests/albase/assets/albase/config/playeranimations/ (staff-cast.json, rune-cast.json) and alegacyevents/config/playeranimations/guillotine.json.
Multiplayer Sync
The casting client plays the animation immediately and tells the server. The server relays it to other clients, but only for codes that exist in the loaded animation files - a client cannot make others play arbitrary vanilla animations. The server never animates anything itself.