Difference between revisions of "Blueprint File Format Block Data"
From StarMade Wiki
SgSkallagrim (talk | contribs) (Created page with "The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the blueprint. =Smd2= A Smd2 segment consists of 4096 blocks. Seg...") |
SgSkallagrim (talk | contribs) m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the 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= | |
− | |||
− | |||
− | |||
− | |||
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB | ||
Line 35: | Line 31: | ||
|} | |} | ||
− | = | + | =Segment-data v1= |
− | + | {| class=wikitable | |
− | + | ! ||MSB !! colspan=22 | 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 | ||
+ | |- | ||
+ | | rowspan=2 | Type 0 | ||
+ | | colspan=4 bgcolor=red align=center | Orientation | ||
+ | | bgcolor=teal align=center | Active | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For blocks with an activation status, like a [[Standard Factory]] or [[Activation Module]] <br/><br/> | ||
+ | |- | ||
+ | | rowspan=2 | Type 1 | ||
+ | | colspan=4 bgcolor=red align=center | Orientation | ||
+ | | colspan=1 bgcolor=teal align=center | - | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For [[Grey Standard Armor Wedge|wedge]] blocks<br/><br/> | ||
+ | |- | ||
+ | | rowspan=2 | Type 2 | ||
+ | | colspan=5 bgcolor=red align=center | Orientation | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For [[Grey Standard Armor Corner|corner]] blocks<br/><br/> | ||
+ | |- | ||
+ | | rowspan=2 | Type 3 | ||
+ | | colspan=4 bgcolor=red align=center | Orientation | ||
+ | | colspan=1 bgcolor=teal align=center | - | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For most plants and light rods. Blocks like a [[Snowbuds]] or [[Black Rod Light]] <br/><br/> | ||
+ | |- | ||
+ | | rowspan=2 | Type 4 | ||
+ | | colspan=5 bgcolor=red align=center | Orientation | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For [[Grey Standard Armor Tetra|tetra]] blocks<br/><br/> | ||
+ | |- | ||
+ | | rowspan=2 | Type 5 | ||
+ | | colspan=5 bgcolor=red align=center | Orientation | ||
+ | | colspan=8 bgcolor=blue align=center | Hit Points | ||
+ | | colspan=11 bgcolor=green align=center | Block ID | ||
+ | |- | ||
+ | | colspan=24 | For [[Grey Standard Armor Hepta|hepta]] blocks<br/><br/> | ||
+ | |} | ||
− | + | =Segment-data v2= | |
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB | ||
Line 99: | Line 144: | ||
|} | |} | ||
− | + | =Segment-data v3= | |
{| class=wikitable | {| class=wikitable | ||
! ||MSB !! colspan=22 | Bit Offsets !! LSB | ! ||MSB !! colspan=22 | Bit Offsets !! LSB |
Latest revision as of 21:44, 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
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 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 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 |
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 |
|