Table of Contents
Scene file format
Motion Capture saves scenes in JSON format. Scene files can be found in (world directory)/mocap_files/scenes and have .mcmocap_scene extension.
Like recording format, scene format aims to be backwards compatible. It doesn't aim to be forward compatible but because of how it is interpreted in current version of Motion Capture (unknown fields are just ignored) it should be forward compatible to some extent.
Before Motion Capture 1.4 different scene file format was used. It was also text format but not JSON-based. It's described here. (TODO: add link)
Types
JSON format doesn't distinguish between integers and floating-point numbers and doesn't save their precision. This documentation will include data types in code, so precision of given fields is known. If specific field was described and integer and floating-point number is passed instead, it's not defined how it should be interpreted.
Root object
Root JSON object consists of two elements - integer version and subscenes which is array of objects, each representing scene element. Both fields are required.
Version number and file format history
Version is stored on signed 32-bit integer, so number shouldn't exceed its range.
Possible values and their meaning:
0- undefined version number (as in not defined in file, but it's valid and should be read)>= 1- stable version number<= -1- experimental version number of a corresponding stable version
Version history:
1- Motion Capture1.0-1.1.1(legacy scene format)2- Motion Capture1.2-1.2.1(legacy scene format)3- Motion Capture1.3-1.3.9(legacy scene format)4- Motion Capture1.4and later
JSON-based scene file format shouldn't use version number 1, 2, 3 as these versions were using completely different format.
Subscenes
(TODO: add links to each modifier)
Each subscene consists of name, which is a name of a recording/scene a scene element points to,
and optional modifiers (if one is not present, default modifier value is used):
player_name- string, value ofplayer_namemodifierplayer_skin- object, contains data forplayer_skinmodifier:skin_source- string - "default", "from_player", "from_file", or "from_mineskin"skin_path- string - data forplayer_skinmodifier, check out its documentation for more details
transformations- object, contains data fortransformationsmodifier:rotation- double, in degreesmirror- string - "none", "x", "z", or "xz"offset- array of 3 doubles (x, y, z)scale- object:player_scale- doublescene_scale- double
config- object - transformations configuration (checktransformationsmodifier documentation for more details):round_block_pos- booleanrecording_center- string - "auto", "block_center", "block_corner", or "actual"scene_center- object:type- string - "common_first", "common_last", "common_specific", or "individual"specific_str- string - used when type equals "common_specific", otherwise not present/ignored
center_offset- array of 3 doubles (x, y, z)
player_as_entity- object, contains data forplayer_as_entitymodifier:id- string, entity type ID in Minecraft formatnbt- string, SNBT of entity to use
time- object, contains data fortimemodifier:start_delay- double, in secondswait_on_start- double, in secondswait_on_end- double, in secondswait_for_parent_end- booleanloop- boolean
entity_filter- string, value ofentity_filtermodifier