Animatable template & animation transparency customization settings
Split from #1300
Customizable animation transparency settings
Translucency.Cloakedcan be used to overrideTranslucencyon animations attached to currently cloaked TechnoTypes.- Both
TranslucencyandTranslucency.Cloakedcan use the new keyframe system to animate along with the animation. Read more about the keyframe system below. - If interpolation is enabled, the keyframe values are clamped to valid transparency values (0,25,50 and 75), e.g a value of 1.5 would become 0 and 56.525 would become 50 and so on.
In artmd.ini:
[SOMEANIM] ; AnimationType
Translucency=0 ; integer - only accepted values are 75, 50, 25 and 0.
Translucency.Cloaked= ; integer - only accepted values are 75, 50, 25 and 0.
Keyframe animations (Animatable template)
- Some features use keyframe-based animation system to define animations in INI. Defined in INI it looks something like following.
[SOMESECTION]
BASEKEY.KeyframeN.Value= ; Key-dependant value type
BASEKEY.KeyframeN.Percentage= ; floating point value, percents or absolute
BASEKEY.KeyframeN.Absolute= ; integer, zero-based frame index
BASEKEY.Interpolation=none ; Interpolation mode (none|linear)
BASEKEY.ResetData=false ; boolean
BASEKEYis whatever base key name the feature in question may use.Nis zero-based keyframe index. If no keyframes are defined, a single value fromBASEKEYis attempted to be parsed instead.Valueis a key/feature-dependant value type associated with that keyframe.Percentageis the percentage through the animation's frames where the keyframe becomes active. It is also possible to instead use zero-based frame index viaAbsolutewhich takes precedence over percentage, albeit it is internally converted to a percentage value.Interpolationcontrols interpolation of values between keyframes. The behaviour here may depend on the value type in use, as not all value types may be interpolatable well or at all.ResetDataif set to true makes it so that all existing keyframe data is reset before parsing. Can be used to reset keyframes when redefining them in map files etc.
Keyframes are expected to be defined with no duplicates for Percentage or Absolute. Failure to do so will crash the game and output developer warnings about offending keys to the log.
Nightly build for this pull request:
- compiled-dll-ae2bc1ce579e0e4588c33d1918739cf2b87ee42c.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
Now uses @Metadorius's Animatable template that allows defining arbitrary keyframe animations in INI.
Might require testing to see if there's a noticeable performance overhead from the template.
Updated credits & docs, ready for another review pass and/or further testing if needed, if not then merging.
tested and worked
This is actually complete and has been for a while. If @Metadorius wants to give a quick check that all the issues brought up in previous comment are addressed and/or otherwise give it a glance I'd say it is good to merge after that.