This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Ragy's profile picture

Ragy's scheme based building program

Started by Ragy, 01 May 2012 - 07:08 AM
Ragy #1
Posted 01 May 2012 - 09:08 AM
Ragy's scheme based building program
Hi everyone. Today i presenting you turtle program that can build anything. This program use external schemes. This mean you can create you're own schemes, use them as many times as you need, and share it with others. But this program not just flexible, its very fast.

Here is link:http://pastebin.com/RinjBCnB

How to use it:
1)At first download it and drop in you're programs folder
2)Download some standard schemes( or made you're own) and drop em anywhere you want in "rom" folder
[indent=1]a)Test box: http://pastebin.com/bPawuzPn[/indent]
[indent=1]b)Test room: http://pastebin.com/cwyTwL0W[/indent]
[indent=1]c)Test house: http://pastebin.com/5r0vb6Cj[/indent]
3)Build turtle, move it to desired position. Then input "tbld 'path to scheme' ". For example "tbld rom/test_house".
4)Then when program ask you drop necessary blocks in turtles inventory.
[indent=1]WARNING: Turtle can't recognize type of blocks on they're own, its work with slots.[/indent]
5)Turtle will do the rest of job. If he run out of resources, it will stop and wait until you drop some more.

How to create schemes:
To make new scheme you need notepad and imagination
1)Create empty file
2)Input necessary text:
[indent=1]a)First line:"Turtle building scheme". This is needed for program to distinguish schemes from other programs[/indent]
[indent=1]b)Second line: Name[/indent]
[indent=1]c)Third line: Any description[/indent]
[indent=1]d)Fourth line: List of blocks used in scheme. For example "b,stone|b,stone|b,stone|b,stone|b,stone|b,stone|b,stone|g,glass|t,torch" There is have to be exactly 9 slots. Every slot is "some letter,Block name". When you create scheme you have to use only letters that you define in this list.[/indent]
3)Create layers

[indent=1]Type:[/indent]
[indent=1]"Layer 1[/indent]
[indent=1]bbbbbb[/indent]
[indent=1]bbbbbb[/indent]
[indent=1]bbbbbb[/indent]
[indent=1]bbbbbb[/indent]
[indent=1]bbbbbb[/indent]
[indent=1]end"[/indent]
[indent=1]Width and length you can change. Then copy this layer and paste as much times, as you want.[/indent]
4)Edit layers

Automatic scheme creator
Creating big schemes tрrough notepad is really hard. This is why i create this program. You can just build anything in you're world, and then convert it into scheme by using turtle.

Link:http://pastebin.com/DqrjHywW

How to use it:
1)Download it and drop in you're programs folder
2)Move turtle to the right place.

[indent=1]b-blocks t-turtle[/indent]
[indent=1]Top view [/indent]

[indent=1]bbbbbbbbb[/indent]
[indent=1]bbbbbbbbb[/indent]
[indent=1]bbbbbbbbb[/indent]
[indent=1]t[/indent]

[indent=1]Side view[/indent]

[indent=1]bbbbbbbbb[/indent]
[indent=1]tbbbbbbbb[/indent]
3)In turtle's console input "smkr 'scheme name' "
4)Type description
5)Then program ask you how designate block types. First is any letter, second is block name. For example: w wood, d dirt, k glass. You can designate some slots, and set rest to default(Just instead of block id input "default").
6)Put blocks in turtle's inventory.
[indent=1]WARNING: Turtle can't recognize type of blocks on they're own, its work with slots.[/indent]
6)Then program will ask length ,width and height.
7)The rest gonna do turtle. When converting ended, turtle print where is saved scheme(saves"you're world"computer"term ID").
[indent=1]WARNING: After converting into scheme you're building will be destroyed.[/indent]

P.S. My email is serjgraymail@gmail.com. And sorry for bad english
BigSHinyToys #2
Posted 01 May 2012 - 09:20 AM
WARNING: Never stay in front of turtle, and never block turtle's path. It will cause problems in turtle's coordinate system.

if i remember correctly the move commands will return true if executed and false if not executed. as such you can design a program to not change co ords if the turtle didn't move. pause for a while and attempt move again.
Ragy #3
Posted 02 May 2012 - 12:00 PM
Fixed. Thanks for help