Difference between revisions of "Blueprint File Format Block Data"
From StarMade Wiki
SgSkallagrim (talk | contribs) m |
SgSkallagrim (talk | contribs) m |
||
Line 1: | Line 1: | ||
The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the [[Blueprint_File_Formats|blueprint]]. | The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the [[Blueprint_File_Formats|blueprint]]. | ||
− | + | =Segment-data v0,v1= | |
− | |||
− | |||
− | |||
− | |||
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB | ||
Line 35: | Line 31: | ||
|} | |} | ||
− | + | =Segment-data v2= | |
− | |||
− | |||
− | |||
− | |||
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB | ||
Line 99: | Line 91: | ||
|} | |} | ||
− | + | =Segment-data v3= | |
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB |
Revision as of 21:28, 10 February 2017
The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the blueprint.
Contents
Segment-data v0,v1
MSB | Bit Offsets | LSB | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
Type 0 | Orientation | Active | Hit Points | Block ID | |||||||||||||||||||||
For blocks with an activation status, like a Standard Factory or Activation Module | |||||||||||||||||||||||||
Type 1 | Orientation | Hit Points | Block ID | ||||||||||||||||||||||
For all other blocks except corners | |||||||||||||||||||||||||
Type 2 | Orientation | Hit Points | Block ID | ||||||||||||||||||||||
For corner blocks |
Segment-data v2
MSB | Bit Offsets | LSB | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Type 0 | Orientation | Active | Hit Points | Block ID | ||||||||||||||||||||
For blocks with an activation status, like a Standard Factory or Activation Module | ||||||||||||||||||||||||
Type 1 | Orientation | - | Hit Points | Block ID | ||||||||||||||||||||
For wedge blocks | ||||||||||||||||||||||||
Type 2 | Orientation | Hit Points | Block ID | |||||||||||||||||||||
For corner blocks | ||||||||||||||||||||||||
Type 3 | Orientation | - | Hit Points | Block ID | ||||||||||||||||||||
For most plants and light rods. Blocks like a Snowbuds or Black Rod Light | ||||||||||||||||||||||||
Type 4 | Orientation | Hit Points | Block ID | |||||||||||||||||||||
For tetra blocks | ||||||||||||||||||||||||
Type 5 | Orientation | Hit Points | Block ID | |||||||||||||||||||||
For hepta blocks | ||||||||||||||||||||||||
Type 6 | Orientation | Hit Points | Block ID | |||||||||||||||||||||
For Shipyard Module and rail blocks |
Segment-data v3
MSB | Bit Offsets | LSB | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
All | Orientation | Active | Hit Points | Block ID | ||||||||||||||||||||
Blocks than can be active have 1 for 'inaktive' and 0 for 'active'. Others have 0 as Active-bit. |
Orientation
The Orientation field represents how the block is facing in the blueprint. When all the bits in this field are zero, the block will be in its default orientation. The bits are interpreted as follows :
Segment-data v0,v1,v2
Type 3 to 6 were introduced in segment data version 2.
Type | Bits | Description | ||
---|---|---|---|---|
Type 0/3 | 23 | 22 | 21 | The block facing |
Type 1 | 23 | 22 | The axis of rotation.
| |
21 | 20 | The amount of clockwise rotation around the axis of rotation, in 90-degree steps | ||
Type 2/6 | 19 | 23 | 22 | The axis of rotation.
|
21 | 20 | The amount of clockwise rotation around the axis of rotation, in 90-degree steps | ||
Type 4/5 | 19 | 23 | 22 | The axis of rotation.
|
21 | 20 | The amount of clockwise rotation around the axis of rotation, in 90-degree steps |
Segment-data v3
Type | Bits | Description | ||||
---|---|---|---|---|---|---|
23 | 22 | 21 | 20 | 19 | ||
Type 0/3 | Block facing |
| ||||
Type 1 | The axis of rotation. | Rotations in 90-degree steps |
| |||
Type 2/6 | The axis of rotation. | Rotations in 90-degree steps |
| |||
Type 4/5 | The axis of rotation. | Rotations in 90-degree steps |
|