What's the most effective way to structure data for this building system?

So I am creating I guess you could say an advanced building system for a prototype im creating and like i having trouble with it getting more complicated data structure wise

Background
So basically how the building system works is there is a foundation and I calculate points on the left, right, back and front sides, but also across it

So currently with the building sytsem your able to place tiles only across, and fences only around

Fences Around

Tiles Across


PROBLEM
This is working great and how I intended it, but the problem im facing is that players are now going to be able to place different things ontop of the tiles freely and im not sure how to really structure that data?

So this is the how I setup the different sections for Across

It’s starts at the left side and calculates the amount off start positions needed
image

And then inside of those start positions, are the grid points I use for placing the tiles
image

And then inside of those grid points I have the cframe of the grid point and then also the structure that is built
image

So now im introducing boxes that youll place onto tiles and then one those boxes youll be able to also place plants, so like it’s getting out of hand and I’m just really lost?

1 Like

I don’t understand why every PositionX has GridPointYs inside of it. Surely every Position inside the Across table should only be 1 point, so why store several?

1 Like

Thank you for the reply!
So basically the reason I have that many position X’s is because I have to go forward and then across

I hope this visulization gives you a better idea

1 Like

Oh, yeah that makes sense.

You could have the top-level structure be called “Level” or “Floor” or smth, and have each “Across” be inside a “Floor”. So every Floor has many Across’s has many Positions.