Jump to content




Shape Builder


34 replies to this topic

#1 Aeolun

  • Members
  • 6 posts

Posted 01 February 2013 - 03:12 AM

So, I needed a turtle script that would help me build the stuff that I personally always found damn annoying to build, I looked around here a bit, but the only thing that I could find to build simple stuff (I do not want advanced tower building) was a rather unworkable script that someone posted here a while ago.

I took it upon myself to fix it, but left their original credits in the code.

http://pastebin.com/zkb4FY4L

I now also added the sphere dome builder that posted here: http://www.computerc...d-dome-builder/

It builds:
- Lines
- Rectangles (or squares, as a convenience method)
- Circles
- Walls
- Floors (or roofs)
- Rooms (combines walls, floors and roof)
- Stairs
- Domes
- Cylinders
- Pyramids (hollow or filled)

It is extremely basic, though it does try to take into account fuel levels and the amount of blocks left available to built with (that is, if it runs out of either, it will stop, and patiently wait until you come to refuel or refill it, then continue).

If I write it builds a line, it probably does exactly what you imagine it does :P but for those whom want to see what it does, here are some screenshots: http://min.us/mmS6gwT0ydSRf

One thing to note is that it always takes the block UNDER it as the starting point, and always builds from left to right, and from front to back. So if you tell it to build a room 6 wide and 6 deep, the left wall will be at the starting point, and the right wall 6 blocks to the right of that.
I try to make everything consistent, please let me know if it does something weird.

You can use it with both normal and mining turtles. Mining turtles have the added benefit that they smash whatever is in the way of what they are building, normal turtles may just give up if something is in the way.

Do not expect it to restart gracefully if the chunk unloads, or if your server reboots. I do not generally expect people to build while they are not around so I didn't bother for now.

#2 Mailmanq!

  • Members
  • 123 posts
  • LocationI am omnipresent... DUH

Posted 01 February 2013 - 03:46 AM

Good, finally I don't have to keep making a script for something like this when I need it. Also, do you think you could add circles?

#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 01 February 2013 - 03:47 AM

Next you need more shapes. Cylinders, pyramids, spheres....
Good job so far though!

#4 xInDiGo

  • Members
  • 105 posts

Posted 01 February 2013 - 07:00 AM

this is pretty nice! i was using this sphere/dome builder to make my domes, but more shapes would be great! having one program to do them all would be very nice :]

perhaps a Pyramid (either hollow or not) would be good to add too!

i also like that you defined where it starts and which direction it builds. in my experience it takes a few tries to get the turtle to build right where you want it so this helps!

#5 ughzug

  • Members
  • 24 posts

Posted 02 February 2013 - 01:57 PM

can you add hexagons?

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 February 2013 - 02:21 PM

I say screenshots ;)

Good job though. More shapes would be good :)

#7 Aeolun

  • Members
  • 6 posts

Posted 02 February 2013 - 09:10 PM

Screenshots added, more shapes added (most requested, I forgot sphere, and need some more time to calculate hexagons ;) ).

I've used the spherebuilder script posted by xInDiGo. No sense in making it myself if it already exists and works perfectly.

#8 Shnupbups

  • Members
  • 596 posts
  • LocationThat place over there. Y'know. The one where I am.

Posted 02 February 2013 - 09:13 PM

Coolio, turtle slaves can build me a 6 room house while I be lazy and do other stuffs.

#9 ughzug

  • Members
  • 24 posts

Posted 02 February 2013 - 11:29 PM

thanks man take your time

#10 maniacpsycho

  • New Members
  • 1 posts

Posted 08 February 2013 - 10:27 PM

script errors if you have easy mode enabled (no refuelling)

#11 MacDaddyPro

  • Members
  • 5 posts
  • LocationSAN JOSE CA

Posted 09 February 2013 - 05:32 AM

This is great. Thanks for making it.

This is what I have used it so far and it worked great.

Cylinder = Worked great..

Pyramids = Worked great.

Walls = Worked great.

Walls = Bugged. The floor and the celling go one way and the room goes the other.

I am going to go test all the others right now.

Again. Thanks for this! I think it is great. Ill get back after I test all the rest of the shapes.

B)

#12 MacDaddyPro

  • Members
  • 5 posts
  • LocationSAN JOSE CA

Posted 09 February 2013 - 06:36 AM

Just some info when you build a room. If it is even it seems to work 5 x 5 x 5

But if you build a 12 x 8 x 7 it puts the roof and floor in the wrong way.

back to testing.

thanks again.

#13 MacDaddyPro

  • Members
  • 5 posts
  • LocationSAN JOSE CA

Posted 09 February 2013 - 07:09 AM

Bug in platform.

When it runs out of blocks in slot 1 it uses the blocks it picks up.

#14 xInDiGo

  • Members
  • 105 posts

Posted 11 February 2013 - 08:08 AM

few things i noticed.

it doesn't handle sand or gravel very well, and when it starts picking up junk blocks in its first slot it will place those blocks as part of the shape

#15 Ritchie

  • New Members
  • 1 posts

Posted 22 February 2013 - 06:34 AM

I love this program, thank you so much! I find it difficult to build more complex structures though, such as stacked cylinders and domes of different sizes because I can't seem to figure out (try as I might) where to place the turtle to have the center points of stacked structures line up, especially since it uses radius not diameter but seems to change the radius so that the diameter always comes out to an odd number.

It really just becomes hard for us more creative types, I assume there's math involved.

My request is that you change it or add the option to start building from the center block so that turtle placement is a snap.

-Ritchie

#16 Hitorikirino

  • New Members
  • 2 posts

Posted 25 February 2013 - 08:04 AM

Every time I try to run this program I am getting an error. It will place one block directly below it and then give the error before it moves. The error is "shape:28: attempt to compare number with string expected, got number".

#17 solaris187

  • Members
  • 4 posts

Posted 28 February 2013 - 10:50 AM

Your calculations for the starting point of a circle seem to be off. I place the turtle down and tell it to build a circle of size X. It actually moves first to the right X before it constructs the circle. This make is very difficult since the starting point is not even in the circle or part of it in some way. Is this a bug?

#18 Keridos

  • Members
  • 75 posts

Posted 04 March 2013 - 05:06 AM

For the circle/dome the center is radius blocks to the right and forward from the starting point of the turtle.

Nice work, please update and add sphere and hexagon. Loving this already.

/edit: The room wall calculation is wrong, it starts the first wall correct but then continues to build the to the left side instead of to the right side. So one of the walls is right, the other three are not in their correct positions.

#19 Keridos

  • Members
  • 75 posts

Posted 07 March 2013 - 12:19 PM

Fixed the room building code (problem was the turtle built like it was on the starting position after building the floor, but that only works fine for rooms with uneven side length values).
The other code is unchanged.
/edit: Updated the paste again, now should be able to build spheres. (updated now, pastebin finally up)

http://pastebin.com/RAHj4r2K

Another idea: It may make sense to make this project communitydriven, so hosting it on Github might be a good idea. Makes modifying and managing it far easier. So fixes like mine could be merged into the project without changing the Opening Post too much. And of course a versatile shape builder could be more useful than like 5 small ones.

Edited by Keridos, 07 March 2013 - 04:34 PM.


#20 Paksarra

  • Members
  • 4 posts

Posted 12 March 2013 - 06:03 AM

View PostHitorikirino, on 25 February 2013 - 08:04 AM, said:

Every time I try to run this program I am getting an error. It will place one block directly below it and then give the error before it moves. The error is "shape:28: attempt to compare number with string expected, got number".

This is probably because you have fuel disabled. I'm getting the same error for any program that checks fuel, and my server's admins are 2 to 1 against turning fuel back on for compatibility I am not happy with them.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users