[ADMIN TOOL] Teleport to Brickgroup

Author Topic: [ADMIN TOOL] Teleport to Brickgroup  (Read 833 times)

Hi, I was wondering if it was possible to make a tool that could teleport you to a given player's bricks? The problem is, sometimes people wander off into the distance and lay a lot of bricks and then leave which can be quite frustrating as you most likely have no idea what is going on.

I realise there are cases when the bricks are spread-out and it is much harder to find, but I think it would be sufficient if the tool would simply take you to the brickgroup of the highest density. Pressing the button twice would take you to the second most dense brick group and so on.

Not sure if it could be made, but it would be an invaluable help if it could be done.

How do you "teleport somebody to a given player's bricks" when they have more than one brick?

That's where the 'brick density' comes in. I don't know too much about scripting, and I don't know if it could be done, but basically what should be done is getting a player's bricks, determining the position of the bricks and group them together based on their proximity. Then the script could prioritise based on the density of the group. Clicking the button once would take you to the densest group. Clicking twice would take you to the second most dense group and so on.

Well one simple thing that could be done is teleporting the player to the ´average position´ of all the bricks in the group. Albeit if you have, for example, two large builds scattered then the player would end up somewhere in between them.

So separating a player's "brick groups" based on distance is not viable, right?

i don't know how to do this in an algorithm...

lets simplify the problem

suppose you have a 2d array of points - excuse me while i make one


how do we algorithmicly determine the fact that a larger amount of points are in the top right corner?
my math knowledge isn't great enough yet - can we use some kind of regression or even just simple averaging? suppose you were to calculate the average position of the first three points in the plane. then, as you add in the other points, recalculate the averages. if it skews the average too much, assume that brick isn't part of the group

barnabas, to my knowledge, this is what they call a 'hard' computer problem. humans can look at the graph and say pretty confidently that most of the points are in the top right corner - computers are not so lucky.

Suddenly scripts from years ago are relevant: http://blockland.basically.gg/Script_HilightWarp.zip

It turns that "hilight" button on the clear bricks menu into a button that teleports you to the brick group's most recently created brick (server-sided). Unless you find yourself using the default hilight feature unlike myself, this add-on might satisfy your request. You could also change it to a random brick in their group* so you could do it multiple times to check for scattered bricks if necessary, and statistically you would appear where the highest density is the majority of the time.

*If desired, change line 38 in server.cs to:
Code: [Select]
%brk = %obj.getObject(getRandom(0,%cnt - 1));
Thinking back on it, ghost bricks might be included? Regardless, this is the script NWB had and used.
« Last Edit: November 10, 2013, 03:35:33 PM by Truce »

I think that's what I was looking for Truce. Thanks for the script! Next time I restart the server I will make sure to have it enabled! Thanks once again!