{ ;============================================================================== ; RVGL CUSTOM ANIMATIONS ; ; This file allows creating custom object animation (moving whole meshes): ; - Up to 256 different animations can be defined. ; - Each has a main body part and up to 15 child bones which follow their parent bone. ; - Every animation can have up to 256 keyframes, defining the bone positions at that time. ; The game then interpolates the animation between those keyframes. ; - Each bone can have a light, sound effect and spark generator attached to it. ; These attachments can be created, updated or deleted at any keyframe. ; - Up to 64 custom model and sfx slots are supported. ; ; The type of interpolation can be one of the following: ; 0: linear. Constant velocity and angular velocity. ; 1: smooth start, sudden end. Like an object starting to fall, then hitting the ground. ; 2: sudden start, smooth end. ; 3: both smooth start and end. ; 4: exaggerating or overshooting, i.e. first moving a bit in the opposite direction, ; then over the target amount, then again backwards. Gives a robotic look. ;============================================================================== ;============================================================================== ; ANIMATION ;============================================================================== ; Possible options that can be defined within an animation block, and their ; default values are given below: ; ; ANIMATION { ; Slot 0 ; Slot ID (0 to 255) ; Name "DEFAULT" ; Display name (currently unused) ; Mode 0 ; 0: loop / 1: animate a single time, stopping after the last frame / 2: back and forth (reverse after last keyframe) ; NeedsTrigger false ; Whether the animation needs to be triggered ; TriggerOnce false ; Whether the animation can be triggered multiple times ; PreCountdown false ; Whether the animation must start before countdown (in multiplayer) ; ; BONE { ; BoneID 0 ; Body part ID (0 to 15); part 0 is the main body part ; ModelID -1 ; Model ID (0 to 63, or -1) ; Parent 0 ; Body part parent ID; must be smaller than the bone ID; not present at the main body part ; OffsetTranslation 0.000 0.000 0.000 ; Offset to parent location ; OffsetRotationAxis 0.000 -1.000 0.000 ; Offset rotation axis ; OffsetRotationAmount 0.000 ; Offset rotation (in degrees) ; } ; ; KEYFRAME { ; FrameNr 0 ; Number of the keyframe (0 to 255) ; Time 1.000 ; Time (in seconds) since previous keyframe ; Type 0 ; Interpolation type. 0 - linear, 1 - smooth start, 2 - smooth end, 3 - both smooth, 4 - overshoot ; BONE { ; BoneID 0 ; Body part ID ; Visible true ; Toggle body part visibility (for all future keyframes until it is changed again) ; Translation 0.000 0.000 0.000 ; Translation ; RotationAxis 0.000 -1.000 0.000 ; Rotation axis ; RotationAmount 0.000 ; Rotation (in degrees) ; ; ; Light, sound and spark generator for this bone ; ; values apply to all future keyframes until they are changed again ; SFX { ; SfxID -1 ; Sound ID (0 to 63, or -1) ; Range 0 ; Range multiplier (0 to 100) ; Looping false ; Whether the sound is continuous or one-shot ; } ; SPARK { ; Type -1 ; Particle type, defined in properties.txt (0 to 63, or -1) ; AverageSpeed 0 ; Average speed of particle (0 to 200) ; VariableSpeed 0 ; Speed variation of particle (0 to 200) ; Frequency 0 ; Particle generation frequency (1 to 200, or 0 for one-shot) ; } ; LIGHT { ; Type -1 ; Light type (0 - omni, 1 - omni normal, 2 - spot, 3 - spot normal, or -1 to disable) ; Color 0 0 0 ; Light color (RGB values, -1024 to 1024 for each component) ; Reach 0 ; Light reach distance ; ConeSize 0 ; Cone size for spot lights (1 to 180) ; FlickerSpeed 0 ; Flicker speed (1 to 255, 0 to disable) ; } ; } ; } ; } ;============================================================================== ;============================================================================== ;-------- ; Models ;-------- MODEL 0 "paperplane" ; This loads "custom/tw_plane.m" MODEL 1 "papeboat" ;--------------- ; Sound effects ;--------------- ;---------------------------- ; Example 1 : Paper plane ;---------------------------- ANIMATION { Slot 0 ; Slot ID (0 to 255) Name "Paper plane" ; Display name (currently unused) Mode 0 ; 0: loop / 1: animate a single time, stopping after the last frame / 2: back and forth (reverse after last keyframe) BONE { BoneID 0 ; Body part ID (0 to 15); part 0 is the main body part ModelID 0 ; Model ID (0 to 63, or -1) } KEYFRAME { FrameNr 0 ; Number of the keyframe (0 to 255) Time 1.500 ; Time (in seconds) since previous keyframe Type 0 ; Interpolation type. 0 - linear, 1 - smooth start, 2 - smooth end, 3 - both smooth, 4 - overshoot } } } ;---------------------------- ; Example 2: Paper Boat ;---------------------------- ANIMATION { Slot 1 ; Slot ID (0 to 255) Name "Paper boat" ; Display name (currently unused) Mode 0 ; 0: loop / 1: animate a single time, stopping after the last frame / 2: back and forth (reverse after last keyframe) BONE { BoneID 0 ; Body part ID (0 to 15); part 0 is the main body part ModelID 1 ; Model ID (0 to 63, or -1) } KEYFRAME { FrameNr 0 ; Number of the keyframe (0 to 255) Time 20.000 ; Time (in seconds) since previous keyframe Type 0 ; Interpolation type. 0 - linear, 1 - smooth start, 2 - smooth end, 3 - both smooth, 4 - overshoot } } }