Author Topic: Saving ALL Brick Ownership  (Read 1152 times)

Currently(or the last time I checked) brick ownership is saved via a sort of stack system.  All of the bricks in a stack inherit the ownership of the brick at the bottom of the stack.  So if Blocklander A creates a house and a yard, and then Blocklander B build's a treehouse on Blocklander A's lawn.  Then the ownership of Blocklander B's treehouse is lost when the build is saved.  So when they return the next day to continue building, Blocklander B cannot continue building his treehouse without some sort of add-on, trust from Blocklander A, or a bit of tricky saving/loading.  This can be a real problem with large community builds and any sort of events that use named bricks.

I'd like to see some sort of an option to save ALL ownership in the default game.  Maybe a "save as > Commmunity Build" sort of feature.

Ownership is currently based on baseplates.

Regardless, it'd probably be pretty easy to make this.

Setting .isBaseplate to true on every brick should do the trick.

Ownership is currently based on baseplates.
No it's not.
Code: (aatemp.bls) [Select]
This is a Blockland save file.  You probably shouldn't modify it cause you'll screw it up.
1

-snipped colorset stuff :P-
Linecount 8
2x2" -38 9.5 0.3 2 1 0  0 0 1 1 1
+-OWNER 31546
2x2" -38 9.5 0.9 2 0 0  0 0 1 1 1
2x2" -38 9.5 1.5 2 0 0  0 0 1 1 1
16x16 Base" -38 9.5 1.9 1 0 0  0 0 1 1 1
2x2" -38.5 9.5 2.3 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 2.9 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 3.5 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 4.1 2 0 0  0 0 1 1 1
I placed 3 2x2 bricks, then used another key to place a 16x baseplate and 3 2x2 bricks on top of that.  Then I placed another 2x2 on top just for fun.

When loaded all of those bricks will belong to whoever placed the first brick on the bottom of the stack.

So setting .isBaseplate to true will not help.

Regardless, it'd probably be pretty easy to make this.
Maybe. I've seen a few alternate server-sided savers out there.  But even so it'd be nice to have that sort of functionality in the default game.

No it's not.
Code: (aatemp.bls) [Select]
This is a Blockland save file.  You probably shouldn't modify it cause you'll screw it up.
1

-snipped colorset stuff :P-
Linecount 8
2x2" -38 9.5 0.3 2 1 0  0 0 1 1 1
+-OWNER 31546
2x2" -38 9.5 0.9 2 0 0  0 0 1 1 1
2x2" -38 9.5 1.5 2 0 0  0 0 1 1 1
16x16 Base" -38 9.5 1.9 1 0 0  0 0 1 1 1
2x2" -38.5 9.5 2.3 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 2.9 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 3.5 2 0 0  0 0 1 1 1
2x2" -38.5 9.5 4.1 2 0 0  0 0 1 1 1
I placed 3 2x2 bricks, then used another key to place a 16x baseplate and 3 2x2 bricks on top of that.  Then I placed another 2x2 on top just for fun.

When loaded all of those bricks will belong to whoever placed the first brick on the bottom of the stack.
So setting .isBaseplate to true will not help.
Maybe. I've seen a few alternate server-sided savers out there.  But even so it'd be nice to have that sort of functionality in the default game.
Saving isn't based on the bricks from the baseplate category. When a brick is planted on the FX plane it sets %brick.isBaseplate to true. When bricks are saved it saves the ownership of all the bricks with %brick.isBaseplate and then it sets all bricks on top of it to the same ownership as the brick with %brick.isBaseplate. Understand now?

In other words, instead of being based on baseplates, it's whoever owns the brick(s) on the bottom supporting all the rest.

-snip-
What are you talking about lol. jes00 is 100% correct. Setting .isBaseplate works because "isBaseplate" is set whenever you do /plantBrick and the brick is touching the FXplane (the ground), because .isBaseplate doesn't actually refer to baseplates in the game (eg 32x32), but rather the fact that the brick is touching the ground or not.
Put a 1x1 on the ground. (has to be on your own server and / or you must have access to eval) and then look at the brick.

commandToServer('getID');
==>echo(id.isBaseplate);
1




What are you talking about lol. jes00 is 100% correct. Setting .isBaseplate works because "isBaseplate" is set whenever you do /plantBrick and the brick is touching the FXplane (the ground).
Put a 1x1 on the ground. (has to be on your own server and / or you must have access to eval) and then look at the brick.

commandToServer('getID');
==>echo(id.isBaseplate);
1

He thought that me and Otto were talking about bricks in the Baseplate category.

Ooh, I see.  I wasn't quite sure what .isBaseplate did, but that makes a whole lot more sense.

So as you said before.
Setting .isBaseplate to true on every brick should do the trick.

I wonder if any other issues would arise from doing that.

ohwell
Code: [Select]
package saveownership
{
function fxDTSBrick::onPlant(%obj)
{
parent::onPlant(%obj);
%obj.isBaseplate = 1;
}
function fxDTSBrick::onLoadPlant(%obj)
{
parent::onPlant(%obj);
%obj.isBaseplate = 1;
}
};
activatepackage(saveownership);
It seems to work just fine.Edit: It doesn't work just fine.  It emulates the "Floating Bricks" addon, if you've ever used that.  It's probably a better idea to set all bricks as baseplates before each save, and then revert them back to their previous states immediately afterwards.

I still wish this was part of the game's default functionality...
« Last Edit: July 21, 2014, 11:06:47 PM by Tendon »