跳转至

Actor Animation

文档版本:1.21.0.24

The RP animation that changes an actors models, or molang data.

架构

actor_animation:
{
  format_version "format_version"
  object "animations" : opt
  {
    object "^animation\.[a-z\.]+" : opt
    {
      0 "anim_time_update"
      number "animation_length" : opt
      0 "blend_weight"
      object "bones" : opt
      {
        object "<any object property>" : opt
        {
          array "position" : opt
          {
            0 "0..0"
            0 "1..1"
            0 "2..2"
          }
          object "position" : opt
          {
            0 "^(\d+\.\d+|\d+)$"
            array "^(\d+\.\d+|\d+)$" : opt
            object "^(\d+\.\d+|\d+)$" : opt
            {
              string "lerp_mode" : opt
              array "pre" : opt
              array "post" : opt
            }
          }
          array "rotation" : opt
          {
            0 "0..0"
            0 "1..1"
            0 "2..2"
          }
          object "rotation" : opt
          {
            0 "^(\d+\.\d+|\d+)$"
            array "^(\d+\.\d+|\d+)$" : opt
            object "^(\d+\.\d+|\d+)$" : opt
            {
              string "lerp_mode" : opt
              array "pre" : opt
              array "post" : opt
            }
          }
          object "relative_to" : opt
          {
            string "rotation" : opt
          }
          0 "scale"
          array "scale" : opt
          {
            0 "0..0"
            0 "1..1"
            0 "2..2"
          }
          object "scale" : opt
          {
            0 "^(\d+\.\d+|\d+)$"
            array "^(\d+\.\d+|\d+)$" : opt
            object "^(\d+\.\d+|\d+)$" : opt
            {
              string "lerp_mode" : opt
              array "pre" : opt
              array "post" : opt
            }
          }
        }
      }
      boolean "loop" : opt
      string "loop" : opt
      0 "loop_delay"
      boolean "override_previous_animation" : opt
      object "particle_effects" : opt
      {
        object "^(\d+\.\d+|\d+)$" : opt
        {
          string "effect" : opt
          string "locator" : opt
          0 "pre_effect_script"
          boolean "bind_to_actor" : opt
        }
        array "^(\d+\.\d+|\d+)$" : opt
        {
          object "<any array element>" : opt
          {
          }
        }
      }
      0 "start_delay"
      object "sound_effects" : opt
      {
        object "^(\d+\.\d+|\d+)$" : opt
        {
          string "effect" : opt
        }
        array "^(\d+\.\d+|\d+)$" : opt
        {
          object "<any array element>" : opt
          {
          }
        }
      }
      object "timeline" : opt
      {
        string "^(\d+\.\d+|\d+)$" : opt
        array "^(\d+\.\d+|\d+)$" : opt
        {
          string "<any array element>" : opt
        }
      }
    }
  }
}
format_versionformat_version
format_version:
string
animationsobject
The animation specification.
animations
^animation\.[a-z\.]+object
The animation specification.
^animation\.[a-z\.]+
anim_time_update0
How does time pass when playing the animation. Defaults to query.anim_time + query.delta_time which means advance in seconds.
0:
string
0:
number
animation_lengthnumber
Override calculated value (set as the last keyframe time) and set animation length in seconds.
blend_weight0
The weight of the animation when blending with other animations. Defaults to 1.
bonesobject
Defines how the bones in an animation move or transform.
bones
<any object property>object
The bone definition that declare how it transforms during animation.
<any object property>
positionarray
An array of 3 items that describe the bones position.
position
0..00
The position over the X-axis or forwards/backwards. Can be molang or a float
1..10
The position over the Y-axis, or up/down. Can be molang or a float
2..20
The position over the Z-axis, or left/right. Can be molang or a float
positionobject
The Position transformation during this animation.
position
^(\d+\.\d+|\d+)$0
Uniform position.
^(\d+\.\d+|\d+)$array
An array of 3 items that describe the bones position.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$object
A single point in time.
^(\d+\.\d+|\d+)$
lerp_modestring
UNDOCUMENTED.
prearray
An array of 3 items that describe the bones position.
pre
postarray
An array of 3 items that describe the bones position.
post
rotationarray
An array of 3 items that describe the bones rotation.
rotation
0..00
The rotation over the X-axis, or up or down. Can be molang or a float
1..10
The rotation over the Y-axis, or yaw. Can be molang or a float
2..20
The rotation over the Z-axis, or roll. Can be molang or a float
rotationobject
The rotation transformation during this animation.
rotation
^(\d+\.\d+|\d+)$0
Uniform rotation.
^(\d+\.\d+|\d+)$array
An array of 3 items that describe the bones rotation.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$object
A single point in time.
^(\d+\.\d+|\d+)$
lerp_modestring
UNDOCUMENTED.
prearray
An array of 3 items that describe the bones rotation.
pre
postarray
An array of 3 items that describe the bones rotation.
post
relative_toobject
If set, makes the bone rotation relative to the entity instead of the bone's parent.
relative_to
rotationstring
If set, makes the bone rotation relative to the entity instead of the bone's parent.
scale0
Uniform scale.
scalearray
An array of 3 items that describe the bones scale.
scale
0..00
The scale over the X-axis or forwards/backwards. Can be molang or a float
1..10
The scale over the Y-axis, or up/down. Can be molang or a float
2..20
The scale over the Z-axis, or left/right. Can be molang or a float
scaleobject
UNDOCUMENTED.
scale
^(\d+\.\d+|\d+)$0
Uniform rotation.
^(\d+\.\d+|\d+)$array
An array of 3 items that describe the bones scale.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$object
A single point in time.
^(\d+\.\d+|\d+)$
lerp_modestring
UNDOCUMENTED.
prearray
An array of 3 items that describe the bones scale.
pre
postarray
An array of 3 items that describe the bones scale.
post
loopboolean
Should this animation stop, loop, or stay on the last frame when finished (true, false, hold_on_last_frame).
loopstring
Should this animation stop, loop, or stay on the last frame when finished (true, false, hold_on_last_frame).
loop_delay0
How long to wait in seconds before looping this animation. Note that this expression is evaluated after each loop and on looping animation only.
override_previous_animationboolean
Reset bones in this animation to the default pose before applying this animation.
particle_effectsobject
UNDOCUMENTED.
particle_effects
^(\d+\.\d+|\d+)$object
A single point in time.
^(\d+\.\d+|\d+)$
effectstring
The name of a particle effect that should be played.
locatorstring
The name of a locator on the actor where the effect should be located.
pre_effect_script0
A molang script that will be run when the particle emitter is initialized.
0:
string
bind_to_actorboolean
Set to false to have the effect spawned in the world without being bound to an actor (by default an effect is bound to the actor).
^(\d+\.\d+|\d+)$array
A single point in time.
^(\d+\.\d+|\d+)$
<any array element>object
<any array element>
start_delay0
How long to wait in seconds before playing this animation. Note that this expression is evaluated once before playing, and only re-evaluated if asked to play from the beginning again. A looping animation should use loop_delay if it wants a delay between loops.
sound_effectsobject
UNDOCUMENTED.
sound_effects
^(\d+\.\d+|\d+)$object
A single point in time.
^(\d+\.\d+|\d+)$
effectstring
Valid sound effect names should be listed in the entity's resource_definition json file.
^(\d+\.\d+|\d+)$array
A single point in time.
^(\d+\.\d+|\d+)$
<any array element>object
<any array element>
timelineobject
The time line.
timeline
^(\d+\.\d+|\d+)$string
Variable definition.
^(\d+\.\d+|\d+)$array
^(\d+\.\d+|\d+)$
<any array element>string
Variable definition.