Author Topic: Brick Manipulation  (Read 5347 times)

Blockland has the advantage of working with thousands of bricks, yet we don't have any good way to work with them. My goal is to make some tools that will allow for easily working with groups of bricks, this is why I am coming here, to ask for ideas on the subject.

Right now I have a script object called the VirtualBrickList. It comes with several methods that can load bricks from save files or the current game, along with several things to do to them. In my opinion, the best method is one that allows you to align builds with other ones. So for instance, you can say "place this build on the north edge of this one."

Can you guys think of any other easy to use methods? This is intended to be used by add-on developers, but in theory should be simple enough for an event interface.

Thats... actually a tough question.

The reason I guess we don't have these features is because no one has come up with any uses.

However: Make a set of groups that are all of X/Y size and then it could make a grid with randomized chunks constructed out of these groups?

Yea, that would be a separate script object that uses the VirtualBrickList (VBL). So I'll try making a multipurpose grid container for VBLs. I'll add it to the random road generator example.

One of my original goals in making this was to make it easy to make a gamemode that uses bricks, so maybe that can help you think of ideas.

Stack placing, which you have, however allow for it to be placed above and below as well.

Filling properties of the bricks (Color, ColorFX, ShapeFX, Name, Item, etc and apply events) with masking by other properties (Color, ColorFX, ShapeFX, Datablock, Name, Item etc):
For instance, where the brick is a 2x2F, apply your current events to it. Or set all bricks with Guns mounted to them to the Water ShapeFX and remove the guns, then save the whole thing to a file.

You could use an event-like structure for the replacers, where Inputs are the properties you can mask by and Outputs are the properties you can change, allowing for multiple sequenced replacements in a single operation. A GUI would certainly be MUCH better for this than some ridiculous servercmds.

And obviously having methods for both saving to and loading from files, and placing duplicates in any position would be good. That is, duplicator with about a thousand new and better qualities.

Having Nit back in Blockland is gonna be really awsome. This sounds fantastic if you/people can come up with ideas.
 I'm going to be working on a medium/large scale city grid setup hopefully throughout the week and can document moments when I have the need for group  brick functionality that doesn't exist and seems possible.

Stack placing, which you have, however allow for it to be placed above and below as well.
Yep, already have those. There is also an option to align the center of a build with the center of another. The really cool thing is instead of doing %vbl.realign("North"), you can also do %vbl.realign(%dir) where %dir is from 0 to 4. This means you can easily change the direction by adding a number to the direction value, instead of several if statements. It's very similar to the angle id used by bricks, just taken further.

Filling properties of the bricks (Color, ColorFX, ShapeFX, Name, Item, etc and apply events) with masking by other properties (Color, ColorFX, ShapeFX, Datablock, Name, Item etc):
For instance, where the brick is a 2x2F, apply your current events to it. Or set all bricks with Guns mounted to them to the Water ShapeFX and remove the guns, then save the whole thing to a file.
Are you talking about filtering through bricks and then mass applying effects to them? I already have several filters when selecting real bricks (and even a gui that works in my server). I still need to let you filter through bricks in the virtual brick list. As for mass applying effects, those are simple to add, I just haven't needed them yet :P

You could use an event-like structure for the replacers, where Inputs are the properties you can mask by and Outputs are the properties you can change, allowing for multiple sequenced replacements in a single operation. A GUI would certainly be MUCH better for this than some ridiculous servercmds.
Oh I'm starting to see what you mean now. The function that filter selects bricks returns a separate group for every kind of brick, so you can easily do that already. Although, the goal is for this to be as simple as possible, so I'll add a function that selects and applies effects all in one.

And obviously having methods for both saving to and loading from files, and placing duplicates in any position would be good. That is, duplicator with about a thousand new and better qualities.
Actually, I already have an add-on in my server called the Manipulator. It basically does what the Duplicator does but with this as its back end. It could do a lot more then the Duplicator, and easily, but I haven't worked on it much. I did add a gui for filter selecting bricks, since that is a fun feature to mess with.

Having Nit back in Blockland is gonna be really awsome. This sounds fantastic if you/people can come up with ideas.
 I'm going to be working on a medium/large scale city grid setup hopefully throughout the week and can document moments when I have the need for group  brick functionality that doesn't exist and seems possible.
I'm not going to be any more active then I was in the past month, well maybe a little more if you guys give me good ideas :P I'm still in school, so I'm sort of busy, but summer break starts in a month and I will be on more then.

Anyone have any more ideas? I really want some unique ways just to select bricks, since I think it's very important to correctly separate builds.

Also, this is the modification discussion, feel free to just discuss vague concepts you might have about this.

Personally, my ideas that use this are:
Space Station Building - Players build modules on the ground and then are able to 'fly' them up to a space station where they are connected with other modules.

Specific save loading - Say someone wants to load a save file, they can choose to load a certain portion of it, and then movie it around before actually placing it.

Events - Some events could probably worked on that use the filters and outputs M was talking about.

Build Generators - Although a lot of logic would be done by you (any ideas on common brick logic that the vbl could take care of?),  you could use the vbl to store the separate parts of your generated build. The RealBrickGroup script object also lets you easily store multiple amounts of bricks and lets you apply effects on every brick at once.

I've used a similar system before for "prefabricated" structures so you could move, place and replace brick groups independently.

Having to be able to use saved individual builds like scenery objects(trees, cars, etc.) and load them and be able to move those around and place them on certain parts of your build. Or have a section of bricks in your brick selector for saved scenery builds(if possible) for easy placement. Just an idea, not sure if that actualy goes with your idea.

I personally prefer my second idea, as it would be a much quicker method for builders.
« Last Edit: April 13, 2010, 08:39:33 PM by Burger »

If you need help with this, I suggest asking Mr. Wallet. He had some script where you place marker points in a building and it will random generate furniture for the building or something.

If you need help with this, I suggest asking Mr. Wallet. He had some script where you place marker points in a building and it will random generate furniture for the building or something.
I'm sure nit can hold his own in the scripting category. ;D

Or have a section of bricks in your brick selector for saved scenery builds(if possible) for easy placement.
Yea, that would be something that uses these tools. As far as I can tell, there aren't any more methods to add that would make that easier.

If you need help with this, I suggest asking Mr. Wallet. He had some script where you place marker points in a building and it will random generate furniture for the building or something.
Alright, I'll see if I can make some useful methods that use markers. For some reason I was leaning away from this approach, but I realize it is very important to have.

I'm sure nit can hold his own in the scripting category. ;D
Haha thanks Burger, I agree with you.

Maybe a tool that can select bricks 1 at a time by hitting them so you can select bricks that aren't close to each other and move them like you would a normal brick but moving more than one ghost in the same direction.

Maybe selecting by color?

Maybe a tool that can select bricks 1 at a time by hitting them so you can select bricks that aren't close to each other and move them like you would a normal brick but moving more than one ghost in the same direction.
Yea, I've got that planned, I just need a better gui for the Manipulator so you can actually set your selection mode.

Maybe selecting by color?
Already have that.