Author Topic: BLS Blockland Save - Parser.  (Read 570 times)

I'm coding a BLS parser, in C++.

All I need to know is what these parts of the brick defining line are for.

Code: [Select]
1x1F" 0 -0.5 0.1 0 1 0  0 0 1 1 1
^    [     P    | ? |C|     ?    |
Brick Name

P = Position
C = Color Index
? = Please let me know.

I've figured out the rest of the file.

Part of it's probably the fx colour and the collision/raycasting/rendering settings.

Place several 1x1 bricks.
Paint them different colours so you can tell them apart in the save.
Do different things to each.
Save them and look at the differences. (Have a Red one, color=0, with raycasting off and compare to a yellow one, color=1, with raycasting on)

Code: [Select]
%file.writeLine(%brick.getDataBlock().uiName @ "\" " @ %brick.getPosition() SPC %brick.getAngleID() SPC %brick.isBasePlate() SPC %brick.getColorID() SPC %print SPC %brick.getColorFXID() SPC %brick.getShapeFXID() SPC %brick.isRayCasting() SPC %brick.isColliding() SPC %brick.isRendering());

Thanks guys, very helpful.

Now, what on earth is the first number for in the whole save? you know, after the message.

The second line? It's always a "1".

And how about the 'Linecount'?

It seems to be related with how many bricks there are, but I'm not sure.

Yeah, it's just the number of bricks.