Author Topic: How do I know which color a brick is when reading through a save..  (Read 1110 times)

http://pastebin.com/MBg3VdYC

So are the colors everything above the Linecount line?

Or are the colors in this:

-218.5 -153.5 0.1 0 1 20  0 0 0 1 0

Because this looks to big to be the position and rotation.
« Last Edit: December 14, 2011, 09:00:19 AM by Superb »

Position, rotation, colour index, print index, FX index, raycasting, rendering, colliding...

There are quite a few properties that could be saved. I think that colour is stored as an index to the list at the start of the file, which is probably used so that it can find the closest match if you aren't using the same set of colours as when it was saved originally.

Position, rotation, colour index, print index, FX index, raycasting, rendering, colliding
Just check the BUILDBOT code, I know that Nexus knows the EXACT format and put that format into his code.
I think that colour is stored as an index to the list at the start of the file, which is probably used so that it can find the closest match if you aren't using the same set of colours as when it was saved originally.
No, its not. But, that is what buildbot does also.

Upon saving, the entire colorset‘s color list is dumped into the file. This is what makes things like closest-color matching and colorset uploading ($Pref::Server::AllowColorLoading, I believe) possible. Colors of bricks are stored somewhere on each brick line as an 0-63 index.

Upon saving, the entire colorset‘s color list is dumped into the file. This is what makes things like closest-color matching and colorset uploading ($Pref::Server::AllowColorLoading, I believe) possible. Colors of bricks are stored somewhere on each brick line as an 0-63 index.

I wish blockland saves did this with datablock information.



its not.

yes it is uristqwerty is 100% correct
minus his spelling of colors

Edit:  and forgetting isbaseplate between rotation and color id

Code: [Select]
%file.writeline(%b.getdatablock().uiname @ "\"" SPC %b.getposition() SPC %b.getangleid() SPC %b.isbaseplate() SPC %b.getcolorid() SPC ((%b.getdatablock().subcategory $= "Prints") ? getprinttexture(%b.getprintid()):"") SPC %b.getcolorfxid() SPC %b.getshapefxid() SPC %b.israycasting() SPC %b.iscolliding() SPC %b.isrendering());
« Last Edit: December 15, 2011, 06:20:46 PM by Nexus »