Data Schema::Anim File - Subject9x/battleMETAL GitHub Wiki

Anim Files

or 'animatic' files, are a feature that battleMETAL adds to the original game code. Animatic files play a series of images with optional sound playback. Essentially they're slide shows, but in context of the game, they are used for important transmissions to the player. The animatic files are called by map trigger, and files must be located in the folder /data/anim/

The files use the .anim extension and are using a JSON-like format.

  • keys and values are set with this format-
    • 'key' : value,
    • lines are comma terminated.
    • string values do not need quotes, no line breaks or escape characters.

demo file

the first object is always the meta-data header for the anim.

  • music : path to a music file you want to play.
  • nomusic : <boolean 0 or 1> nomusic on TRUE will stop all music playback for the duration of the animatic.
  • backimg : path to an image that will be drawn behind every frame of the animatic.
  • trans : <float 0.1 - 1> the base alpha transparency of the entire animatic.

after this, each object is 1 frame of the animatic.

  • _image` : path to file of image to be drawn.
  • pos : <vector 0.1 - 1> 2D position of frame expressed as %'s of screen width and height.
  • size : <vector 0.1 - 1> 2D size of frame expressed as %'s of screen width and height.
  • sound : path to file of sound to be played on this frame, will overplay if frame is shorter than sound.
  • text : a message in text, no line breaks, keep it short.
  • alpha : <float 0.1 - 1> the alpha level of the image being shown.
  • color : <vector 0.1-1> the color tint of the image being shown.
  • text_color : <vector 0.1 - 1> the color of the text.
  • time : time in game seconds for frame to display.
  • flags : any number of the following bitflags
  • 1 = ANM_FLAG_FADE_IN - add 2 seconds to frame total time to transition from 0 Alpha to alpha max.
  • 2 = ANM_FLAG_FADE_OUT - add 2 seconds to frame total time to transition from alpha max to 0 Alpha.
  • 4 = ANM_FLAG_FADE_BOTH - combines the two above flags into 1 for convenience.
  • 8 = ANM_FLAG_FULL_SCR - ignores aspect ratio of display, and size of image to display image
  • 16 = ANM_FLAG_CENTER - centers the image to the center of the screen, accounting for aspect ratio.
⚠️ **GitHub.com Fallback** ⚠️