You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
181 lines
3.4 KiB
181 lines
3.4 KiB
meta:
|
|
id: logicworld_blotter_file_format_v7
|
|
file-extension: partialworld
|
|
title: Blotter File Format - v7
|
|
endian: le
|
|
|
|
seq:
|
|
- id: magic
|
|
contents: 'Logic World save'
|
|
- id: save_format_version
|
|
type: u1
|
|
- id: game_version
|
|
type: version
|
|
- id: save_type
|
|
type: u1
|
|
enum: save_type
|
|
- id: number_of_components
|
|
type: s4
|
|
- id: number_of_wires
|
|
type: s4
|
|
- id: number_of_mods
|
|
type: s4
|
|
- id: mods
|
|
type: mod_version
|
|
repeat: expr
|
|
repeat-expr: number_of_mods
|
|
- id: number_of_component_ids
|
|
type: s4
|
|
- id: component_id_map
|
|
type: component_id_map
|
|
repeat: expr
|
|
repeat-expr: number_of_component_ids
|
|
- id: components
|
|
type: component
|
|
repeat: expr
|
|
repeat-expr: number_of_components
|
|
- id: wires
|
|
type: wire
|
|
repeat: expr
|
|
repeat-expr: number_of_wires
|
|
- id: circuit_states
|
|
type:
|
|
switch-on: save_type
|
|
cases:
|
|
'save_type::world': world_circuit_states
|
|
'save_type::subassembly': subassembly_circuit_states
|
|
- id: trailer
|
|
contents: 'redstone sux lol'
|
|
|
|
types:
|
|
version:
|
|
seq:
|
|
- id: major
|
|
type: s4
|
|
- id: minor
|
|
type: s4
|
|
- id: build
|
|
type: s4
|
|
- id: revision
|
|
type: s4
|
|
string:
|
|
seq:
|
|
- id: length
|
|
type: s4
|
|
- id: text
|
|
type: str
|
|
size: length
|
|
encoding: UTF-8
|
|
peg_address:
|
|
seq:
|
|
- id: type
|
|
type: u1
|
|
enum: peg_type
|
|
- id: component_address
|
|
type: u4
|
|
- id: index
|
|
type: s4
|
|
mod_version:
|
|
seq:
|
|
- id: mod_id
|
|
type: string
|
|
- id: mod_version
|
|
type: version
|
|
position:
|
|
seq:
|
|
- id: x
|
|
type: s4
|
|
- id: y
|
|
type: s4
|
|
- id: z
|
|
type: s4
|
|
rotation:
|
|
seq:
|
|
- id: x
|
|
type: f4
|
|
- id: y
|
|
type: f4
|
|
- id: z
|
|
type: f4
|
|
- id: w
|
|
type: f4
|
|
input:
|
|
seq:
|
|
- id: circuit_state_id
|
|
type: s4
|
|
output:
|
|
seq:
|
|
- id: circuit_state_id
|
|
type: s4
|
|
custom_data:
|
|
seq:
|
|
- id: length
|
|
type: s4
|
|
- id: data
|
|
size: (length == -1 ? 0 : length)
|
|
component_id_map:
|
|
seq:
|
|
- id: numeric_id
|
|
type: u2
|
|
- id: text_id
|
|
type: string
|
|
component:
|
|
seq:
|
|
- id: address
|
|
type: u4
|
|
- id: parent
|
|
type: u4
|
|
- id: numeric_id
|
|
type: u2
|
|
- id: position
|
|
type: position
|
|
- id: rotation
|
|
type: rotation
|
|
- id: number_of_inputs
|
|
type: s4
|
|
- id: inputs
|
|
type: input
|
|
repeat: expr
|
|
repeat-expr: number_of_inputs
|
|
- id: number_of_outputs
|
|
type: s4
|
|
- id: outputs
|
|
type: output
|
|
repeat: expr
|
|
repeat-expr: number_of_outputs
|
|
- id: custom_data
|
|
type: custom_data
|
|
wire:
|
|
seq:
|
|
- id: first_point
|
|
type: peg_address
|
|
- id: second_point
|
|
type: peg_address
|
|
- id: circuit_state_id
|
|
type: s4
|
|
- id: wire_rotation
|
|
type: f4
|
|
world_circuit_states:
|
|
seq:
|
|
- id: number_of_bytes
|
|
type: s4
|
|
- id: states
|
|
size: number_of_bytes
|
|
subassembly_circuit_states:
|
|
seq:
|
|
- id: number_of_states
|
|
type: s4
|
|
- id: states
|
|
type: s4
|
|
repeat: expr
|
|
repeat-expr: number_of_states
|
|
|
|
enums:
|
|
peg_type:
|
|
0: undefined
|
|
1: input_peg
|
|
2: putput_peg
|
|
save_type:
|
|
0: unknown
|
|
1: world
|
|
2: subassembly |