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

Ultimate Crafting Turtle

Started by Marval, 15 May 2013 - 08:13 AM
Marval #1
Posted 15 May 2013 - 10:13 AM
This program use Crafting Analytical Turtle using this mod ->
http://www.computerc...-item-analyzer/

You need to place chest and the turtle in front of it. Then you only need to put what ever you want to that chest, run program and type ID or ID:META of item you want to craft and amount of items you want to craft. This program will try to craft it, when something is missing, then program try to craft that thing, when missing item is something that can't be crafted, then it's print a command to put this item in to the chest.
I'm not programmer or something like that, I did in only for fun. There's a list of recipes (tCraft table) that must be expanded by new recipes (actually there are about 100 recipes), I think that when you look in to this table, you will know how to write new recipe. Remember to fuel the turtle before you start crafting thinks.
My code maybe isn't something awesome but its working :)/>. Feel free to adding new recipes.
The commands actually are in Polish but there are easy to translate. If some people really want me to translate this I can try.
And in the end, sorry for my English :)/>

EDIT:
Recipes are now in separate file.
Two options to add new recipe in a program, by typing or scanning items in turtle inventory.

There is program:
https://www.dropbox.com/s/swr4qwimmws4pn8/craft2?v=0mcn
and pastebin version
http://pastebin.com/b2fc4912

and my list of recipes (about 120 recipes)
https://www.dropbox.com/s/6eb90lkhby1kv95/receptury?v=0mcn
unobtanium #2
Posted 15 May 2013 - 10:25 AM
Wouldnt it be easier to use the item names instead of all these ids? It might be more identical at the first look, but they can be different in the ftb modpacks, because of the different amount of items they contain.

What about adding a way to add more recipes ingame. Placing the recipe in the 3x3 slots in the top left and the item which gets crafted in slot 16 (or let it craft it right away… i mean its a crafty turtle ;D). You just have to add a recipe to the array/table and save/load it into a file. This would be great if someone is crafting various items over and over again, and simply can add it to the list.

PS: Pastebin is allways nice to see.
Marval #3
Posted 15 May 2013 - 11:01 AM
1 - The problem with names is that there are some block/items with the same name.
2 - Your suggestions about making recipes in-game are interesting, I will try to do this in the future.
unobtanium #4
Posted 15 May 2013 - 11:28 AM
But you have to make different versions of your program for different modpacks if you are using ids. I dont know which one is better :s
Marval #5
Posted 22 May 2013 - 02:47 PM
I've made an update.
Now you can add new recipes using this program.
Recipes are in a separate file.
You can add new recipes by placing elements in turtle inventory like in crafting table and run the scanning function. The program will scan items, craft the desired item, scan the result and write everything into a file.
Second option is to type the recipe, then you can type ie. 5 = 17;0;0;17;0;0;0;0;0, where 5 is the ID for planks and 17 is wood. When you don't write the metadata, the program will use everything what has ID 17 (several types of wood). When you use scanning function and standard wood, the recipes will look like this: 5 = 17:0;0;0;17:0;0;0;0;0;0, that will work only with that specified wood.
I hope you understand that In the future I want to add a short clip to show how it works.
This program is very useful when you're crafting complicated things which require many resources to be crafted. It will do this automatically. For example, you can put wood in the chest and type: 270 - (wooden pickaxe) - the program will craft planks, stick, planks again and pickaxe.

Make sure that in someone9999.ccaddons.cfg is:
B:methodErrorsReturnFalse=true

Links are in first post.