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

[Turtle] Schematic File Builder

Started by Orwell, 02 June 2012 - 09:39 PM
Orwell #1
Posted 02 June 2012 - 11:39 PM
Description
This program takes a typical '.schematic' file as input, asks for all necessary materials and builds it. The schematic file should be in the NBT file format (typically used by MCEdit and WorldEdit). Also, it should be extracted (allmost every .schematic file is compressed as a gzip file).
Screenshots (maybe movies, although I hate making them) and detailed explanation will follow.

Media
Spoiler[media]http://www.youtube.com/watch?v=DDZUQc8k2TM[/media]

Usage
Find/create/download a specific .schematic file and decompress it (often: right click -> extract here). Copy the file to the directory of the relevant turtle.
If you have, for example, named the program 'schematic-builder', then use the command:
schematic-builder <your decompressed schematic file>
It will ask for each material needed. For each material, you enter the numbers of all slots containing the material (separators don't matter). If you don't want to use the material, just leave the field blank and press enter.
Eventually it'll ask for a last key press and start building!

Download
latest version (v0.2):
Pastebin: http://pastebin.com/9e1Y9FCM
version 0.1:
Pastebin: http://pastebin.com/TsbLjP1k

Just save it as 'schematic-builder' in your roms folder or the directory of a specific turtle.
You could also use the pastebin program on CraftOS: 'http/pastebin get 9e1Y9FCM'.

I've added an example schematic file as an attachment. It's zipped, but the file isn't gzip-compressed anymore:
[attachment=242:tent.zip]

Changelog
06/03: v0.1: - uploaded first version
06/03: v0.2: - lazy fix so that only wool is uniquely identified by different data values

Questions, comments, advise and suggestions (and complaints, whatever…) are all welcome.
kazagistar #2
Posted 03 June 2012 - 01:17 AM
It is really cool that you are using an existing file format, and your code is pretty clean and simple, I just don't have a schematic to test it with. Tell me, do you allow construction with blocks that are unknown by blockid?
Orwell #3
Posted 03 June 2012 - 01:28 AM
It is really cool that you are using an existing file format, and your code is pretty clean and simple, I just don't have a schematic to test it with. Tell me, do you allow construction with blocks that are unknown by blockid?

I've added an example schematic file as an attachment. It's zipped, but the file in the zip isn't gzip-compressed anymore. It's a small tent that needs 12 fences, 24 lime wool and 1 orange wool. : )

When the program reads a non-standard block id (from buildcraft for example) it will list it as 'UNKNOWN' and then you're free to choose any block you want to be used for that id. I could let the user give an option for extra sets of blocks from the most popular mods? But evidently, that won't always work (different versions, auto-assignment, …). I could also simply list the block id's together with the names? But I don't think that's very intuitively nor practical… What do you (and others) think?
kazagistar #4
Posted 03 June 2012 - 02:47 AM
You check to see if there is an Advanced Resource Processing periphrial (http://www.computercraft.info/forums2/index.php?/topic/738-cc-133-mc-125-smp-advanced-resource-processing-v12/)

You could load the id's from a set of files.

Dunno, what you have is pretty cool on its own.
Pinkishu #5
Posted 03 June 2012 - 01:07 PM
Heh interesting I'm working on one like that too ;D It even works already - just a bit buggy (can't differentiate wool colors etc)
Mine auto-refills though :3 (well needs redpower for that)

Find it funny how similar it looks XD

Turtles can't properly place stairs and such btw atm
Orwell #6
Posted 03 June 2012 - 02:25 PM
You check to see if there is an Advanced Resource Processing periphrial (http://www.computerc...processing-v12/)

You could load the id's from a set of files.

Dunno, what you have is pretty cool on its own.
Indeed, I'm trying to avoid using mods other than CC. : ) There is also an operator panel peripheral that places blocks with any id at specified coordinates. I used it to test my program, but it felt too much like cheating to me. The fun is in improvising. : )

Heh interesting I'm working on one like that too ;D It even works already - just a bit buggy (can't differentiate wool colors etc)
Mine auto-refills though :3 (well needs redpower for that)

Find it funny how similar it looks XD

Turtles can't properly place stairs and such btw atm
I like it that you're walking the same road. : D Nothing stops you from posting yours though. In particular, when the projects grow, they will each grow their own way. : )

I was thinking about support for different popular mods. This would include extended block lists and features like auto-filling using the chosen mod (RP or BC mainly). Any comments on that? For now the turtle just aborts and asks for more stuff to continue. I guess it would be more practical if it returns to the starting position to wait and continues building where it stopped after a refill.

And indeed, stairs, ladders, torches, etc. are all placed in the direction of movement of the turtle at that moment.

If you'd like to interchange some ideas Pinkishu, I'm always open to that.
Pinkishu #7
Posted 03 June 2012 - 02:29 PM
Part of what i'm currently working on is making it restart safe
If the server restarts the program dies too, so you have to safe where it was before that ^^
Orwell #8
Posted 03 June 2012 - 02:38 PM
I was thinking about that too. I figured that it should be peace of cake with persistent variables… Simply saving the blocks and data, the table containing slot numbers and relative x,y,z. Persistent variables are almost overkill due tot the static nature of the data ^^

PS: it's fun to watch it building houses underwater or underground : D
Pinkishu #9
Posted 03 June 2012 - 03:24 PM
Hehe I have to also add excavation to mine..
And well the position data isn't very static :)/>/>
Orwell #10
Posted 03 June 2012 - 04:09 PM
I think that it is in a way, you always have to store exactly one x, y and z value. Persistent variables are mostly handy for arbitrary (thus dynamic) variables. When you know what data you want to store, you can use sort of a save file. Anyways, it's all open to interpretation and I guess neither implementation has significant advantages.

Why do you need excavation? Does your program mine stuff as well? :)/>/>

Btw, I'm working on the video and screenshots. Also, is anyone interested in technical details about the implementation? Just ask and I'll add some explanation in the opening post.
Pinkishu #11
Posted 03 June 2012 - 04:21 PM
Well if someone wants to build underground they wouldn't have to mine out the area first then
Orwell #12
Posted 03 June 2012 - 04:43 PM
Ah, like that. My program breaks every block that's in the way, so it mines while building.
Orwell #13
Posted 03 June 2012 - 09:10 PM
I've added a link to a demonstration video in the opening post. :)/>/>
My turtle builds us a giant chicken. ^.^
libraryaddict #14
Posted 13 June 2012 - 07:26 AM
Nice!
I was planning to make something like this, except with a yet to be released map thingy.
And not as good
And in my own format..
Yes…

So several suggestions are

Percentage complete bar/graph etc.
A small map showing something on the turtle. – Auctally not practical due to the tiny screen.. Could have it ask if it should rednet.send information to a computer. Then it sends the status and any information you deem worth it.
etopsirhc #15
Posted 12 September 2012 - 08:13 AM
i've kinda made this , but it takes forever to load my "schematic" file ><;
currently my file is a text one based off the old builder mod.
what happenes is a controll computer loads the file into a 3d array ( the test one being 257x113x120 ) then it goes through looking for Xmaterial , ( stone atm ) and sends a rednet signal telling it to go to and place what it has at that location

not pretty , but it works … i think ( yet to test it )
CoolisTheName007 #16
Posted 16 October 2012 - 10:13 AM
I was thinking about this some days ago; a builder program taking a schematic file from some general world editing program.
But I spent a lot more time thinking about how to efficiently build something, and by that I mean minimizing required turtle moves; I noticed that your program visits every block of a layer.
I want to program something that only goes to the locations that need blocks, and that does that by prioritizing large concentrations of blocks. For instance, if your chicken had two legs separated from each other, it would build first one, then the other, instead of going back an forth between them.
Another idea would be using the fact that turtles can place blocks both above, below, and in front.
I have thought a lot about it, and I'm close to implement it in Lua. Seeing that you have already done this all, I think I will reuse your code.

About mod's blocks ID's: is there any editing program capable of correctly labeling mods ID's?
EDIT: it seems MCedit does keeps blocks ID's from mods, your problem is getting a correspondence between blocks ID's from MCedit to an human readable form. Maybe there's a way to get it from tekkit files?
For Tekkit/ccSensors: ccSensors could be used to ease inventory and resources management;
For vanilla: using dispensers and making the turtle activate them by outputting redstone signals to get new materials?
Astrobleme #17
Posted 16 December 2012 - 09:04 AM
Pardon my clueless-ness but I'm having trouble extracting my own schematics from MCedit. I've successfully gotten the turtle to run the program and build Orwell's tent if that helps.
Zoinky #18
Posted 17 December 2012 - 07:07 PM
None of the schematics I've tried seem to work. Odd, I'm probably doing something wrong. The tent example seemed to work fine.
Syli #19
Posted 20 December 2012 - 04:42 PM
i love this little Program, nice piece of work! But sadly the Admin of my server did not allow schematics and do not allow http access for CC!

but to copy the code i got CC-Copy, wish works fine for normal code, but not for schematics.

so i wrote a small program, to convert the schematic file into a table, searialize the table and safe the file local. Now i can copy the file with CC-Copy, on the Server i have the same converter running, to unsearilize the string, wish was given by CC-Copy and safe it as schematic file.

pretty easy thing, for "just" playing around with turtles and schematics ;)/> but in bigger projects i love it ;)/>


Usage:
goto your local minecraft world, copy the schematic file into your turtle folder, copy the "convert" script in the same folder

Run:
convert toStringFile schematicFileName convertedFileName

than Copy the convertedFile and the convert scropt with CC-Copy to the Server you are on and run:
convert toByteFile convertedFileName newSchematicFileName

as i said just usefull for ppl like me who are playing on a server without http and/or posibility to upload directly (like schematics)

fileName: convert
code:
Spoiler

local tArgs = { ... }

function printUsage()
  print("Usage: convert toByteFile <Input file name> <Output file>")
  print("Usage: convert toStringFile <gunzipped schematic file | Input file name> <Output file>")
end

function convertToStringFile(inputFileName, outputFileName)
  if not fs.exists(inputFileName) then
    print("InputFile: " .. inputFileName .. " does not exist.")
    printUsage()
    return
  end
  if fs.exists(outputFileName) then
    print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
    printUsage()
    return
  end
 
  local inFile = fs.open(inputFileName, "rb")

  local byteArray = {}
  local byte = 0
  while byte ~= nil do
    byte = inFile.read()
    table.insert(byteArray, byte)
  end

  outFile = fs.open(outputFileName, "w")
  outFile.write(textutils.serialize(byteArray))
  outFile.close()
end

function convertToByteFile(inputFileName, outputFileName)

  if not fs.exists(inputFileName) then
    print("InputFile: " .. inputFileName .. " does not exist.")
    printUsage()
    return
  end
  if fs.exists(outputFileName) then
    print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
    printUsage()
    return
  end
 
  local inFile = fs.open(inputFileName, "r")
  local charArray = {}
  charArray = textutils.unserialize(inFile.readAll())
  inFile.close()


  local outFile = fs.open(outputFileName, "wb")

  for _, byte in ipairs(charArray) do
    outFile.write(byte)
  end
  outFile.close()
end

function main()
 
  if #tArgs ~= 3 then
    printUsage()
    return
  end

  if tArgs[2] == tArgs[3] then
    print("inputFileName and outputFileName are the same, please correct that")
    printUsage()
    return
  end

  if tArgs[1] == "toByteFile" then
    convertToByteFile(tArgs[2], tArgs[3])
  elseif tArgs[1] == "toStringFile" then
    convertToStringFile(tArgs[2], tArgs[3])
  else
    printUsage()
  end
end


main()

Orwell #20
Posted 20 December 2012 - 04:46 PM
Thanks, that's nice utility Sily! I love it how it happens to be two of my programs working together. :P/> As for the people that don't succeed in using the MCEdit .schematic files, be sure to decompress them first! (usually: right click->extract here). They are compressed in gzip and I didn't feel like implementing the gzip inflate algorithm. :P/>
Syli #21
Posted 21 December 2012 - 02:51 PM
today i tested my convert script on a server, with a bigger schematic (40x20x3), before i tested it just with the tent file, and sadly there was a problem with computercraft, the terminal works like it will update every char in a line if the line is changed, even if its in the negative direction of the terminal itself (out of the terminal) so after like 3000-4000 chars, the Server could not keep up with the characters in the line to update them, and it will miss characters send by CC-Copy ;/

The Solution for that will be that i write my own serializer, so the characters will be minimized, and than make use of multi collums to make the terminal less laggy.

so here is the second version of the convert script, it get rid of "spaces", "indexing" and much more of the standard textutil.serialize(), so only the bytes will be written and a seperator each, the Stringfile befor that change was like 12000 characters, now its just 2500, i will work on more improvements in the near future, aswell as using multiple collums

Spoiler

--- HEADER
--- convert:   Converts a g-unzipped schematic file into a readable string, to copy
---		    it with CC-Copy or any other Computercraft Copy executable
--- Author:    Syli
--- Version:   0.2
--- Date:	  21.12.2012
--- Copyright: Do not sell it, do not change this Header lines, anything than that,
---		    do what ever you want with this piece of code!
--- END OF HEADER


local tArgs = { ... }

function printUsage()
  print("Usage: convert toByteFile <Input file name> <Output file>")
  print("Usage: convert toStringFile <gunzipped schematic file | Input file name> <Output file>")
end

function serializeByteArray(byteArr)
  local serializedString = ""
  local isFirst = true
 
  --- we dont need to index them, dirty, but safes us many letters
  for _, byte in ipairs(byteArr) do
    if isFirst then
	  serializedString = byte
	  isFirst = false
    else
	  serializedString = serializedString .. "," .. byte
    end
  end
 
  return serializedString
end

function unserializeByteArray(cryptedString)
  local byteArray = {}  
  for value in string.gmatch(cryptedString, "([^\,]+)") do
    table.insert(byteArray, value)
  end
  return byteArray
end

function convertToStringFile(inputFileName, outputFileName)
  if not fs.exists(inputFileName) then
    print("InputFile: " .. inputFileName .. " does not exist.")
    printUsage()
    return
  end
  if fs.exists(outputFileName) then
    print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
    printUsage()
    return
  end
 
  local inFile = fs.open(inputFileName, "rb")

  local byteArray = {}
  local byte = 0
  while byte ~= nil do
    byte = inFile.read()
    table.insert(byteArray, byte)
  end

  outFile = fs.open(outputFileName, "w")
  outFile.write(serializeByteArray(byteArray))
  outFile.close()
end

function convertToByteFile(inputFileName, outputFileName)

  if not fs.exists(inputFileName) then
    print("InputFile: " .. inputFileName .. " does not exist.")
    printUsage()
    return
  end
  if fs.exists(outputFileName) then
    print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
    printUsage()
    return
  end
 
  local inFile = fs.open(inputFileName, "r")
  local charArray = {}
  charArray = unserializeByteArray(inFile.readAll())
  inFile.close()

  local outFile = fs.open(outputFileName, "wb")

  for _, byte in ipairs(charArray) do
    outFile.write(tonumber(byte))
  end
  outFile.close()
end

function main()
 
  if #tArgs ~= 3 then
    printUsage()
    return
  end

  if tArgs[2] == tArgs[3] then
    print("inputFileName and outputFileName are the same, please correct that")
    printUsage()
    return
  end

  if tArgs[1] == "toByteFile" then
    convertToByteFile(tArgs[2], tArgs[3])
  elseif tArgs[1] == "toStringFile" then
    convertToStringFile(tArgs[2], tArgs[3])
  else
    printUsage()
  end
end


main()

Reaper33000 #22
Posted 30 December 2012 - 12:50 AM
Hi,

I am still new to this, but i have gotten this program to work and tested it with the tent schematic. The problem I am having is with the AIR option. Is there anyway it can be modified to skip the air list and when turtle builds, also skip the blocks air?
MrBazzy #23
Posted 31 December 2012 - 06:25 AM
Orwell and others… I need your help. I am really a beginner in this and I just can't get the turtle to work on the tent schematic :$. It already took me a while to find out how to get the schematic-builder program in the list of programs for each turtle. However what do I need to do with the tent.zip file. Do I unzip it and place the file in the same folder as the other turtle programs? Tried it and whenever I give the command schematic-builder tent it replies with file does not excist. What am I doing wrong?
Thanks for your help everyone

MrBazzy

- Found it in the meanwhile. Both files need to be in a specific turtle folder. They can't be placed in a general folder.

However now there is a second problem. The turtle (or elve in my case) doesn't want to start immediately. It looks like I need to refuel it first before it
starts to work. Once I get it to work it stops after a while. If I log in to the turtle it doesn't say it is missing materials or another kind of message. If have to
stop the program completely with Ctrl+T.
First I thought it had something to do with running out of fuel. Checked it and confirmed this wasn't the case. Refuel showed more than enough fuel.
All resources are still available inside the slots so this is also not the reason.

Just for your information. I was trying to construct the chicken. http://www.mcschematics.com/index.php?topic=7099.msg49632#msg49632
I downloaded the Chicken(edit).schematic. Starts ok up to the point where it starts on the belly of the chicken. It goes up one or two lines and
then suddenly stops.


Kind regards,

MrBazzy
Orwell #24
Posted 11 January 2013 - 10:21 AM
Hi,

I am still new to this, but i have gotten this program to work and tested it with the tent schematic. The problem I am having is with the AIR option. Is there anyway it can be modified to skip the air list and when turtle builds, also skip the blocks air?
You'd have to add an if statement that doesn't add the block with id 0 to the list. That should fix it. I'll see if I can fix it when I have time. (got exams in about 4 days)

Orwell and others… I need your help. I am really a beginner in this and I just can't get the turtle to work on the tent schematic :$. It already took me a while to find out how to get the schematic-builder program in the list of programs for each turtle. However what do I need to do with the tent.zip file. Do I unzip it and place the file in the same folder as the other turtle programs? Tried it and whenever I give the command schematic-builder tent it replies with file does not excist. What am I doing wrong?
Thanks for your help everyone

MrBazzy

- Found it in the meanwhile. Both files need to be in a specific turtle folder. They can't be placed in a general folder.

However now there is a second problem. The turtle (or elve in my case) doesn't want to start immediately. It looks like I need to refuel it first before it
starts to work. Once I get it to work it stops after a while. If I log in to the turtle it doesn't say it is missing materials or another kind of message. If have to
stop the program completely with Ctrl+T.
First I thought it had something to do with running out of fuel. Checked it and confirmed this wasn't the case. Refuel showed more than enough fuel.
All resources are still available inside the slots so this is also not the reason.

Just for your information. I was trying to construct the chicken. http://www.mcschemat...g49632#msg49632
I downloaded the Chicken(edit).schematic. Starts ok up to the point where it starts on the belly of the chicken. It goes up one or two lines and
then suddenly stops.


Kind regards,

MrBazzy

They can be placed in the general folder (like /lua/programs/turtle), but then you'd need to give "/rom/programs/turtle/schematic.something" as argument to my program.

On your second problem, this program was written when turtles didn't require fuel yet. I'm 99% sure that it just ran out of fuel. Try fueling it with crazy lots of coal, or try to edit the program.

For some reason I don't get any notifications anymore for this thread so I missed a lot of your questions. I'm sorry for that.

I got a PM today with the question to make this program support 16 slots instead of only 9. Turtles had only 9 slots back then. I will add fuel and 16 slots support when I find time. :)/>
unobtanium #25
Posted 11 January 2013 - 12:07 PM
This looks very usefull to me. I watched the video and i tought (maybe it has been allready been implemented and i am to dumb to see it :D/>) about the fuel problem and the large amount of travelling the Turtle does:
Can the Turtle check before every layer and line if it has to place blocks in it and if not it just passes. Instead of e.g. the a whole line it just makes one stop forward or above to the next layer/line-> less materials.
Maybe this isnt that easy to do with the .schematic files but maybe thats a solution :/
Orwell #26
Posted 11 January 2013 - 12:22 PM
This looks very usefull to me. I watched the video and i tought (maybe it has been allready been implemented and i am to dumb to see it :D/>) about the fuel problem and the large amount of travelling the Turtle does:
Can the Turtle check before every layer and line if it has to place blocks in it and if not it just passes. Instead of e.g. the a whole line it just makes one stop forward or above to the next layer/line-> less materials.
Maybe this isnt that easy to do with the .schematic files but maybe thats a solution :/
Of course it can. :)/> I kind of made this in a day and never looked back. :P/> I purely wanted support for the schematic file format, from there on others could've improved it, but no one did. :)/> When my exams are over, I'm going to improve this. For starters, I'll see when I can do something about the fuel, 16 slots and ignoring air blocks. Also, it can in theory place 5 blocks at once (front,up,down,left,right). Then I'll probably see if I can implement some path finding algorithm to handle all blocks in the least amount of movements possible. I was thinking of A*, but I don't think it's suited for this. I know that CoolisTheName007 was looking into this, I think I'm going to contact him about this.
unobtanium #27
Posted 11 January 2013 - 10:20 PM
Very good! :D/>
But i tought you just could place blocks above,below and in front of the turtle. Is there something existing like turtle.placeLeft()?
Orwell #28
Posted 11 January 2013 - 10:21 PM
Very good! :D/>
But i tought you just could place blocks above,below and in front of the turtle. Is there something existing like turtle.placeLeft()?

turtle.turnLeft()
turtle.place()
turtle.turnRight()
:)/> It saves fuel and a bit of time.
unobtanium #29
Posted 12 January 2013 - 07:17 AM
Oh yeah :D/> But i dont think that it would safe that much time. I mean, if you turn left and then the turtle has to get to the right, it has to make a 180° angle + the 90° to the left and the 90° back to the moving direction. And this every block :/ There we have the question: Fuel or time ;D
Orwell #30
Posted 12 January 2013 - 11:25 AM
Oh yeah :D/> But i dont think that it would safe that much time. I mean, if you turn left and then the turtle has to get to the right, it has to make a 180° angle + the 90° to the left and the 90° back to the moving direction. And this every block :/ There we have the question: Fuel or time ;D
The point is that you wouldn't make it turn when it shouldn't need to, so it would save time on average. Because when you'd just go through every block in a row in a forwardish way, you can't skip any blocks. :P/>
technomage72 #31
Posted 17 January 2013 - 09:08 AM
I had no trouble doing the tent schematic, so I tried a bigger schematic with the latest version of mcedit. I unzipped the schematic file in the proper place and proceeded to load it in the turtle. It partially reads the schematic:

length: 39 width: 76 height: 37
number of block types: 0

this, of course, causes the program to fail, as there is nothing to do.
solaris187 #32
Posted 17 January 2013 - 10:00 AM
Trying to get this to work. I have the application on my turtle as well as my schematic file. When trying to execute the app I get the following error:

SchematicBuilder:1122: attempt to compate __lt on nil and number

Any thoughts?
technomage72 #33
Posted 17 January 2013 - 02:41 PM
Syli, I also tried your convert script and got a convert:66: attempt to index ? (a nil value)

this was on the local machine
Orwell #34
Posted 17 January 2013 - 03:26 PM
I had no trouble doing the tent schematic, so I tried a bigger schematic with the latest version of mcedit. I unzipped the schematic file in the proper place and proceeded to load it in the turtle. It partially reads the schematic:

length: 39 width: 76 height: 37
number of block types: 0

this, of course, causes the program to fail, as there is nothing to do.
Hmm, that should be an error on my part. There probably is a quirk in the parsing part. As I said, when my exams are over, I'll put some work in this program again. :)/>

Trying to get this to work. I have the application on my turtle as well as my schematic file. When trying to execute the app I get the following error:

SchematicBuilder:1122: attempt to compate __lt on nil and number

Any thoughts?
Are you sure that it says 1122? The program is only 431 lines long. :mellow:/>
technomage72 #35
Posted 17 January 2013 - 03:32 PM
no problem Orwell, I got CC-copy to work just fine, now if I can get this one to work, I won't have to worry so much about merged servers and castles in the sky builds ;)/>

also, the problem with syli's code, I've fixed that, though it also doesn't like large schematics, or anything, though it's probably the schematic I'm trying too as it's 233kb unzipped :ph34r:/>

it just drops me back to a black screen, and the new file is null bytes
solaris187 #36
Posted 18 January 2013 - 05:24 AM
Are you sure that it says 1122? The program is only 431 lines long. :mellow:/>

Ya, I checked it several times. I went to go look at the code to find the line error and was surprised when there wasnt a line 1122
Orwell #37
Posted 18 January 2013 - 03:24 PM
Are you sure that it says 1122? The program is only 431 lines long. :mellow:/>

Ya, I checked it several times. I went to go look at the code to find the line error and was surprised when there wasnt a line 1122
Then I don't get it. :/ Something is seriously wrong there…
Kghareus #38
Posted 27 January 2013 - 03:54 PM
Love the program, I'm just getting a bit of a problem on my server. When I try to run the schematic, I get "Length: 44 Width: 44 Height: 123" and then it shuts down. Sometimes it doesn't shut down, and instead shows "Bios:140: Too long without yielding"
ughzug #39
Posted 02 February 2013 - 02:41 PM
can this support large schematics? i have an old build that i have in schematic format but its really quite large.
Herû #40
Posted 03 February 2013 - 12:12 AM
can this support large schematics? i have an old build that i have in schematic format but its really quite large.

On line 404 to line 407 it is a if-statment that handle if it not is more blocks in the slot it shall place it from, so yes, it shall support schematics in all sizes.
ughzug #41
Posted 03 February 2013 - 12:55 AM
not working =(
Herû #42
Posted 03 February 2013 - 07:47 AM
not working =(
We must unzip the file from gzip (you can for example use the web-based http://www.wobzip.org/, or a program that support gzip format). Here I have done this for you: http://www.wobzip.org/file/X4kIIIIQ
ughzug #43
Posted 03 February 2013 - 11:27 AM
this schematic was already unziped from the server it was made on out of world edit, it was placed in a zip so that it could be placed on the fourms for someone else to try. i've pasted it into a world with mcedit with no issues prior to attempting to build the schematic with the turtle. are you trying to say i must zip the already uncompressed file into a gzip and unzip it for it to work? that makes no sense.
xxdolcexx #44
Posted 08 February 2013 - 09:56 AM
nu you need in the zip zip it 1 more time out look like this

http://img694.imageshack.us/img694/7039/secmatic.jpg

inside secmatic

so open zip puch pagaoda.sematic en you wil get en new venster ant thats the file jou need pagaoda

look at my bv
Herû #45
Posted 10 February 2013 - 12:08 AM
this schematic was already unziped from the server it was made on out of world edit, it was placed in a zip so that it could be placed on the fourms for someone else to try. i've pasted it into a world with mcedit with no issues prior to attempting to build the schematic with the turtle. are you trying to say i must zip the already uncompressed file into a gzip and unzip it for it to work? that makes no sense.

Like xxdolcexx also have say to you (only some more complicated), you must unzip the schematic file (it is zipped with gzip), so that zip file you gave us, included a zipped schematic file, bit if you unzip the scematic file (not the zip file). You get an unzipped schematic file (not with .schematic and readable(if you open up an schematic file, and an unzipped schematic file in an texteditor like notebook, you will see that the unzipped schematic file has plain text, that this program can read, but not the zipped schematic file).


To the author of this program: But since it is very difficult to see that you must unzip the file, the author of this program should 1. If possible make the program to check if it is an unzipped or zipped schematic file, and if it an zipped schematic file, unzip it, or 2. Say clearly in the first post that we must unzip the schematic files, and link to some programs and webpages that unzip the schematic files.
Quickslash78 #46
Posted 26 February 2013 - 01:40 PM
Is there a size limit? Or the ability to have it get materials from a chest? It would be great to schematic Project Eden from planet minecraft and have the turtle go at it.
livehifi #47
Posted 27 March 2013 - 07:55 PM
Hi there. Great work. I have a question though…

How can I get schematics on a server? Our admin allows pastebin get and put and they function well. Can I use pastebin get to download the schematic maybe? Thanks.
Herû #48
Posted 29 March 2013 - 05:24 AM
Hi there. Great work. I have a question though…

How can I get schematics on a server? Our admin allows pastebin get and put and they function well. Can I use pastebin get to download the schematic maybe? Thanks.
I think so.
Rexi #49
Posted 01 April 2013 - 01:55 AM
Not sure if there is a timer or something for the turtle to read the schematic, but i keep getting the error " :199: Too long without yielding. "
NosTr4D4m #50
Posted 13 April 2013 - 01:01 AM
Hey,

The original code was only taking 9 slots. Mine minecraft turtle has 16 storage places. Here is updated code that will accept 16 slots.

http://codepad.org/mVkCYbc1

When you are asked to enter position of material type them in double numbers like position 1 would be 01 position 16 would be 16

so if you have stone in positions 1 2 3 type 010203

:)/>
NosTr4D4m #51
Posted 13 April 2013 - 10:00 AM
Hi guys, it is sad that this awesome project is no longer updated :)/> would really be greate if some changes were made like turtle not running back to start of line after he finished previous line.
hanfgnu2k #52
Posted 18 April 2013 - 05:19 AM
I took NosTr4D4m's modified script and modified it somewhat further:

This version has a simple fuel check and prompt to refuel (slot 16 is reserved for this)
The Turtle moves a little bit more effectively. It starts to build in the place it is dropped and there is no additional "line" at the end of the width of a layer, resulting in no overlaps. The Turtle will only move inside the bounds of the schematic and will only move out of bounds when it is finished. This is useful if you try to speed things up by splitting the schematic in multiple parts and using more Turtles (like I did and ran into the issue of the Turtles destroying the work of the others… or themselves :P/> ).

I'm by no means a developer and this is actually my first lua script. I just looked at the existing code, the wiki and guessed what might work. So there might be errors and most likely bad practices or whatnot ;)/>

tl;dr: It might break for you, but it works for me :D/>

http://pastebin.com/c75U5TWV
YSPilot #53
Posted 13 May 2013 - 07:41 PM
Holy crap. THis is awesome.
Cammino #54
Posted 15 May 2013 - 07:15 AM
Hey i did read the description of this program and watched the video but i am a little bit bad at understanding this stuff…

is it right that this program can copy schematics of buildings and build them? for example ive a house in SSP and save the schematic of the map and then copy it into the turtle and can build it in SMP ? if this works like this way, its just awesome…

can anyone explain me please how to do this exactly i havent understood really :(/>

how to extract schematics and what to do after that what to type into the turtle i dont know much really about turtles:/

thanks in advance
Dex_Luther #55
Posted 18 May 2013 - 04:49 AM
I'm playing the Direworld 5.2.1 on Minecraft 1.4.7. This program doesn't seem to work anymore. It detects the size of the object to be build, but not the block types.
Dragoontim #56
Posted 01 June 2013 - 08:10 AM
Hello,

Im always getting the Error: schematic:266: Too long without yielding.

Is there anything to do against this?
Zudo #57
Posted 02 June 2013 - 11:30 AM
Hello,

Im always getting the Error: schematic:266: Too long without yielding.

Is there anything to do against this?

Did you gunzip it?
Zudo #58
Posted 02 June 2013 - 11:31 AM
Not enough air, please refill?
Orwell #59
Posted 02 June 2013 - 11:40 AM
Not enough air, please refill?
Lol, that doesn't seem right. I should really rewrite this some time.
Vas #60
Posted 08 June 2013 - 07:22 AM
Not enough air, please refill?
Lol, that doesn't seem right. I should really rewrite this some time.
Actually if you just hit enter rather than typing in a number when it asks for air then you're all good. Could have it skip asking for air.

I have a question, I can't get any of my schematics to work. They are all 0x0 or so the turtle thinks. Here is one of my schematic files;
https://dl.dropboxusercontent.com/u/30270697/exportedships/Skiff2/Skiff2.schematic
I also downloaded a few from http://www.minecraft-schematics.com/ and none of them work.
For Skiff, I used obj2mc which converts an obj file to MC blocks.
Orwell #61
Posted 08 June 2013 - 08:27 AM
Not enough air, please refill?
Lol, that doesn't seem right. I should really rewrite this some time.
Actually if you just hit enter rather than typing in a number when it asks for air then you're all good. Could have it skip asking for air.

I have a question, I can't get any of my schematics to work. They are all 0x0 or so the turtle thinks. Here is one of my schematic files;
https://dl.dropboxus...kiff2.schematic
I also downloaded a few from http://www.minecraft-schematics.com/ and none of them work.
For Skiff, I used obj2mc which converts an obj file to MC blocks.
I remember that I didn't want to make an exception for air to keep it flexible. This way you could make it fill all air with dirt or something. Just skipping it is indeed the right way to do it.

As to your question. It's mentioned a couple of times in this thread, you need to gunzip it. If you're on windows you can do it with 7zip. On linux is just did 'mv Skiff.schematic Skiff.schematic.gz &amp;&amp; gunzip Skiff.schematic.gz'. I gunzipped your Skiff file for you: https://dl.dropboxusercontent.com/u/8938705/Skiff2.schematic
Popeye #62
Posted 08 June 2013 - 08:42 AM
Wow! This is an amazing and useful tool that anyone could use to build some like a mega build.
Vas #63
Posted 08 June 2013 - 12:37 PM
But I don't want 7zip, I have WinRar!

Huh, Found a way I think. Rename schematic to .zip then extract it again with WinRar.
Orwell #64
Posted 08 June 2013 - 01:25 PM
But I don't want 7zip, I have WinRar!

Huh, Found a way I think. Rename schematic to .zip then extract it again with WinRar.
Yeh, that should work too. 7zip was just a convenient example. gzip is a very widely supported compression algorithm. Most tools like NBTEdit and WorldEdit compress the schematic files to gzip so there's nothing I can do. I might implement the gzip inflate algorithm though, when I've got time too much. I'll update this program as well in that case.
Could you let me know how the program works with the decompressed schematic files?
Vas #65
Posted 09 June 2013 - 08:36 PM
It works, but it's extremely inefficient.

It's gotta go 396,480 blocks to place 48,355 blocks in a 118x60x28 area.
This number comes from it having to go each line twice before it goes to the next line and places blocks. So it's going east to west to palce blocks. Then it travels west to east, moves over one block, and repeats east to west build order. It could build west to east, this would half the time it takes to build something, or at least take 30% of the time off.

At current rate, my project should be finished in 55.06 to 70ish hours? Whoa now. That's a lot. :P/>
Is there a way you can make it use the last 7 slots? and pull stuff from a chest where it started from? If it runs out that is. So if it's at 89x12x14 and it runs out of metal, it'll remember that location, return to start, pull from the chest to fill all slots with whatever materials they need, then go back to 89x12x14 and resume. That possible? Same for fuel, if it's running low or out of fuel, to go back and pull some out to fuel it's self.

Possible to make it remember where it left off on server reboots? I had to delete all of it's work twice now cause the server crashed twice. x.x

One more thought I had for it, is fleet aid. If it can work with other turtles on the same schematic with a wireless turtle and a computernearby to control them all. Then I could have 30 turtles and each only needs to do 2 lines! :P/> Or 10 and each needs to do only 6 lines :P/> etc etc.

I know all of this is complicated and isn't likely to be done, I just wanted to put my thoughts out there.
Orwell #66
Posted 09 June 2013 - 08:48 PM
* snip *
Thank you for your feedback. :)/> For the slot size, it's as easy as changing every 9 to 16 in the code, you can do that. ;)/> As I stated earlier, I plan on updating this program in the near future. I'm in the middle of my finals now so that will be something for in the next couple of weeks. Thanks to your feedback I have now a better idea of what needs to be done.

My todo list for this program at the moment is:
  • Implement the gzip inflate algorithm so there's no confusion anymore about decompressing the schematics.
  • Upgrade slots size.
  • Keep account of fuel.
  • Return to initial position to fetch items from a chest.
  • Make it store its location and build schematic in case of a server reboot or when the chunk unloads.
  • Try thinking of some sort of path finding algorithm to avoid excessive movements (CoolIsTheName007 did a lot of research on this).
  • Fleet control wasn't really on my list, but it could help a great deal. So maybe…
Vas #67
Posted 10 June 2013 - 01:39 AM
One issue I had when I downloaded a schematic, is it had like 40 different block types in it so I couldn't do that with the limited 16 slots. :P/> Maybe something that will attempt to place all blocks in a level, if some weren't there it can pull from a chest what it needed replacing slots and such? THough that's getting much more complex I bet. :P/>

http://pastebin.com/789upkpX - is this correct? For the use of 16 slots. I don't know programming of any kind so I wouldn't know if I was right or not. I changed 2 9s into 16 and left the others alone since they didn't seem to be part of the code, were more like block IDs.
Orwell #68
Posted 10 June 2013 - 10:10 PM
One issue I had when I downloaded a schematic, is it had like 40 different block types in it so I couldn't do that with the limited 16 slots. :P/> Maybe something that will attempt to place all blocks in a level, if some weren't there it can pull from a chest what it needed replacing slots and such? THough that's getting much more complex I bet. :P/>

http://pastebin.com/789upkpX - is this correct? For the use of 16 slots. I don't know programming of any kind so I wouldn't know if I was right or not. I changed 2 9s into 16 and left the others alone since they didn't seem to be part of the code, were more like block IDs.
Oh, I didn't know that. No you change one 9 too many (it was a code from the NBT format) and you missed a 'n>0 and n<10' which checked that the slot was in between 0 and 10.
Here is the a correct adaption: http://pastebin.com/RAztRaLH
Vas #69
Posted 10 June 2013 - 10:45 PM
No you change one 9 too many
Huh, so what did the 9 I change affect? xD My turtle seems to be running fine right now. I'll go stab it with a knife and give it a new code. I wish I could delete programs from it's list.
Orwell #70
Posted 10 June 2013 - 10:49 PM
No you change one 9 too many
Huh, so what did the 9 I change affect? xD My turtle seems to be running fine right now. I'll go stab it with a knife and give it a new code. I wish I could delete programs from it's list.
In command-line:

rm programName
;)/>
You changed the code for a list in the NBT data. But I don't think the schematic files use lists, so you had luck. ;)/>
Oh yeah, what I meant to say earlier. If there are more than 16 materials needed.. Just returning to a chest for the next materials wouldn't be so handy because you can't know what item is which. The automatic refill would work because the turtle can always keep one of each item, thus sucked items from the chest would append to the allready loaded items.
Vas #71
Posted 11 June 2013 - 11:03 AM
Well the new program you linked still doesn't let the turtle use last 7 slots.

What if you used AE chests by the way? The "ME Chest" which will have items stacked in a single stack no matter the amount. Would this help any? For example, I have an ME Chest here near the turtle work zone with the exact amount of metal needed in order to complete the job which is 45k units. I have an ME network in my base which links multiple drives with a few chests as well to a single interface so I can see all my assets at once. Might be easier since each item will take one slot in the ME network and you might be able to number it all that way so it knows which locations. I dunno how it works though so I guess it'd be to complicated. :P/>

I guess if multiple turtles could work on the same job then it'd work out cause each one would have a seperate material to work on but I don't think they'd work to frendly together as they'd break blocks the other left behind.

One idea would be to make a network program so you could control multiple turtles in the same job. Lining 5 turtles up, giving the front one the job of clearing the grid, when it starts the next turtle moves forward one square (as do the others) and then they get their job like "I want you to work on this 16 materials", after it begins the next 3 move up and you repeat the same program with different materials, repeat till all 5 turtles are busy and if one stops in front of them, they all hault and wait like as if a player were in the way. Does that sound like it'd work? (Even though it'd be complex to program lol) Would it be to complex to work on? :P/>
kikken #72
Posted 11 June 2013 - 09:28 PM
what is the maximum number of blocks that this program can handle? it seems that when i make large schematics in mcedit that it doesn't regester the blocks for some reason
Vas #73
Posted 15 June 2013 - 10:21 PM
Server reboot survivability is really really needed >.> I have to reboot the server every 24 hours to do a manual backup and this schematic takes more than 100 hours to complete because it takes so long to do one level. :/ I had 10 levels done and forgot about it when rebooting the server again 3 days later. 10 levels out of 28.
Dex_Luther #74
Posted 16 June 2013 - 01:51 PM
Not enough air, please refill?
Lol, that doesn't seem right. I should really rewrite this some time.

It would be really great. It's an awesome little program. I've had the same problem as Vas. Getting the schematic file to work is a little hit or miss. Making schematic files with Single Player Commands seems to fair better than MCedit.

Fleet control would be really neat, but sounds like something EXTREMELY complicated to do. Maybe have a computer run the build program and pass instructions on to a set of turtles.

Anyways, +1 internets for your great work and good luck on your finals.
Jowajon #75
Posted 29 June 2013 - 07:42 PM
Using pastebin to get schematic files on a server doesn't work. I haven't found a way to do this.
Vas #76
Posted 09 July 2013 - 10:28 AM
Hey, if you're still around. I was hoping you could add a feature to the schematic builder. Or at least make a version that can help me accomplish my goal. :P/>

Your turtle already reads the schematic files, I was hoping it could translate it into a table which could then be saved to a file. I need my project saved in table format so I can make a layer by layer image of it, or a database, or a spreadsheet, whichever is easiest. I just need the data exported so it can be displayed visually layer by layer as if a map to the schematic outside the game.

Basically I'm trying to get my schematic into the game called StarMade, but I have to build it 100% manually since no one's made any schematic import tools or translate tools and such. Nothing to translate Minecraft schematics into StarMade schematics.
Shirkit #77
Posted 10 July 2013 - 03:25 PM
Throwing me an error. I don't know if this is due to me export using MCEdit, but the block.data information seems nil.

schema:365 table index expected, got nil

In that scope, the var blockData is nil, I don't know why. Maybe parsing error? It's detecting the width, height and length of the file, and the amounts of each block.

And I did extracted the schematic file.
kharis #78
Posted 12 August 2013 - 09:07 PM
I hope this is still on your todo list. I am trying to load a rather large schematic and the turtle is giving me this error
266:  too long without yielding

schematic is 220x183 but only uses 4 types of blocks
lordphoenixmh #79
Posted 06 September 2013 - 01:36 PM
i love this little Program, nice piece of work! But sadly the Admin of my server did not allow schematics and do not allow http access for CC!

but to copy the code i got CC-Copy, wish works fine for normal code, but not for schematics.

so i wrote a small program, to convert the schematic file into a table, searialize the table and safe the file local. Now i can copy the file with CC-Copy, on the Server i have the same converter running, to unsearilize the string, wish was given by CC-Copy and safe it as schematic file.

pretty easy thing, for "just" playing around with turtles and schematics ;)/> but in bigger projects i love it ;)/>


Usage:
goto your local minecraft world, copy the schematic file into your turtle folder, copy the "convert" script in the same folder

Run:
convert toStringFile schematicFileName convertedFileName

than Copy the convertedFile and the convert scropt with CC-Copy to the Server you are on and run:
convert toByteFile convertedFileName newSchematicFileName

as i said just usefull for ppl like me who are playing on a server without http and/or posibility to upload directly (like schematics)

fileName: convert
code:
Spoiler

local tArgs = { ... }

function printUsage()
  print("Usage: convert toByteFile <Input file name> <Output file>")
  print("Usage: convert toStringFile <gunzipped schematic file | Input file name> <Output file>")
end

function convertToStringFile(inputFileName, outputFileName)
  if not fs.exists(inputFileName) then
	print("InputFile: " .. inputFileName .. " does not exist.")
	printUsage()
	return
  end
  if fs.exists(outputFileName) then
	print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
	printUsage()
	return
  end

  local inFile = fs.open(inputFileName, "rb")

  local byteArray = {}
  local byte = 0
  while byte ~= nil do
	byte = inFile.read()
	table.insert(byteArray, byte)
  end

  outFile = fs.open(outputFileName, "w")
  outFile.write(textutils.serialize(byteArray))
  outFile.close()
end

function convertToByteFile(inputFileName, outputFileName)

  if not fs.exists(inputFileName) then
	print("InputFile: " .. inputFileName .. " does not exist.")
	printUsage()
	return
  end
  if fs.exists(outputFileName) then
	print("OutputFile: " .. outputFileName .. " does exist, please delete it before or choose another filename.")
	printUsage()
	return
  end

  local inFile = fs.open(inputFileName, "r")
  local charArray = {}
  charArray = textutils.unserialize(inFile.readAll())
  inFile.close()


  local outFile = fs.open(outputFileName, "wb")

  for _, byte in ipairs(charArray) do
	outFile.write(byte)
  end
  outFile.close()
end

function main()

  if #tArgs ~= 3 then
	printUsage()
	return
  end

  if tArgs[2] == tArgs[3] then
	print("inputFileName and outputFileName are the same, please correct that")
	printUsage()
	return
  end

  if tArgs[1] == "toByteFile" then
	convertToByteFile(tArgs[2], tArgs[3])
  elseif tArgs[1] == "toStringFile" then
	convertToStringFile(tArgs[2], tArgs[3])
  else
	printUsage()
  end
end


main()


Thanks a bunch for this. The server I'm does have Http access but I don't think the sever owner will go for schematic files.
adencraft2000 #80
Posted 08 September 2013 - 09:38 PM
THIS SOUNDS AWESOME!!!!!
Andruvan #81
Posted 15 November 2013 - 08:42 AM
Thank you for this script, I love it! Builder turtles are awesome =)

My todo list for this program at the moment is:
  • Implement the gzip inflate algorithm so there's no confusion anymore about decompressing the schematics.
  • Upgrade slots size.
  • Keep account of fuel.
  • Return to initial position to fetch items from a chest.
  • Make it store its location and build schematic in case of a server reboot or when the chunk unloads.
  • Try thinking of some sort of path finding algorithm to avoid excessive movements (CoolIsTheName007 did a lot of research on this).
  • Fleet control wasn't really on my list, but it could help a great deal. So maybe…

Crossing my fingers hoping for an update with maybe a few of these features in the near future =)

Regards,
Andruvan
Edited on 15 November 2013 - 07:42 AM
pogof #82
Posted 08 December 2013 - 02:23 AM
Nice program. It's cool :D/>
-pogof
vico #83
Posted 18 September 2015 - 05:12 AM
I know bump a topic is a very bad idea, but this one is a fantastic piece.
Sadly, it give me errors using schematics created using standard versions os MCEdit (either Unified or 2.0 channels). I believe is something related to new block format of 1.7, because very old schematics (created with mcedit 1.x from pre 1.6) can be used with this code.

So, is another schematic or related builder (other than npainpro)? Idk if someone was willing to create a builder which reads AtomicStriker's .tml or Bo2/Bo3 formats…
Bomb Bloke #84
Posted 18 September 2015 - 07:33 AM
1.7 added the ability to define blocks by names, using a <parent>:<block> format; for example, "minecraft:stone" or "moarperipherals:blockIronNote". It still has support for referring to blocks via ID numbers, but using string references instead greatly simplifies things in many ways.

Other than this script, the only other "schematic builder" for turtles that I'm aware of is this one, which I assume is outdated in the same way. Not that I've really looked.

I've written WorldPorter (which uses Minecraft commands via Command Computers to get things built, as opposed to using turtles), though it uses its own format for saving and loading areas and requires OP permissions on the server in order for a player to actually run it. It shouldn't be much trouble for me to modify it to deal with other file types, if you can come up with the relevant documentation for the formats you want, but it may serve your needs as-is.

I haven't tried it, but I'd assume this WorldEdit script has similar features. I've no idea what sort of file support it has.
vico #85
Posted 19 September 2015 - 11:32 AM
1.7 added the ability to define blocks by names, using a <parent>:<block> format; for example, "minecraft:stone" or "moarperipherals:blockIronNote". It still has support for referring to blocks via ID numbers, but using string references instead greatly simplifies things in many ways.

Other than this script, the only other "schematic builder" for turtles that I'm aware of is this one, which I assume is outdated in the same way. Not that I've really looked.

I've written WorldPorter (which uses Minecraft commands via Command Computers to get things built, as opposed to using turtles), though it uses its own format for saving and loading areas and requires OP permissions on the server in order for a player to actually run it. It shouldn't be much trouble for me to modify it to deal with other file types, if you can come up with the relevant documentation for the formats you want, but it may serve your needs as-is.

I haven't tried it, but I'd assume this WorldEdit script has similar features. I've no idea what sort of file support it has.

Sadly, i need to cheat (in survival) to use both (to get Command Blocks or to paste things in worldedit).

In fact, i dont know exacly why schematics written in previous versions of MCEdit works, while the very same schematic saved in newer versions dont work. Plus, i couldn't find any version of MCEdit "contemporany" to 1.6, able to deal with data ids (all of schematics i use lay on vanilla items, so id mismatch isnt a problem). Mostly the guys from that screwed all to update MCEdit to 1.7
Bomb Bloke #86
Posted 19 September 2015 - 01:04 PM
In fact, i dont know exacly why schematics written in previous versions of MCEdit works, while the very same schematic saved in newer versions dont work.

Well, let's assume MCEdit moved on to a format that referred to blocks using strings (a far superior method of doing things), instead of ID numbers - since MC 1.7 still supports numeric IDs, this script would still work with older schematics. But since the script doesn't support the new string ID format, modern schematics would be a no-go.

Of course, any updates to the schematic format have the potential to break things. That's simply one of the joys of trying to support a non-standardised format that you don't own - you either keep updating your codebase, or it breaks.
vico #87
Posted 12 October 2015 - 12:41 AM
I think i nailed the problem. In fact this issue wasnt related to 1.7 item format names or wharever.
Just open the schematic in MCEdit (even the most recent version of "Unified" branch), select all and delete all entities with "Delete Entities" button.
I made this with the latest version of mcedit and the schematic loaded just fine!

Another tip, mostly for people trying to get ride of the AIR problem:
  • Open the program with an editor;
  • Search for the function place() (in modern text editors, line 308);
  • Replace it for that:

function place()
iteminfo = turtle.getItemDetail()
if iteminfo then
  if iteminfo.name ~= "minecraft:wheat_seeds" then
   while not turtle.placeDown() do
	turtle.digDown()
   end
  else
   if turtle.detectDown() then
	turtle.digDown()
   end
   turtle.placeDown()
  end
end
end
  • Now when you load a schematic, reserve any slot with a full pack of wheat seeds. Then assign air (and any unneeded blocks) to that slot and voila, a clean building!
Edited on 12 October 2015 - 02:34 AM
moomoomoo3O9 #88
Posted 31 May 2016 - 10:02 PM
1.7 added the ability to define blocks by names, using a <parent>:<block> format; for example, "minecraft:stone" or "moarperipherals:blockIronNote". It still has support for referring to blocks via ID numbers, but using string references instead greatly simplifies things in many ways.

Other than this script, the only other "schematic builder" for turtles that I'm aware of is this one, which I assume is outdated in the same way. Not that I've really looked.

I've written WorldPorter (which uses Minecraft commands via Command Computers to get things built, as opposed to using turtles), though it uses its own format for saving and loading areas and requires OP permissions on the server in order for a player to actually run it. It shouldn't be much trouble for me to modify it to deal with other file types, if you can come up with the relevant documentation for the formats you want, but it may serve your needs as-is.

I haven't tried it, but I'd assume this WorldEdit script has similar features. I've no idea what sort of file support it has.

Ironically, I'm here, the author of that WorldEdit script, trying to take apart the Schematic format in order to add support to it for WorldEdit.

By the way, the format it uses is similar to WorldPorter, a custom one (AKA a serialized table). Theoretically, I can get it to support schematics. I'll see if I can get it working. If not, oh well.
vico #89
Posted 13 June 2016 - 02:07 PM
Well, sorry the necro, but i'm having interest on update the script.

Here the repository.

My top priorities now are:
  • Add the data values for newer items;
What i already did:
  • Added "support" for add wheat seeds in a slot to assign air and another unwanted blocks (another items will make the turtle stop);

I need to know about Orwell how the license he want to be licensed, or not at all (if this is the case, i would delete the repository). And of course contact Syli if he agrees to me ship your converter program in the repo for user easiness.