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

MLG Mining: Circular Branch Mining

Started by Ulthean, 06 December 2012 - 09:18 PM
Ulthean #1
Posted 06 December 2012 - 10:18 PM
I am currently working on my master's thesis and won't be able to answer questions/continue development until the end of march. If you have any questions still feel free to post them, already some amazing forum members have stepped up to provide other users with feedback/solve their problems.

Summary
Like many before me, I too have made a branch mining program (or rather, programs), this time, a circular mining design. With the default parameters, which will be discussed later, these programs will:
  • DigTunnels: Dig the 4 main tunnels (this step is optional)
  • DigShafts: Dig out the branching mining shafts (this step is optional but highly adviseable, else the inventory will fill up too fast)
  • DigOres: The main program: excavates all ore veins in those shafts
  • DigAndExcavate: Combines the functionality of the three previous programs
All of this spanning a whopping 128x128 blocks! (Parameters can be altered to meet your personal requirements)

Features
  • Quickly excavate loads of ores at a time
  • Highly flexible through the use of (optional) command line arguments and a config file
  • Automatic updating (checks for updates each time the world/server is loaded)
  • Automatic dropoff/refueling
  • Can place torches if desired
  • Handles gravel/bedrock/cobblestone generators/players/other turtles
Thanks To
SpoilerSuggestions:
  • HelloTeam (suggested having a message if the turtle can't find enough fuel)
  • markusla (suggested to have a noFuel mode)
  • moverperfect (suggested having a single program download the others)
  • OreCruncher (suggested to allow the turtle to skip levels/tunnels)
  • pingwel (suggested a script to delete the files, which lead to my idea of adding an updater)
  • SuperBrian (suggested to have the turtle place torches and handle mobs/the player)
  • tuxhedoh (suggested having some examples of the configuration)
  • ZekwaldiX (suggested to add comments and to have a config file)
Bug-reports:

TRAILER:

http://www.youtube.com/watch?v=j_JPppTSqBA

TUTORIAL:

http://www.youtube.com/watch?v=Re24QTxK3Go





'Installing' the programs
SpoilerInstalling the programs is now easier than ever:
  • THE EASY WAY:
  • If the HTTP api is enabled on your server (or SSP world) you can use the following commands and the turtle will automatically download the other programs (profit!) > pastebin get DwJDDMJc startup > startup
  • THE HARD WAY:
  • Alternatively download the program files using the following link and manually drop them in the computercraft folder > LINK WILL BE UPDATED
    • Go to your minecraft folder (or the folder of the modpack if you are using Tekkit/FTB/…)
    • Under saves: go to your world folder
    • Open up the folder 'computer'
    • In minecraft: open the turtle you want to install the programs on and type "edit flag", then press control and then save and exit the file
    • Under the 'computer' folder you will see some numbered folders '1', '2', '3' etc, find the folder containing a file named 'flag'
    • Drop the files from the archive in this folder, the turtle now has access to the files

Parameters
SpoilerThese are the command line arguments that can be used, the parameters in the config file are very similar

Configuring the programs
SpoilerThe programs can be configured in three ways:
  1. Using command line arguments
  2. Using the config file
  3. Editing the values in the program itself
This is also the order of 'importance' assigned to parameters (from highest to lowest) this means that if you use a command line argument, for example to specify the number of shafts to dig, it will override the values in the config file or in the program itself. As mentioned before both command line arguments and the usage of the config file is entirely optional.

Examples of command-line arguments (assuming no config file):
digTunnels -numL 3 -numS 6
–> This will dig 4 tunnels (the default) on 3 levels, each tunnel long enough so 6 shafts can be dug.

digTunnels -numL 3 -numS 6 -skipL 1 -skipT 2
–> Suppose the previous operation failed for some reason (the server restarting). At this point in time the program isn't capable of recovering from this. However, the user can pick up the turtle, move it back to the original refuel/dropoff station and use these parameters. The turtle will then skip the first level, and only dig the third and fourth tunnel there (since he skips two). Apart from this the program will behave just like the one above. So on the next level the turtle will dig all four of the tunnels.

digShafts -numS 6 -noFuel -torches -torchS back
–> The turtle will visit all 4 tunnels on this level, digging 6 pairs of shafts (left and right) in each. The other parameters specify that the turtle does not require fuel to operate and is expected to place torches in the shafts, the turtle can restock on torches by checking the chest behind the turtle.

digAndExcavate -numIgnore 5 -oneChest
–> The turtle will dig the tunnels and shafts on as many levels, tunnels and shafts as indicated by the default values or the config file. It is configered to have 5 block types it will not excavate (example: stone, dirt, gravel, wood, stone bricks) and the last parameter tells the turtle that there is only a single refuel/dropoff station: at the current position of the turtle. So if fuel is low or the inventory is full he will come back here to restock.

Code
Spoilerapi_digOres: http://pastebin.com/fRh3UXa6
api_digShafts: http://pastebin.com/4WXLRjG0
api_digTunnels: http://pastebin.com/4a3bDMkD
api_sharedFunctions: http://pastebin.com/0XwBmGEi
api_turtleExt: http://pastebin.com/fn8cEbYq
changelog: http://pastebin.com/r905iN2n
config: http://pastebin.com/9F7XU4fS
digAndExcavate: http://pastebin.com/0f233Ez1
digOres: http://pastebin.com/BMyXZ3vU
digShafts: http://pastebin.com/609mDbrc
digTunnels: http://pastebin.com/GLD1XBnu
startup: http://pastebin.com/DwJDDMJc

Images
SpoilerOUTDATED
1. What happens when you have multiple of these circular excavation stations stacked on top of each other + digSidesToo=true -> Awesomeness!


2. My standard design for a docking station: Lava buckets at the top, chest to drop items at the bottom and a disk drive at the back.


3. Multiple docking stations arranged in a circle with radius 3.

Guidelines
  1. First try it on a small scale, for example: a tunnel of length 1. This way you are sure that you positioned all the docking stations correctly
  2. I will do my best to keep the information above as understandable as possible, should you have any questions: feel free to ask :)/>
Gamewalker #2
Posted 10 December 2012 - 09:24 PM
Hi, dont get it to work, the turtle starts mining a 3x3x1 tunnel and then it dont go forward.
It digs tunnel length the 3x3x1 and then it go back, is there a missing forward line?
Could you make a short yt video?
Ulthean #3
Posted 11 December 2012 - 10:35 AM
Hi, dont get it to work, the turtle starts mining a 3x3x1 tunnel and then it dont go forward.
It digs tunnel length the 3x3x1 and then it go back, is there a missing forward line?

You are completely correct, right before making the post I made some minor changes, and I had an incorrect if-statement.
In any case, the digTunnels pastebin code has been updated and is working now.
Bubba #4
Posted 11 December 2012 - 11:28 AM
Looks pretty neat. Can't test it right now as my Java installation is broken (stupid Macs) but the code/pictures look good.
Ulthean #5
Posted 11 December 2012 - 04:01 PM
Added a basic video tutorial/showcase.
oktabyte #6
Posted 12 December 2012 - 02:37 AM
A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?
Ulthean #7
Posted 12 December 2012 - 03:05 AM
A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?

This is possible, though it's a pretty busy week so this may have to wait until next week (maybe sooner).
Do you know why it got stuck? I assume you mean during the 'digOres' execution right?

Currently working on an update, including this
oktabyte #8
Posted 12 December 2012 - 04:32 AM
A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?

This is possible, though it's a pretty busy week so this may have to wait until next week (maybe sooner).
Do you know why it got stuck? I assume you mean during the 'digOres' execution right?

Currently working on an update, including this
yes, it gave me some weird message, i might be able to look back my recordings of the last few hours and find out which but I guess until i find it you will already have it fixed^^
Ulthean #9
Posted 12 December 2012 - 05:00 AM
The pastebin files have been updated, changes include:
  • Automatic return when inventory is full or fuel is low, given adequate fuel (there is a new parameter: refuelTresh) this should increase excavation speed aswell.
  • Digging tunnels with digSidesToo=false is now more efficient.
oktabyte #10
Posted 12 December 2012 - 06:59 AM
The pastebin files have been updated, changes include:
  • Automatic return when inventory is full or fuel is low, given adequate fuel (there is a new parameter: refuelTresh) this should increase excavation speed aswell.
  • Digging tunnels with digSidesToo=false is now more efficient.
You are awesome!

nothing else you can say about that
Ulthean #11
Posted 12 December 2012 - 07:29 AM
You are awesome!

nothing else you can say about that

If you take the time to test the program and give feedback it's only normal for me to listen to what you have to say :)/>
Should you encounter any difficulties be sure to report them and I will get back to you ASAP
ZekwaldIX #12
Posted 12 December 2012 - 07:19 PM
Hmm, I was about to post a message about how the turtle doesn't line up for the 2nd tunnel and then I noticed that the radius for the inner square had increased by 1 to 5 instead of 4 as the OP states.
Oh, and seeign as I'm not that terribly good at programming could I ask of you to put in some comments describing the functions. Now, the names probobly should be enough but I feel that it would've been nice to have additional comments describing what it's supposed to do, for learning purposes ofc.
I hope it's not too much to ask for and if it is I'll just have to try harder.
Ulthean #13
Posted 12 December 2012 - 11:32 PM
Hmm, I was about to post a message about how the turtle doesn't line up for the 2nd tunnel and then I noticed that the radius for the inner square had increased by 1 to 5 instead of 4 as the OP states.
Oh, and seeign as I'm not that terribly good at programming could I ask of you to put in some comments describing the functions. Now, the names probobly should be enough but I feel that it would've been nice to have additional comments describing what it's supposed to do, for learning purposes ofc.
I hope it's not too much to ask for and if it is I'll just have to try harder.

You are indeed correct about the radius, I noticed this when making the video and decided to change it (in the OP aswell). Later today I will also put an updated image online, since the last one was wrong.

I will add comments to the files aswell, I'll get back to you once that is done.
ZekwaldIX #14
Posted 13 December 2012 - 01:55 AM
You are indeed correct about the radius, I noticed this when making the video and decided to change it (in the OP aswell). Later today I will also put an updated image online, since the last one was wrong.

I will add comments to the files aswell, I'll get back to you once that is done.

That would be most kind of you
Ulthean #15
Posted 13 December 2012 - 02:13 AM
Comments have been added to the code and the image has been updated.

Let me now if any parts are still unclear and I will do my best to explain it/update the comments in the code.
kann13 #16
Posted 13 December 2012 - 03:44 AM
Thank you so much for this. I am very new to Computercraft and to programming specially LUA. The comments you added, only after a cursory look at them have already cleared up a lot of things for me and will help me learn more about LUA programming.

I have done very minimal testing since I have not had much time to play, I think a nice addition to the code would be a function for torch placement.
Ulthean #17
Posted 13 December 2012 - 03:54 AM
Thank you so much for this. I am very new to Computercraft and to programming specially LUA. The comments you added, only after a cursory look at them have already cleared up a lot of things for me and will help me learn more about LUA programming.

I have done very minimal testing since I have not had much time to play, I think a nice addition to the code would be a function for torch placement.

Thank you for the kind words, should you encounter any parts that aren't clear feel free to ask me.

About the torches, I have thought about it, but so far decided against the addition, the reason for this being that it would take up an extra slot in the 'digOres' turtle.
(since otherwise he would consider the torch a 'special' block and 'excavate it')
tacomental #18
Posted 13 December 2012 - 12:46 PM
I made an account to say the same thing. Your code is very clear and seems quite well formed. Thanks for the boost on figuring this stuff out.
Ulthean #19
Posted 13 December 2012 - 09:44 PM
I made an account to say the same thing. Your code is very clear and seems quite well formed. Thanks for the boost on figuring this stuff out.

Thank YOU!
SuperBrian #20
Posted 15 December 2012 - 07:21 AM
So I think this is pretty great. Only suggestion: Could you have the turtles drop torches periodically? Maybe pickup from the fuel chest? I'm finding myself spending a lot of time running behind the turtles cleaning up so i dont have creepers ruining my setup.
SuperBrian #21
Posted 15 December 2012 - 05:57 PM
So I think this is pretty great. Only suggestion: Could you have the turtles drop torches periodically? Maybe pickup from the fuel chest? I'm finding myself spending a lot of time running behind the turtles cleaning up so i dont have creepers ruining my setup.

Also, the turtles need to handle mobs / other turtles. I suppose it wouldn't be too difficult to write either of these things in myself.
Ulthean #22
Posted 16 December 2012 - 12:23 AM
I will probably add an updated version tonight (CET, so in about 12 hours), planned features include:
  • Placing torches (optional)
  • Handling mobs/turtles
  • Improved command line parameters so the order no longer matters (example: digTunnels -torches true -length 16)
If anybody has any other suggestions (or comments about the planned features) I would love to hear them.
Choumiko #23
Posted 16 December 2012 - 05:16 AM
Hi, great programm so far, and i also like the planned features.
But i think i have found a bug with the digOres programm.

When the turtle finishes digging the ores in one tunnel it gives an error like:

- attempting to compare string with int @digOres Line 300 (i broke the turtle. so no exact msg)
- digOres:300: attempt to compare string with number expected, got string

The turtle also digs 3 blocks gorward at the end of the 3x3 tunnel it just finished and then stops with above error
Parameters used: digOres 5 2 3 5 4
CC version: 1.47, MC: 1.4.5
I also have miscperipherals 2.1 installed, but the turtle is a standard wireless mining one.
I haven't gotten to analyze the code, but the error is in the function moveToNextTunnel and from the position the turtle is when the error is raised i assume it somehow didn't go back to the chests (ores where in it's inventory)

Hope this info helps finding the bug :D/>

Edit: Corrected error message
Ulthean #24
Posted 16 December 2012 - 06:21 AM
- digOres:300: attempt to compare string with number expected, got string
- The turtle also digs 3 blocks gorward at the end of the 3x3 tunnel it just finished and then stops with above error

I found the two bugs, thanks for pointing it out, it will be in the update released tonight.
(Attached the files for now, only changed the parameters at the start. (added: tonumber(…) around some variables))
Ulthean #25
Posted 16 December 2012 - 06:02 PM
The code has been updated, features include:
  • Placing torches (optional)
  • Handling mobs/turtles
  • Handling bedrock/cobblestone generators (with a timeout)
  • Improved command line parameters so the order no longer matters (example: digTunnels -l 16 -torches -radius 4)
  • Removal of bugs
  • Introduction of other bugs (most likely)
The code hasn't been fully tested yet and unfortunatly I don't have the time to write an update manual in the original post.
Here's the gist of it:
  • Ingame: use digTunnels -help to get information about the command line parameters, same goes for digShafts and digOres
  • Always reserve the first slot for your torches.
yarma92 #26
Posted 17 December 2012 - 02:57 AM
When using the following line to start digTunnels:
digTunnel -l 32 -torchs -torchS up

It returns the error saying invalid direction. This is happening regardless of the direction

edit: from some testing I have it seems the direction you specify after -torcheS is not being parsed through correctly

Edit 2: Found a fix my using a loca var to hold the direction and then passing the local var to the direction check.

elseif args[readParams+1] == "-torchS" then
	if not (readParams + 1 < #args) then
	  printManual()
	  return
	end
	local x=args[readParams+2] --This line is the declaration/assignament--
	if not isDir(x) then --originally if not isDir(dir) then--
	  printDirs()
	  return
	end
	torchSuckDir=args[readParams+2]
	readParams=readParams+2
Ulthean #27
Posted 17 December 2012 - 06:16 AM
When using the following line to start digTunnels:
digTunnel -l 32 -torchs -torchS up

It returns the error saying invalid direction. This is happening regardless of the direction

You are correct, I accidentaly put isDir(dir) even though dir wasn't correctly declared/initiated.
Thanks for pointing it out, I will update the code immediatly

I guess I wasn't exactly my sharpest at 6 o'clock in the morning :)/>
OreCruncher #28
Posted 17 December 2012 - 06:49 AM
lol - sounds like most mornings for me. :)/> One thing I came across was specifying the number of blocks to exclude from mining when using digOres. The turtle cranked along and when it went to deposit the ore into the chest it stopped with an error. Maybe the program can check each slot that is supposed to hold an exclusion block and terminate (with an error) if nothing is in the slot.
Ulthean #29
Posted 17 December 2012 - 06:54 AM
lol - sounds like most mornings for me. :)/> One thing I came across was specifying the number of blocks to exclude from mining when using digOres. The turtle cranked along and when it went to deposit the ore into the chest it stopped with an error. Maybe the program can check each slot that is supposed to hold an exclusion block and terminate (with an error) if nothing is in the slot.

Do you still have the error message? And which version of the code you used? (the one I posted last night?)
OreCruncher #30
Posted 17 December 2012 - 06:58 AM
Oh, forgot to make some requests. :)/> Would be nice if there was a way to specify which tunnel to "skip" to when executing a program. It takes a long time to complete something like digOres, and if the turtle croaks for some reason restarting is a pain. Skipping already completed work would speed things up. As for torch laying it would be good to have a separate program that could do it in addition to what you have done. This would allow us to "retrofit" the existing mines without having to re-run the mining scripts. The turtle would remove existing torches in spots it doesn't like, and place the ones it needs.

lol - sounds like most mornings for me. :)/> One thing I came across was specifying the number of blocks to exclude from mining when using digOres. The turtle cranked along and when it went to deposit the ore into the chest it stopped with an error. Maybe the program can check each slot that is supposed to hold an exclusion block and terminate (with an error) if nothing is in the slot.

Do you still have the error message? And which version of the code you used? (the one I posted last night?)
I haven't tried the one from last night. I am in the process of pulling those down. I will let you know what happens.
Ulthean #31
Posted 17 December 2012 - 07:33 AM
Oh, forgot to make some requests. :)/> Would be nice if there was a way to specify which tunnel to "skip" to when executing a program.

Should be fairly easy. When I get around to cleaning up the code (commenting, checking for bugs, reengineering and updating the first post)
I will add the option to skip forward to a specific tunnel and to a specific shaft.
OreCruncher #32
Posted 17 December 2012 - 07:59 AM
OK. I tested not having my exclude ores in the turtle and the program still executed. And before I forget yet again, I think what you have here is pretty cool. I prefer this over the Quarry. This method doesn't leave holes all over the landscape. :)/>
Ulthean #33
Posted 17 December 2012 - 08:21 AM
OK. I tested not having my exclude ores in the turtle and the program still executed. And before I forget yet again, I think what you have here is pretty cool. I prefer this over the Quarry. This method doesn't leave holes all over the landscape. :)/>

I see, you mean if you say it should have 4 exclude blocks but you don't put in any items?
Should be easy to remedy, good call.
OreCruncher #34
Posted 17 December 2012 - 08:25 AM
OK. I tested not having my exclude ores in the turtle and the program still executed. And before I forget yet again, I think what you have here is pretty cool. I prefer this over the Quarry. This method doesn't leave holes all over the landscape. :)/>

I see, you mean if you say it should have 4 exclude blocks but you don't put in any items?
Should be easy to remedy, good call.
Yep. That's it exactly.
SciFiJunkie #35
Posted 17 December 2012 - 08:39 AM
Ok so far I love how this is working. But I did find a problem. digTunnels worked great. Once I figured out that it was not going to clear out the center part, That is what I get for assuming. But the digShafts I did find a problem. Every time I was having it do its thing and it ran in to gravel it will loose track of its location and finish the shaft short. This would then cause it to be off on the chest and every shaft from there on would only get worse if it ran in to more gravel.

I did a quick look through on your code but my old brain is not finding the issue.

But keep up the great work.

SciFiJunkie
OreCruncher #36
Posted 17 December 2012 - 08:58 AM
New problem: "digOres:459: attempt to compare nil with number". The turtle arrived back to drop off it's load when this happened. I looked at the code and line 599 is suspicious to me. Other calls to refuel() appear different from this one. The code I am using was the one you posted last night.
Ulthean #37
Posted 17 December 2012 - 10:37 AM
Ok so far I love how this is working. But I did find a problem. digTunnels worked great. Once I figured out that it was not going to clear out the center part, That is what I get for assuming. But the digShafts I did find a problem. Every time I was having it do its thing and it ran in to gravel it will loose track of its location and finish the shaft short. This would then cause it to be off on the chest and every shaft from there on would only get worse if it ran in to more gravel.

What do you mean when you say 'not clear the center part'?
The center block of the 3x3? With digSidesToo=true? This should be dug aswell, I will look into it and the gravel aswell, since I assumed both of these to be functional.
Ulthean #38
Posted 17 December 2012 - 10:40 AM
New problem: "digOres:459: attempt to compare nil with number". The turtle arrived back to drop off it's load when this happened. I looked at the code and line 599 is suspicious to me. Other calls to refuel() appear different from this one. The code I am using was the one you posted last night.

599 it is, fuelSlot should be removed from the parameter list
yarma92 #39
Posted 17 December 2012 - 12:21 PM
When using the following line to start digTunnels:
digTunnel -l 32 -torchs -torchS up

It returns the error saying invalid direction. This is happening regardless of the direction

You are correct, I accidentaly put isDir(dir) even though dir wasn't correctly declared/initiated.
Thanks for pointing it out, I will update the code immediatly

I guess I wasn't exactly my sharpest at 6 o'clock in the morning :)/>

Its seems to be running through all 3 updated programs with the torches etc. Also i dont know many who are at their best then.
Ulthean #40
Posted 17 December 2012 - 01:17 PM
Next update will be released around tuesday, I am busy until then.
The code is currently in a buggy state, and though it is functional you might want to wait until the next update unless you
are willing to accept that fact.
SciFiJunkie #41
Posted 17 December 2012 - 01:30 PM
Ok so far I love how this is working. But I did find a problem. digTunnels worked great. Once I figured out that it was not going to clear out the center part, That is what I get for assuming. But the digShafts I did find a problem. Every time I was having it do its thing and it ran in to gravel it will loose track of its location and finish the shaft short. This would then cause it to be off on the chest and every shaft from there on would only get worse if it ran in to more gravel.

What do you mean when you say 'not clear the center part'?
The center block of the 3x3? With digSidesToo=true? This should be dug aswell, I will look into it and the gravel aswell, since I assumed both of these to be functional.

Sorry the center part is the 5x5. I did not try the digSidesToo option. Will look at that.

The gravel was falling so every time that it cleared a spot it would pause for a time then continue as if it has actually moved. So from what I can see if it ran in to 3 dropping gravel then it would lose that many off the length of the shaft.

Thanks
fundevin #42
Posted 17 December 2012 - 03:14 PM
Yeah, I seem to have that gravel problem as well. I am totaly willing to wait till tuesday though because this is a great program. Thanks so much!
Ulthean #43
Posted 17 December 2012 - 09:07 PM
@SciFiJunkie Ah, you mean the center where the chest etc are placed? Yeah, it does not clear that. I thought you meant the turtles themselves

I lowered the time it waits for gravel to settle in the last update, which might be causing this problem.
It seemed to work fine on my computer, but I will check it out and probably end up increasing it back to its original value. (0.5 secs, atm it is 0.3)
Ulthean #44
Posted 17 December 2012 - 10:36 PM
Update released, couldn't wait. Update includes:
  • Small bugfixes (the gravel problem among others)
  • digOres checks the number of exclusion blocks provided by the user
  • Can skip forward to a specific tunnel/shaft
  • Updated the ingame help menu
  • Updated the original post to reflect these changes
ToDo:
  • More cleaning up
  • More testing
OreCruncher #45
Posted 18 December 2012 - 03:34 AM
Update released, couldn't wait. Update includes:
  • Small bugfixes (the gravel problem among others)
  • digOres checks the number of exclusion blocks provided by the user
  • Can skip forward to a specific tunnel/shaft
  • Updated the ingame help menu
  • Updated the original post to reflect these changes
ToDo:
  • More cleaning up
  • More testing

Excellent. I will try out later. I did experience two problems yesterday with two of my turtles. I think they occurred once the last shaft in a tunnel was processed. One drilled a single block wide tunnel parallel with the main tunnel and then stopped. The other I found "widening" the last shaft by digging out another layer of rock before I terminated it with extreme prejudice. :)/> The third one I had was merrily digging up ore and was behaving OK.
Ulthean #46
Posted 18 December 2012 - 05:01 AM
Update released, couldn't wait. Update includes:
  • Small bugfixes (the gravel problem among others)
  • digOres checks the number of exclusion blocks provided by the user
  • Can skip forward to a specific tunnel/shaft
  • Updated the ingame help menu
  • Updated the original post to reflect these changes
ToDo:
  • More cleaning up
  • More testing

Excellent. I will try out later. I did experience two problems yesterday with two of my turtles. I think they occurred once the last shaft in a tunnel was processed. One drilled a single block wide tunnel parallel with the main tunnel and then stopped. The other I found "widening" the last shaft by digging out another layer of rock before I terminated it with extreme prejudice. :)/> The third one I had was merrily digging up ore and was behaving OK.

This might be due to the gravel issue. I am currently cleaning up the code and encountered some bugs. 'Finished' version should be up in about an hour.
Ulthean #47
Posted 18 December 2012 - 07:16 AM
Update added, changes include:
  • Cleaned up the code to make it more understandable
  • Testing + removal of bugs
  • Turtle now handles blocked shafts better
tuxhedoh #48
Posted 18 December 2012 - 08:40 AM
I'm impressed, though torch handling needs to be fixed. At some point it runs out of torches, and starts placing blocks instead.

Additionally if you could provide examples in the initial code that'd be helpful , through trial and error I figured out that the command needed is

digTunnels -l 30 -torches
will dig a tunnel 30 blocks long and place torches.

I think the initial documentation would be more helpful if it actually mentioned it needs a third chest for torches.(is this even true?).

Thanks for the hard work.
Ulthean #49
Posted 18 December 2012 - 12:10 PM
I'm impressed, though torch handling needs to be fixed. At some point it runs out of torches, and starts placing blocks instead.

Additionally if you could provide examples in the initial code that'd be helpful , through trial and error I figured out that the command needed is

digTunnels -l 30 -torches
will dig a tunnel 30 blocks long and place torches.

I think the initial documentation would be more helpful if it actually mentioned it needs a third chest for torches.(is this even true?).

Thanks for the hard work.

You are right about the fact that the initial documentation desperatly needs updating. The video itself is already outdated and the images aswell.

About the torches: it is true that you need 3 chests, normally it should restock the torches often enough (from a chest that is positioned behind the turtle by default). Could it be that, because of the lacking documentation, you didn't place a chest with torches behind the turtle and that as such it wasn't able to restock?
OreCruncher #50
Posted 18 December 2012 - 02:26 PM
I tried the version you had earlier in the AM (not the latest). When I got home the two turtles I had running successfully completed digging out the ore from a x64 sized mine. Pretty cool. I will update to the newest version when I move to the next level. BTW, it would be nice if the turtle could "fill in the pavement" when digging into the current "floor". This may be more of a problem than is worth solving.
fundevin #51
Posted 18 December 2012 - 05:52 PM
Great fix Ulthean! Thanks so much!
tuxhedoh #52
Posted 19 December 2012 - 04:24 AM
About the torches: it is true that you need 3 chests, normally it should restock the torches often enough (from a chest that is positioned behind the turtle by default). Could it be that, because of the lacking documentation, you didn't place a chest with torches behind the turtle and that as such it wasn't able to restock?

So there's a good chance it ran out of torches and started placing the blocks (since it was what was now in slot 1). I will make sure that I have enough torches next time.

My suggestions now:
  1. digOres should never attempt to mine bedrock.
  2. maybe it would be possible to "map" the initial shafts such that it already knows where the start of the veins are from the begining and it doesn't have to spend the time checking blocks it already knows are not ores.
Ulthean #53
Posted 19 December 2012 - 07:10 AM
So there's a good chance it ran out of torches and started placing the blocks (since it was what was now in slot 1). I will make sure that I have enough torches next time.

My suggestions now:
  1. digOres should never attempt to mine bedrock.
  2. maybe it would be possible to "map" the initial shafts such that it already knows where the start of the veins are from the begining and it doesn't have to spend the time checking blocks it already knows are not ores.

About the suggestions:
  1. The only way to avoid this is by putting a block of bedrock in the 'ignore' slots. Then it will ignore the bedrock blocks instantly.
  2. Right now when it detects a block it can't mine (a turtle or bedrock for example) it will keep trying for 5 seconds to see if the obstruction is still there (turtles might move out of the way).
  3. This is possible, though in the long run it wouldn't have any added value, since the 'digShafts' function would take much longer
  4. and would need the 'ignore' blocks in its inventory. Apart from that I consider them two seperate functions (digging shafts and excavating shafts) and I would like to keep them seperated.
Ulthean #54
Posted 19 December 2012 - 07:22 AM
Dear readers,

Two questions I need your opinion on:
  1. Would you be interested in an update to the digTunnels/digShafts/digOres functions that allows a single turtle to
  2. excavate multiple layers in succesion? Or do you (like me) prefer to have an individual turtle for each level. (I excavate 16 levels at once, using 16 turtles) If you would like this: what parameters/functionality do you think this should have? Parameters I think of are:
    1. How many levels
    2. Direction (are the other levels above or below this one)
    3. Height of each level
    4. Odd level shaft offset (you might want the shafts odd levels to be placed 'in between' the shafts of the even layers)
  3. Would you be interested in a program that digs the rooms at the center of the 4 tunnels (with the option to do multiple levels at once)
tuxhedoh #55
Posted 19 December 2012 - 08:20 AM
Dear readers,

Two questions I need your opinion on:
  1. Would you be interested in an update to the digTunnels/digShafts/digOres functions that allows a single turtle to
  2. excavate multiple layers in succesion? Or do you (like me) prefer to have an individual turtle for each level. (I excavate 16 levels at once, using 16 turtles) If you would like this: what parameters/functionality do you think this should have? Parameters I think of are:
    1. How many levels
    2. Direction (are the other levels above or below this one)
    3. Height of each level
    4. Odd level shaft offset (you might want the shafts odd levels to be placed 'in between' the shafts of the even layers)
This sounds awesome, though the script in it's current iteration is an early game item. 16 turtles… seems a little much!!

  1. Would you be interested in a program that digs the rooms at the center of the 4 tunnels (with the option to do multiple levels at once)

Yes, Or even an option to dig in the 40+ blocks in one direction to dig the intial hole before if , like me, you'd like to start mining at the bottom of the world instead of the top…. so it would tunnel in 40+ blocks, dig the room at the far end of those blocks that I would then do a digTunnels 40 on…. the initial tunnel would already be started, but it could match up with multiple mining operations horizontally.
OreCruncher #56
Posted 19 December 2012 - 01:10 PM
Actually what I been thinking about is having a turtle dig the mine shaft from the surface creating the necessary rooms and putting in ladders. :)/> As for multiple turtles, I have been running one turtle on each level, and that is a bit of a pain. I was thinking that it would be better to have 4 turtles on a level, each digging/shafting/excavating a north/south/east/west tunnel. All I would then have to do is worry about one layer, but get it done 4x faster. And what would be really/really/really nice is to log the operation into a file on the turtle "disk" so that when it gets lost I could go to windows and look at the file to see where to find it. I don't think GPS type thing is needed - maybe tunnel/shaft/left|right would be good enough.
SciFiJunkie #57
Posted 20 December 2012 - 03:39 PM
@Ulthean

Thanks for the update. I have not had time to look over the new code yet will start testing it shortly.

Can skip forward to a specific tunnel/shaft - I assume you mean you can choose which tunnel it will do. Will it only do that one then stop?
What I'm thinking is that if I have 4 turtles and have them all start each program and only do the first tunnel then stop. would make it easier to mine out an area. Also if something happens you can start it from the original point and then have it skip tunnel 1 and 2 and continue on tunnel 3 for instance.

Also based on the video you have a set of chests at each tunnel. If you don't put them at each one will it work?

Thanks for all your work.

SciFiJunkie
Ulthean #58
Posted 21 December 2012 - 06:57 AM
Tonight = update night! Added features will include:
  • New parameter to allow the turtle will only dig out 1 shaft (have 4 turtles working on one level)
  • New parameter to allow the turtle to digTunnels/digShafts/digOres on multiple levels
  • New program to dig the vertical shaft (basic version, more functionality will be added later)
(I will also answer the questions in the last few posts)
SciFiJunkie #59
Posted 21 December 2012 - 03:55 PM
Hey Ulthean,

Just tried the digOres program with torches. But it when to the first shaft and then dug up about 60 blocks then over 1 block and then back down to bedrock an then had a Java error. I didn't think to write it down but will re run it and then I will. I did try it a second time and it did the same thing.

Thanks,
SciFiJunkie
Azeryuu #60
Posted 21 December 2012 - 04:26 PM
Tonight = update night! Added features will include:
  • New parameter to allow the turtle will only dig out 1 shaft (have 4 turtles working on one level)
  • New parameter to allow the turtle to digTunnels/digShafts/digOres on multiple levels
  • New program to dig the vertical shaft (basic version, more functionality will be added later)
(I will also answer the questions in the last few posts)

About the new program, what options will it have and what options will you add? Can you have an option to place chests/pipes?
Ulthean #61
Posted 21 December 2012 - 05:39 PM
Just tried the digOres program with torches. But it when to the first shaft and then dug up about 60 blocks then over 1 block and then back down to bedrock.
Did you remember to put stone in one of the 'ignore' slots?
Can you give the error message?

About the new program, what options will it have and what options will you add? Can you have an option to place chests/pipes?

At the moment you can specify:
  • How many levels does it need to dig
  • The radius of the center rooms
  • Does it need to place torches aswell?
  • Does it need to place chests aswell?
  • Height per level
  • which direction is the next level (up/down)
  • offset before the first level
I plan to have a program that can create my standard setup: chests, pipes, engines, place fuel in the chests, …

Suggestions are still welcome ofc
Azeryuu #62
Posted 22 December 2012 - 11:48 AM
At the moment you can specify:
  • How many levels does it need to dig
  • The radius of the center rooms
  • Does it need to place torches aswell?
  • Does it need to place chests aswell?
  • Height per level
  • which direction is the next level (up/down)
  • offset before the first level
I plan to have a program that can create my standard setup: chests, pipes, engines, place fuel in the chests, …

Suggestions are still welcome ofc

Awesome, just what I need
SciFiJunkie #63
Posted 22 December 2012 - 02:37 PM
Just tried the digOres program with torches. But it when to the first shaft and then dug up about 60 blocks then over 1 block and then back down to bedrock.
Did you remember to put stone in one of the 'ignore' slots?
Can you give the error message?

About the new program, what options will it have and what options will you add? Can you have an option to place chests/pipes?

At the moment you can specify:
  • How many levels does it need to dig
  • The radius of the center rooms
  • Does it need to place torches aswell?
  • Does it need to place chests aswell?
  • Height per level
  • which direction is the next level (up/down)
  • offset before the first level
I plan to have a program that can create my standard setup: chests, pipes, engines, place fuel in the chests, …

Suggestions are still welcome ofc

I had stone, gravel, dirt, and a couple of pipes as I have them running down one tunnel, but that tunnel is #3 from the start point.

At that point I tried it a few more times with similar results and didn't let it get to the point of error before I went to bed. I will let it run through tonight and see what happens. What 6 items are you putting in it. I will duplicate that and see if I get the same results.

Also I am interested in the new changes as well. One question. With multiple layers will you need chests at each level?


Thanks, SciFiJunkie
SciFiJunkie #64
Posted 22 December 2012 - 04:08 PM
Ok so I let it run through and got the following error. See link for screen shot.

http://imageshack.us/photo/my-images/201/20121221215204.png/

Thanks,
SciFiJunkie
markusla #65
Posted 23 December 2012 - 08:53 AM
Would it be possible to get a switch (-NoFuel) to ignore the fuel-code?
My Turtles does not need any fuel with Tekkit and it looks like your programs don't work well then. :(/>
moverperfect #66
Posted 24 December 2012 - 01:59 PM
  • You cant have stackable tunnels with digsides true and torches, maybe be try put torches on wall instead
  • Also some of the turtles stop working with error "bios:133: Too long without yielding" or "turtle:18: Too long without yielding", anyway to fix this?
Apart from that, i love this script, anyway to add a script that prepares the 5x5 for us from bedrock up to ground level?
moverperfect #67
Posted 24 December 2012 - 11:17 PM
I found a way to fix the second error, have a look at http://www.computercraft.info/forums2/index.php?/topic/5472-error-too-long-without-yielding/
Ulthean #68
Posted 24 December 2012 - 11:23 PM
  • You cant have stackable tunnels with digsides true and torches, maybe be try put torches on wall instead
  • Also some of the turtles stop working with error "bios:133: Too long without yielding" or "turtle:18: Too long without yielding", anyway to fix this?
Apart from that, i love this script, anyway to add a script that prepares the 5x5 for us from bedrock up to ground level?
  • I am aware of the first point you make, the torch placement in the shafts should remedy this though.
  • (I will look into alternative methods of placing torches)
  • Could you tell me where the turtles stopped working and during which program?
  • The script you talk about is being made.
moverperfect #69
Posted 25 December 2012 - 03:16 AM
  • Could you tell me where the turtles stopped working and during which program?

So far it has only happened on digTunnels and digOres, and it has happened abut 3 1/4's through the first tunnel and above, and i dont know on the digOres really.
Ulthean #70
Posted 25 December 2012 - 08:03 AM
I am working on the next update, I will try to put it out tonight, but since it is christmas this might be delayed until tomorrow.
  • Moverperfect: I will look into it
  • Markusla: This is implemented in the next version
  • SciFiJunkie: In the screenshot I see only cobblestone. Are you sure you placed smooth stone aswell? (which you can get by cooking cobblestone)
markusla #71
Posted 26 December 2012 - 01:55 AM
Thanks! :)/>
nanakisan #72
Posted 26 December 2012 - 02:55 PM
Seems i've run into a interesting snag with the digOres program. Even though i have obsidian set as a ore to ignore. It still breaks obsidian it finds. However that wouldn't be a real issue. Its when it finds a massive wad of it ..under water. it proceeds to dig it all up. well and dandy. However it seems that eventually it will become so confused by the obsidian it either shuts down with a memory error. That or it will confuse it original path and start digging completely in the wrong tunnels…i once caught it after this and it tried to dump its inventory into lava…GAHHH.

this happened with cobble from lava to water….

Other then that i have no problems. One suggestion would be on the digores to have it pre-programmed for it to ignore all obsidian,cobble unless its in front of it when its moving. Also another suggestion. for the 1st 2 programs. You have the defaults set up for 16 tunnels. Maybe make the defaults for all people 6 tunnels then let people expand it with their own settings. I find that letting the turtle run with a default of 16 is extremely to long. Otherwise your programs code is excellent!!


OH another idea this is for the digOres program. When it finishes checking a tunnel. Maybe program it to place cobble the start of the tunnel. This way it ignores all tunnels like it does a check for cobble before excuting the tunnels length code. if its detected it moves to the next tunnel.
SciFiJunkie #73
Posted 26 December 2012 - 03:28 PM
I am working on the next update, I will try to put it out tonight, but since it is christmas this might be delayed until tomorrow.
  • Moverperfect: I will look into it
  • Markusla: This is implemented in the next version
  • SciFiJunkie: In the screenshot I see only cobblestone. Are you sure you placed smooth stone aswell? (which you can get by cooking cobblestone)

You know you would think that i would read. I was not putting any SMOOTH stone in it. was a major brain fart.
Thanks for pointing that out. I will correct and try again.

SciFiJunkie
Ulthean #74
Posted 27 December 2012 - 03:43 AM
A quick status update:

I know it's been quite a while since the last update, because of the festivities my life has become pretty chaotic.
Because of this I can't give you an ETA on the next update (shouldn't be too long, most of the work is already done)

What I CAN tell you is that I am absolutely LOVING the changes I made. I thought the program was already pretty polished when
I originally posted it, but during the testing of this version I realize how far we've come. Thanks for all the suggestions and
bug reports, you guys are amazing.

I will keep you posted!
nanakisan #75
Posted 27 December 2012 - 12:09 PM
This is what matters most. You are listening to what we ask and relay to you. You take our suggestions without hesitation. You are doing a very good job. Its an honor to be using such a wonderful set of programs. Thank you.
signorekai #76
Posted 28 December 2012 - 09:28 PM
Just registered to say a big "Thank you" for this script, really love it. It's ridiculously useful.

You should probably point out on your original post that you should also include the redstone engine (if you're using it to power the wooden transport pipe) as well as a lever inside your turtle as things to ignore, if it's right next to the start of the 3 by 3 tunnels. There was an unfortunate series of events where there were redstone blocks right beside the redstone engine and the turtle, upon detecting redstone blocks, dug downwards and then proceeded on to dismantle my entire network of transport pipe as well as the chest I have in the middle to hold all the loot. Then, the server removed all dropped items.

I lost 4 diamonds and 10 uranium and countless other ores. It was both amusing and tragic.

Edit: I think a good parameter to add to digOres is how far it is allowed to wander off its search path. Sometimes when it finds a massive deposit of ores, it goes haywire and dig really really far away, then shutting down because it ran out of space in the array to store its path.
xanderhunter #77
Posted 29 December 2012 - 02:15 AM
As someone new to Coputercraft I have a quick question, am I suppose to copy the whole pastebin file into a floppy, or am I suppose to only put parts of it in?
Ulthean #78
Posted 29 December 2012 - 04:39 AM
As someone new to Coputercraft I have a quick question, am I suppose to copy the whole pastebin file into a floppy, or am I suppose to only put parts of it in?
I suggest waiting until tonight to try it out. A new version should be up by then. BTW, nice profile pic :)/>

Edit: I think a good parameter to add to digOres is how far it is allowed to wander off its search path. Sometimes when it finds a massive deposit of ores, it goes haywire and dig really really far away, then shutting down because it ran out of space in the array to store its path.

I am planning to remove the recursion in the excavation of ores, which should solve this problem.

UPDATE: This is implemented, the functionality remains the same, but without recursion, byebye stack overflows!
signorekai #79
Posted 29 December 2012 - 08:03 AM
I am planning to remove the recursion in the excavation of ores, which should solve this problem.

UPDATE: This is implemented, the functionality remains the same, but without recursion, byebye stack overflows!

Great! Is the pastebin updated? I'll go play around further and try to bug the miner even more. :P/>
Ulthean #80
Posted 29 December 2012 - 09:09 AM
It will be in about an hour.
Ulthean #81
Posted 29 December 2012 - 10:57 AM
Update released.

This update was a pretty major overhaul in the code, I extensively tested it but bugs are sure to arise, keep me informed and I will remove them ASAP.
I will keep working on this tonight, so feel free to either test out the new version right now (for the adventurers among us) or wait a bit longer until more
work has been done

Let me start of with future work:
  • Updating the information in the original post to reflect the new parameters etc
  • Testing and uploading the program that creates the central vertical shaft
  • Expanding the program that creates the central vertical shaft (place pipes etc)
  • Creating a new video
  • Cleaning up the code
  • Creating a program that allows all three other programs to be run one after the other (the reason for the code overhaul, I uniformed the code)
  • Bugfixin'
Changes - General
  • Uniforming/Cleanup of the code
  • More flexibility in the form of new optional parameters
  • (use 'digOres -help' etc until I changed the info in the first post)
  • Offset the shafts on even/odd levels, for increased efficiency
  • Allows the turtle to have a single refuel/dropoff station, instead of one for each individual tunnel
  • (this has advantages, but will make the excavation process slower, since the turtle will have to travel more)
  • Various bug fixes
Changes - digTunnel
  • In the spirit of uniforming: now uses the same parameters as the other two programs to calculate the length of the tunnels
  • (number of shafts, blocks between shafts, offset, …)
Changes - digOres
  • Removed recursion from the ore excavation
  • (AKA no more stack overflows when encountering huge veins (tested this on a vein of 500 blocks))
Ulthean #82
Posted 29 December 2012 - 10:58 AM
@Xanderhunter: You need to 'copy' the entire pastebin files. One for each program.
nanakisan #83
Posted 29 December 2012 - 02:36 PM
I just tested the Ores program for consistency after hunting ores. It worked flawlessly. Thank you for fixing that!! Now i don't have to hunt the little bugger down incase he crashes…

One tiny thing i wish you would add is that it caps of all tunnels its explored with something like cobble (which should be a auto ignored block) This way when you come back after turn the thing off you can just let it run on its merry way as it goes to another tunnel because it detected cobble.
xanderhunter #84
Posted 30 December 2012 - 04:45 AM
@Ulthean Alright thanks, was just concerned because the grey lines seemed to be more instructions on what each part does instead of actual code.
Ulthean #85
Posted 30 December 2012 - 05:58 AM
You are correct, these comments are for myself and other people who want to understand the code. But the turtle will skip those lines, so they can be left in.
Ulthean #86
Posted 31 December 2012 - 02:20 AM
Quick question: I am creating a program that combines the functionality of the first 3 programs (dig a tunnel, dig the shafts, excavates the ores)
It is almost finished, but I was wondering: What would you prefer?
  • Cycle through the programs one after the other: Dig all the tunnels on all the levels, dig all the shafts on all the levels and excavate all the ores
  • (basically this is the same as running the three programs individually, but it saves you some button presses) (This is the fastest option in execution time, but you have to wait the longest to get your ores)
  • Cycle through the programs on level-basis: Dig all the tunnels on one level, dig all the shafts and then excavate all the ores on that level
  • Cycle through the programs on tunnel-basis: Dig one tunnel, dig all the shafts on that tunnel and excavate all the ores in that tunnel
  • Cycle through the programs on shaft-basis: Dig one pair of shafts, and excavate all the ores in those two shafts
  • (Slowest overall execution time, but you get ores in a matter of minutes)
oktabyte #87
Posted 31 December 2012 - 04:47 AM
Quick question: I am creating a program that combines the functionality of the first 3 programs (dig a tunnel, dig the shafts, excavates the ores)
It is almost finished, but I was wondering: What would you prefer?
  • Cycle through the programs one after the other: Dig all the tunnels on all the levels, dig all the shafts on all the levels and excavate all the ores
  • (basically this is the same as running the three programs individually, but it saves you some button presses) (This is the fastest option in execution time, but you have to wait the longest to get your ores)
  • Cycle through the programs on level-basis: Dig all the tunnels on one level, dig all the shafts and then excavate all the ores on that level
  • Cycle through the programs on tunnel-basis: Dig one tunnel, dig all the shafts on that tunnel and excavate all the ores in that tunnel
  • Cycle through the programs on shaft-basis: Dig one pair of shafts, and excavate all the ores in those two shafts
  • (Slowest overall execution time, but you get ores in a matter of minutes)

I would love the one based on each level.
Do you plan a savefile to make the turtle go on where it has stopped if for example the server does a reboot?
ZekwaldIX #88
Posted 31 December 2012 - 06:26 AM
Hmm, what I would realy like is for the turtle to ask me what options I would like to have, a sort of initial setup program that creates a config file for the other programs to use which contains all the variables. If you take a look at Anonomit's Logger programs you'll know what I mean, the turtle asks you what you'd like it to do and then saves those options. Now I realize this probobly requires another rewrite of the code and is more that likely a huge pain in the behind and a bit too much to ask for but I would personally love it and in my opinion would make these programs near perfected and very easy to use for us lazy numbskulls since you don't have to edit the programs yourself.
A mainframe computer hooked up to a monitor which tracks the turtles's progress would also be Extremely cool… With the option to start turtles remotely… just thoughts.. Sorry, I'm probobly making your head hurt.

Oh, btw, I never got back to thanking you for the awesome comments you put into the code explaining the different sections of code, thank you for that and thank you for creating these wonderful programs.
nanakisan #89
Posted 31 December 2012 - 11:46 AM
Personally. I like it already as it is. What i would like to see more over then anything. Is have the program do all things like you suggested. But have it only do 1 side per cycle of the code. instead of having it dig the entire netowork of shafts. Have it only dig 1 side out and its shafts. Then when you run digores. it only does 1 side. When that side is completed you just place either another turtle on the other sides or the same one and start it again. I see this as a advantage in case something happens in your world and you have to start it up again.
Ulthean #90
Posted 31 December 2012 - 04:24 PM
I would love the one based on each level.
Do you plan a savefile to make the turtle go on where it has stopped if for example the server does a reboot?

I am thinking about this, though it is quite complex and will take some time to implement.
(in the case of digOres for example, if the server restarts while excavating a vein it needs to remember a whole lot of variables)

* Config file
* Mainframe
* Thanks for the comments

The config file is pretty easy to implement, I had already thought about it, and it will get implemented.
The mainframe is a possibility, but like oktabytes suggestion will take some time before it gets added
You are most welcome, if you need any other parts explained feel free to ask.

Personally. I like it already as it is. What i would like to see more over then anything. Is have the program do all things like you suggested. But have it only do 1 side per cycle of the code. instead of having it dig the entire netowork of shafts. Have it only dig 1 side out and its shafts. Then when you run digores. it only does 1 side. When that side is completed you just place either another turtle on the other sides or the same one and start it again. I see this as a advantage in case something happens in your world and you have to start it up again.

This is already possible (though the initial post hasn't been changed yet to reflect this):
add "-numT 1" to the command line arguments, in this case the turtle will only do one side.
Hawkertech #91
Posted 01 January 2013 - 05:53 AM
I was just running the digShafts program, your newest one, the turtle doesn't go back to the chest when full it just dumps everything on the floor after it gets full. Same thing with torches it doesn't know it runs out to come back to refuel. it just puts blocks back down. NVM seems to be working the second try

:EDIT I also changed the default distance between shaft to 2 instead of 3 as it was missing the single block ores, I.E. Uranium.
tigar #92
Posted 02 January 2013 - 02:09 AM
made an account just to post this

when using the -nofuel command the following error occurs

digtunnels:655: attempt to compare number with string expected, got number

and then it stops and it does this every single time
Ulthean #93
Posted 02 January 2013 - 02:42 AM
made an account just to post this

when using the -nofuel command the following error occurs

digtunnels:655: attempt to compare number with string expected, got number

and then it stops and it does this every single time

This is easy to fix, I'll have a fixed version up and running within the next 8 hours.
tigar #94
Posted 02 January 2013 - 03:07 AM
thanks as the server i play on has it disabled for the time being(some silly christmas/new year event)

anyway considering no one but you posted up anything of how they build their system here is mine

http://imgur.com/a/VRzMi

the last picture in that album shows how i sort out what goes where
Ulthean #95
Posted 02 January 2013 - 04:00 AM
Very nice, it's fun to see people put it to good use!
ldog #96
Posted 02 January 2013 - 04:31 AM
Love these programs. I've been using them for a while, was just too lazy to register an account.

An improvement I can think of would be to dig the shafts in a circular pattern; so instead of digging all the shafts in 1 direction then going to the left, have it dig the first shaft all the way around, then go out to the next shaft and go all the way around. It would cut a lot of the time the turtle spends traveling empty.

Glad to have torch placement now (been using it since before you added that), needs to add a torch at the shaft corners though, or maybe just start a little further in for the 1st torch. Every other shaft is dark at the end.

Also maybe a way to exclude items from the program defaults instead of (or in addition to) putting blocks in the inventory? For instance I have a fortune 3 pick so I'd rather go mine the diamond, redstone and coal myself, but I dont have a silktouch to get ore blocks (yes I know I can cheat them in if I have to). Not to mention it can take up a lot of space in the turtle inventory.

These programs have been great fun and keep getting better and better. Keep up the good work!
Ulthean #97
Posted 02 January 2013 - 05:08 AM
Love these programs. I've been using them for a while, was just too lazy to register an account.

* Dig shafts in a circular pattern
* Improved torch placement
* Standard tunnel/branch miner
* Exclusion, not using inventory

Thanks for the kind words, about your suggestions:
Circular pattern:
At this moment this would conflict with the dynamics of the program, but in time I might be able to provide a solution

Improved torch placement:
I already discovered this problem, and it will get fixed in the next version

Standard tunnel/branch miner:
You can do this for the tunnel already, if for example you normally excavate 8 shafts per tunnel:
* Position the turtle in the direction of the next expansion
* Use "digTunnels -numT 1 -numS 17 -torches"
This will dig a single tunnel, 17 shafts long (8+1+8). At the end of the tunnel the next hub can be constructed

Apart from that I have plenty of ideas to allow you to create expansions. Unfortunatly I have more ideas than I have
time at the moment, but I will try to have it fixed ASAP.

Exclusion not using inventory:
This is not possible since turtles can't detect which block is in front of them, they can only compare to blocks in inventory.
You could install a peripheral addingsilk touch turtles though
ldog #98
Posted 02 January 2013 - 07:36 AM
Thanks for the kind words, about your suggestions:
Circular pattern:
At this moment this would conflict with the dynamics of the program, but in time I might be able to provide a solution

Improved torch placement:
I already discovered this problem, and it will get fixed in the next version

Standard tunnel/branch miner:
You can do this for the tunnel already, if for example you normally excavate 8 shafts per tunnel:
* Position the turtle in the direction of the next expansion
* Use "digTunnels -numT 1 -numS 17 -torches"
This will dig a single tunnel, 17 shafts long (8+1+8). At the end of the tunnel the next hub can be constructed

Apart from that I have plenty of ideas to allow you to create expansions. Unfortunatly I have more ideas than I have
time at the moment, but I will try to have it fixed ASAP.

Exclusion not using inventory:
This is not possible since turtles can't detect which block is in front of them, they can only compare to blocks in inventory.
You could install a peripheral addingsilk touch turtles though

Yeah, I realized about the standard mining after I posted (I had been a version or two behind) that so I took it out, not before you read it I see ;)/>
I also see how the circular mining would conflict badly with that now too. Since if you told it to mine less than 4 branches then you would have to code exceptions for that. Fuel is cheap and plentiful, and considering the miner is doing the work so is time. Not worth your effort or the complexity it would add to the program.

Good about the torches!

I didn't think of that with the inventory. Still considering all your program does it's minor. I will have to check out the silk touch turtles.

Thanks for reading and answering. Happy new year!

Oh, just thought of something, I have misc periphs but havent had a chance to delve into it. Is using an EU powered turtle compatible (or any other fuel for that matter? lava tends to be readily available when mining so it is so convenient I havent even bothered trying anything else with your programs) ?
HelloTeam #99
Posted 03 January 2013 - 12:48 PM
Sadly this doesn't work at all for me.

When starting digTunnel the turtle scrolls through its inventory, stays at the last slot and then does… nothing what so ever.
ldog #100
Posted 03 January 2013 - 01:01 PM
Sadly this doesn't work at all for me.

When starting digTunnel the turtle scrolls through its inventory, stays at the last slot and then does… nothing what so ever.

If the turtle hasn't been fueled (like a brand new turtle) you need to put 2 buckets of lava in a chest above it. It will grab them, use them and drop them in a chest underneath (or on the floor if no chest).
Alternately dump a stack of charcoal or what not in the turtle, run "refuel all" and then run digtunnels.
HelloTeam #101
Posted 03 January 2013 - 05:01 PM
Sadly this doesn't work at all for me.

When starting digTunnel the turtle scrolls through its inventory, stays at the last slot and then does… nothing what so ever.

If the turtle hasn't been fueled (like a brand new turtle) you need to put 2 buckets of lava in a chest above it. It will grab them, use them and drop them in a chest underneath (or on the floor if no chest).
Alternately dump a stack of charcoal or what not in the turtle, run "refuel all" and then run digtunnels.
He was fueled. Does he need any docking setup to actually do anything ?
Ulthean #102
Posted 03 January 2013 - 10:00 PM
Sadly this doesn't work at all for me.

When starting digTunnel the turtle scrolls through its inventory, stays at the last slot and then does… nothing what so ever.

If the turtle hasn't been fueled (like a brand new turtle) you need to put 2 buckets of lava in a chest above it. It will grab them, use them and drop them in a chest underneath (or on the floor if no chest).
Alternately dump a stack of charcoal or what not in the turtle, run "refuel all" and then run digtunnels.
He was fueled. Does he need any docking setup to actually do anything ?

How much fuel did he have? With the standard config the turtle requires a fuel value of at least 1200 before it starts operation. (aka: 1 lava bucket)
Also: what parameters did you use?
HelloTeam #103
Posted 04 January 2013 - 06:40 AM
How much fuel did he have? With the standard config the turtle requires a fuel value of at least 1200 before it starts operation. (aka: 1 lava bucket)
Also: what parameters did you use?

Jeah the fuel level was the problem, it only had around 500.

Would be great if you added a failsafe/assertion for that, because right now the turtle will just stand around doing noithing if fuel <1200. (Or at least mention it in your introduction)

Anyway the script looks great as far as I could test it, thanks for your work!
Zagi #104
Posted 04 January 2013 - 12:21 PM
Loving this program! First time I've used mining turtles :)/>.

* Currently I have a square 13x13 room. In the middle of the room I have my docking station, a chest on top with lava buckets and a chest at the bottom for the turtle to deposit it's stuff in.

The thing is that I want to protect this 13x13 room. I do not want digShafts/digOres to start mining in this room, I want them to start in the tunnels. What it's doing now is that it's making the first shafts in my 13x13 room.

I've tried using -rad, but it doesn't seem to do anything (I don't really know what -rad is for I guess).

The thing I want to do at last when is have 4 turtles digShafts/digOres at the same time using the same docking station. I don't know if it will be possible, but if it is it's going to be very convient I think.

* Another thing, when I tried digOres (digOres -numT 1 -oneChest) I put in 6 items for the turtle to ignore (stone, cobble, dirt, torches, marble, gravell) but the turtle still mines my torches. How can I prevent this?

Thanks again Ulthean for this awesome program :)/>.

EDIT: I fixed the problem with the 13x13 room but I'm a little bit sad now. The turtles 'crashed' into each other at the docking station.

'Encountered obstruction in:
*more info here*'

Maybe a new option like -multipleturtles can solve this. If it bumps into a turtle when it wants to refuel/unload at the docking station it will wait x seconds and then try again?
ldog #105
Posted 04 January 2013 - 12:30 PM
How much fuel did he have? With the standard config the turtle requires a fuel value of at least 1200 before it starts operation. (aka: 1 lava bucket)
Also: what parameters did you use?

Jeah the fuel level was the problem, it only had around 500.

Would be great if you added a failsafe/assertion for that, because right now the turtle will just stand around doing noithing if fuel <1200. (Or at least mention it in your introduction)

Anyway the script looks great as far as I could test it, thanks for your work!


I think the fuel per bucket was changed. Maybe it's just my config.
It seems to be 1000, so a new turtle wont go until he gets 2 buckets. I noticed it myself the other day, and so was surprised when I came back to a turtle that I had setup with a stack of torches and a bucket of lava and he was still sitting there for some minutes after I said go. I did notice it searching through inventory though so threw another bucket in and off he went.

I think it's mentioned somewhere (but then I play around with the parameters a lot, otherwise I probably wouldnt have noticed either). I've got them configured to torches on default and dumped them into the rom folder of the cc mod :D/>
HelloTeam #106
Posted 04 January 2013 - 03:26 PM
I think the fuel per bucket was changed. Maybe it's just my config.
It seems to be 1000, so a new turtle wont go until he gets 2 buckets. I noticed it myself the other day, and so was surprised when I came back to a turtle that I had setup with a stack of torches and a bucket of lava and he was still sitting there for some minutes after I said go. I did notice it searching through inventory though so threw another bucket in and off he went.

I think it's mentioned somewhere (but then I play around with the parameters a lot, otherwise I probably wouldnt have noticed either). I've got them configured to torches on default and dumped them into the rom folder of the cc mod :D/>

Jeah if the creator would update his first post with some more details on how to setup it would probably save a lot of players mayor headaches! :)/>
D3matt #107
Posted 05 January 2013 - 06:00 PM
the needsRestocking() function does not take into account configuration.requiresFuel setting, and will crash the program if fuel is disabled.
Someguy123 #108
Posted 06 January 2013 - 02:22 AM
The whole "Can resume from a specific tunnel should the turtle stop for some reason" is a bit vague, explaining how we're supposed to set up the turtle to restart like this would be nice, when I simply restart the program, it tries to make a whole new mine…
Ulthean #109
Posted 06 January 2013 - 06:04 AM
Correct, after I am done eating I am starting work on an update, some small bugfixes will be made, but most importantly updating the documentation.
Ulthean #110
Posted 07 January 2013 - 11:42 PM
Almost done with the new functionality, I would already like to thank you all for your patience.
HelloTeam #111
Posted 08 January 2013 - 03:15 PM
Almost done with the new functionality, I would already like to thank you all for your patience.

I think we're all just really glad you're still so much engaged into improving this awesome script!
markusla #112
Posted 08 January 2013 - 09:15 PM
Couldn't agree more. Excellent work with this script!
And considering the limitations of LUA and the amount of options and flexibility of the script, it's mindblowing you got it working so well.
Ulthean #113
Posted 09 January 2013 - 02:43 AM
snip
  • The options you were looking for were: -rad 0 -firstOffset 10
  • The turtle will still dig torches and other ignore blocks if they are in his way, he will just not 'excavate' them in the final step of the program
  • Multiple turtles per docking station would be tedious to implement, especially since the more elaborate configurations (with torches etc) require more chests than just the top/bottom.
Ulthean #114
Posted 09 January 2013 - 02:48 AM
Update released:
  • Added support for config files
  • Maintenance/bugfixes
  • Made the program more user friendly (imho)
  • Updated the original post
  • Levels can now be either 2 or 3 high
  • Added a new program: digAndExcavate, this combines the functionality of the other three programs
Future work:
  • Create new screenshots/video
  • Bugfixing (if people report any)
  • Finish the new program that digs the central shaft, places pipes, chests etc
  • Take a look at new features suggested by other users (among others: continue after server reset)
I suggest all users reread the first post, as the command line parameters changed to make them more uniform
(example: digTunnels no longer has an explicit length, but works with numS as well)
ldog #115
Posted 09 January 2013 - 07:13 AM
Update released:
  • bunch of cool stuff

Sweet!

Is it actually possible to continue after a reset? I thought that was a CC limitation.
That would be pretty great. As it is now I just make sure I know where my turtle is before I quit playing.

Oh, yeah, does the single drop-off point include the torch chest too?
Ulthean #116
Posted 09 January 2013 - 07:42 AM
It is possible, but not very easy for this particular set of programs (lots of things to keep track of).
And yes, the single drop-off point is used for: fuel, torches, item drops AND ignore blocks.
moverperfect #117
Posted 09 January 2013 - 11:20 AM
Just a suggestion maybe:

Make one program that we are able to download and run, that downloads all the other files for us so we don't have to do it all manually.

PS I like that i am in the Thanks To section :D/>
Ulthean #118
Posted 09 January 2013 - 11:30 AM
I was already thinking of adding this kind of program :)/>
Should be done before too long (working on some other minor things)
Ulthean #119
Posted 09 January 2013 - 03:46 PM
Minor update released:
  • Added a downloading program: see 'installing the programs'
  • Restructured the code
  • Potential bugfix (not entirely sure if I introduced it during the restructuring or not)
MrFuggernaut #120
Posted 09 January 2013 - 08:46 PM
Hey this looks like a great program that I would love to implement in my worlds, but I'm not sure where to place chests, which slots to place items in, how to set up the room, etc. Basically a very specific guide to how to use this and if someone else has made a video highlighting this and explaining it in detail that would be great.
pingwel #121
Posted 09 January 2013 - 11:28 PM
Hey this looks like a great program that I would love to implement in my worlds, but I'm not sure where to place chests, which slots to place items in, how to set up the room, etc. Basically a very specific guide to how to use this and if someone else has made a video highlighting this and explaining it in detail that would be great.
If you look at the image you can see that his useing a chest in the middle, and then you go 5 blocks out to north, east, west and south and place two chest over eachother, just remember there needs to be a block between them. so it will be 3 blocks high. the top chest will be where you place in the fuel (lava buckets) and the bottum is the place where you get all the stuff the turtles are mining. if you need more help i can help you with it :)/>
pingwel #122
Posted 09 January 2013 - 11:30 PM
i have maybe one request for this really awsome program(s) and thats, if the turtle should stop they have a way to know where they left off. like using a gps way to do it ? im not even sure if this is able to be done ? but if it's it would be awsome :D/>
Ulthean #123
Posted 10 January 2013 - 12:20 AM
Hey this looks like a great program that I would love to implement in my worlds, but I'm not sure where to place chests, which slots to place items in, how to set up the room, etc. Basically a very specific guide to how to use this and if someone else has made a video highlighting this and explaining it in detail that would be great.
If you look at the image you can see that his useing a chest in the middle, and then you go 5 blocks out to north, east, west and south and place two chest over eachother, just remember there needs to be a block between them. so it will be 3 blocks high. the top chest will be where you place in the fuel (lava buckets) and the bottum is the place where you get all the stuff the turtles are mining. if you need more help i can help you with it :)/>/>

Correct, though in the newest version you actually need more chests: at least 3 (or 4 if you want the turtle to place torches): the default config is:
  • A chest with fuel at the top
  • A chest for the stuff the turtle digs at the bottom
  • A chest for the torches to the right
  • A chest for the ignore blocks to the left
I made it so the ignore blocks are to the left so digAndExcavate can put them away while digging the tunnels and shafts. I will make some updated images and a video as soon as possible.


i have maybe one request for this really awsome program(s) and thats, if the turtle should stop they have a way to know where they left off. like using a gps way to do it ? im not even sure if this is able to be done ? but if it's it would be awsome :D/>/>

I am planning (long-term) to allow the turtle to continue where he left of if you quit minecraft (SSP) or the server restarts (SMP).
Ulthean #124
Posted 10 January 2013 - 12:54 AM
Not exactly the best image ever and I will make a better one in the near future but it should get you going: My standard 2 high setup (normally I have multiple levels stacked on top of each other) Almost everything can be configured, take a look at the parameters for more information.

Spoiler
pingwel #125
Posted 10 January 2013 - 12:56 AM
Hey this looks like a great program that I would love to implement in my worlds, but I'm not sure where to place chests, which slots to place items in, how to set up the room, etc. Basically a very specific guide to how to use this and if someone else has made a video highlighting this and explaining it in detail that would be great.
If you look at the image you can see that his useing a chest in the middle, and then you go 5 blocks out to north, east, west and south and place two chest over eachother, just remember there needs to be a block between them. so it will be 3 blocks high. the top chest will be where you place in the fuel (lava buckets) and the bottum is the place where you get all the stuff the turtles are mining. if you need more help i can help you with it :)/>/>
Correct, though in the newest version you actually need more chests: at least 3 (or 4 if you want the turtle to place torches): the default config is:
  • A chest with fuel at the top
  • A chest for the stuff the turtle digs at the bottom
  • A chest for the torches to the right
  • A chest for the ignore blocks to the left
I made it so the ignore blocks are to the left so digAndExcavate can put them away while digging the tunnels and ores. I will make some updated images and a video as soon as possible.
i have maybe one request for this really awsome program(s) and thats, if the turtle should stop they have a way to know where they left off. like using a gps way to do it ? im not even sure if this is able to be done ? but if it's it would be awsome :D/>/>
I am planning (long-term) to allow the turtle to continue where he left of if you quit minecraft (SSP) or the server restarts (SMP).
sounds really awsome i cant wait :)/> but i didnt get the ignore chest thing ? will that mean that stuff like cobblestone will be left there and same with gravel if i put it in there ? so i only get the good stuff in the buttom one ?
Ulthean #126
Posted 10 January 2013 - 01:00 AM
No, in previous versions I placed 6 blocks in the turtle's inventory before launching digOres. These were the blocks I didn't want the turtle to excavate: Stone, dirt, gravel, marble, wood and stone bricks. In the current version it requires you to place those 6 blocks in a chest instead of in the turtle's inventory. It will then suck up those blocks from the chest and execute the program like it did before.

This was necessary for digAndExcavate to function, though I may add a parameter in the future to revert this change for digOres.
pingwel #127
Posted 10 January 2013 - 01:02 AM
ahh okay cool
Konicomi #128
Posted 10 January 2013 - 05:36 AM
got an error when i tried to run it digAndExcavate:58: attempt to call nil


I do digTunnels and get the same thing on line 88 of it attempt to call nil both lines are the same can you tell me if im doing somthing wrong
Ulthean #129
Posted 10 January 2013 - 07:10 AM
got an error when i tried to run it digAndExcavate:58: attempt to call nil

I do digTunnels and get the same thing on line 88 of it attempt to call nil both lines are the same can you tell me if im doing somthing wrong

You didn't do anything wrong, I made a rookie mistake and added the wrong pastebin codes to the wrong programs in the "getPrograms" code.
If you redownload getPrograms and execute it you should be able to run the programs.

pastebin get bSQAz3zL getPrograms (newer version below or in the first post)

Thanks for informing me, you saved us all a lot of time :)/>
stuffedparrot #130
Posted 10 January 2013 - 07:35 AM
I was having the same 'attempt to call' issue, and I just signed in to ask about it. You guys are pro. :D/>

However, one TINY little thing with 'digAndExcavate -torches -sides'. If you're watching your turtle, it places a torch on the left side just fine. Every 3 blocks, bam, torch. BUT, on the right side, it will place the torch not on the wall, but on the block it's about to dig up. it'll then dig said block, the torch drops and doesn't get picked up.

Not sure if that's the turtle or the way MC handles torch placement when it's got multiple blocks to choose from.

Edited to add that this is amazing, and you've made it so that I, a complete idiot, can use it with little issue. That indicates good work in my books!

Second edit to add: Somehow, when it encountered a ravine, it shifted the main tunnels over to the left one block, which misaligned it with the docking station. I'm going to try recreate this to see if it always does it. hm.
Edited on 10 January 2013 - 06:55 AM
outlawgb #131
Posted 10 January 2013 - 08:20 AM
great work but with the DL zip file version digshafts does not seem to be using the config file changed it to allways use torches and 8 shafts but ignores it but works fine if used on command line
Ulthean #132
Posted 10 January 2013 - 08:25 AM
I was having the same 'attempt to call' issue, and I just signed in to ask about it. You guys are pro. :D/>

However, one TINY little thing with 'digAndExcavate -torches -sides'. If you're watching your turtle, it places a torch on the left side just fine. Every 3 blocks, bam, torch. BUT, on the right side, it will place the torch not on the wall, but on the block it's about to dig up. it'll then dig said block, the torch drops and doesn't get picked up.

Not sure if that's the turtle or the way MC handles torch placement when it's got multiple blocks to choose from.

The pastebin version has been updated to solve the torch issue, minor improvements have been made to multi-level torch placement, so it align better with the shafts. DL zip will be reuploaded later (once I check outlawgb's issue) and I will check out the ravine thing too.

pastebin get PTSnx2xF getProgram (newer version below or in the first post)
Ulthean #133
Posted 10 January 2013 - 08:39 AM
great work but with the DL zip file version digshafts does not seem to be using the config file changed it to allways use torches and 8 shafts but ignores it but works fine if used on command line

I found the problem, funny enough this should be a problem for the command line too, I updated it just to be sure ^^
pastebin get F4sENGwa getPrograms
http://www.mediafire.com/?ldaddyfvry73kvn
MrFuggernaut #134
Posted 10 January 2013 - 02:42 PM
I just wanna say I got this working and it is amazing!! Major props to Ulthean :D/>
xInDiGo #135
Posted 10 January 2013 - 03:38 PM
i'm working on getting this working. Its hard for me to understand exactly what its doing because i'm new. i put a stack of the items i didn't want it to excavate and changed the config to 3. the items are gravel cobble and dirt. it picks them up, puts all but one in the loot chest, puts the rest back, and goes on its way. is this normal? also, it seems to be digging so much further than anticipated, although in the config i changed the values to 2. basically i'd like to know more about how it operates. i'm using the digAndExcavate.

::edit:: oh man, after messing around with this thing i lost my turtle! he's mined somewhere fierce, maybe hidden in lava, or out of fuel some place! i can't seem to find him tho and he hasn't been back for fuel in like 30 minutes :(/>

::edit:: i took a jetpack and found him! he was still going! idk what his end game is here but i'm gonna try to follow him so i don't lose him. i really don't think he'll return for fuel at this point &amp; as far as i can tell theres no way to see how much he has left!
dylloop #136
Posted 10 January 2013 - 05:26 PM
great work but with the DL zip file version digshafts does not seem to be using the config file changed it to allways use torches and 8 shafts but ignores it but works fine if used on command line

I found the problem, funny enough this should be a problem for the command line too, I updated it just to be sure ^^
pastebin get F4sENGwa getPrograms
http://www.mediafire...ldaddyfvry73kvn
I still have this problem Updated but it still will not follow the Config. any ideas what I did wrong?
-EDIT- yeah nothing is working with the config I even tried digTunnels with the config set to 1 shaft it still tries to dig all 16
-2nd EDIT- I can change the setting by either using the parameters or editing lines 170-224 in api_sharedFunctions manualy which is the default config. so I think the problem lies in the coding directly afterwards but I dont know enough to fix it myself.
Ulthean #137
Posted 10 January 2013 - 08:47 PM
I will look into the config file issue in about an hour, until then: check if your config file has spaces around the "=" sign.
If it does the turtle will not read the config file correctly. xlnDiGo: I will try to explain it aswell in about an hour.

so if your config file looks like this: "height = 3" it is incorrect, it should be: "height=3"
Ulthean #138
Posted 11 January 2013 - 01:35 AM
Testing the program (to make a new tutorial video) and HOLY CR*P! I have 28 turtles working at the same time, dumping the items into a single energy condenser. It can't keep up! The turtles dig faster than the condenser is able to process them (10 blocks per second). I'll show you a screenshot when this run finished, it's quite insane.

Bugs I encountered myself (and which will be fixed, probably tonight):
  • There was no option for digSidesToo in the config file+sharedFunctions
  • Torch restocking needs to be improved/fixed
  • Sometimes turtles still dig each other
dylloop #139
Posted 11 January 2013 - 11:34 AM
Testing the program (to make a new tutorial video) and HOLY CR*P! I have 28 turtles working at the same time, dumping the items into a single energy condenser. It can't keep up! The turtles dig faster than the condenser is able to process them (10 blocks per second). I'll show you a screenshot when this run finished, it's quite insane.

Bugs I encountered myself (and which will be fixed, probably tonight):
  • There was no option for digSidesToo in the config file+sharedFunctions
  • Torch restocking needs to be improved/fixed
  • Sometimes turtles still dig each other
I manually fixed the torch restocking in shared functions where it says "
if configuration.placeTorches and turtle.getItemCount(1)==0 then
return true"
change the 0 to a 1 because the problem was it was waiting until they ran out to restock and then cobble would go in it and then it would read it as not empty
Ulthean #140
Posted 11 January 2013 - 11:58 AM
Yeah, but there is a small side-problem with the way the program works now.
Shouldn't be a big change, but I thought suck() would always try to pull a full stack if possible.
Thanks for the tip though!
xInDiGo #141
Posted 11 January 2013 - 02:20 PM
i'll give this another go, i'm quite interested in getting this working! i'll try removing the spaces in the config file too.
Ulthean #142
Posted 11 January 2013 - 02:33 PM
Let me know if you have any problems
xInDiGo #143
Posted 11 January 2013 - 08:53 PM
few questions. in the config, it says radius of refuel areas. does that mean i should be setting up multiple refuel, not just the one above his head? if so, how would i position them? also, the direction where the turtle will dump fuel defaults on down, but the chest is above it. am i missing something here? also, it wants a chest to its left for items to pass, but after the first tunnel it destroys that chest when its trying to make the next tunnel. i don't know if i've got the chest in the wrong place or if i've got something configured wrong!

thanks for your time and feedback, i look forward to hearing some answers!
Ulthean #144
Posted 11 January 2013 - 09:27 PM
  1. Take a look at the image in the spoiler below, this is the default config, in which case you need one station for each of the 4 tunnels. If you have one turtle excavate multiple levels you need 4 per level. If this is too much setup for you you can use the parameter -oneChest, which tells the turtle that it always has to come back to the first station you built. This is of course easier, but a bit slower (since the turtle has to move a little bit more)
  2. The turtle should only dump 'residual' items: if you refuel the turtle with lava buckets it will drop the empty buckets at the bottom. If you refuel with coal it shouldn't drop any items (it will use them all for refueling).
SpoilerNote that from the center you have 4 blocks between the central pipe and the chests, so the chest is on the fifth.
(You can also look at the first image in the original post, the one with the top-down view)

xInDiGo #145
Posted 12 January 2013 - 12:37 AM
alright, so i played around with it a little and was able to get it to work decently enough! but then i had problems of it just randomly stopping. there was plenty of fuel left in it, but it wasn't doing anything. the terminal is just at its root waiting for the next command.

i want to try the full set up. if i dig down to level 20 and build the 4 level setup, where do i start the turtle? i want to try and use the default config but i've seen the turtle do some crazy things! like digging huge pits from bedrock to sky. i know they're probably configuration issues but if some people can get it right so can i!
Ulthean #146
Posted 12 January 2013 - 01:40 AM
I suggest:
  1. Dig out an 11x11 room, 3 high
  2. Place 4 dropoff/refuel stations on the wall, one on each of the walls, Each station has 4 chests:
    1. Top=fuel
    2. Left (when looking from the center)=the ignore items (smooth stone, dirt, gravel, marble, wooden planks, stone bricks (you can take fewer, but change the config too)
    3. Right (when looking from the center)=torches (default he won't use this)
    4. Down = empty chest, for dropping the mined goods
  3. Place a turtle in the center of one of these stations and run the following command:
    1. digAndExcavate -numS 1
This should work and finish relatively quickly, if this works then you can try other commands, letting it dig more shafts etc.
pingwel #147
Posted 12 January 2013 - 03:57 AM
Maybe this one could be a help also if you wanted to reinstall the mods and wanna do it fast. like if you screw up something in the codes or anything :)/>

http://pastebin.com/GBUtC1Dn
Ulthean #148
Posted 12 January 2013 - 04:12 AM
Maybe this one could be a help also if you wanted to reinstall the mods and wanna do it fast. like if you screw up something in the codes or anything :)/>

http://pastebin.com/GBUtC1Dn

Great suggestion, I will add it to the updater code!

EDIT: Just because I felt like saying this twice: this is an awesome idea!
Lithuex #149
Posted 12 January 2013 - 04:37 AM
Hey, I was wondering if you could do a tutorial video of it and how to keep them fueled and get them to put stuff in chests. I just started using computer craft and am very new at this. I've read over a few tutorials but I can't seem to get the nack of it.

Also, how do I install your programs? I dropped them into my .rar of computercraft\rom\programs\turtle but whenever I go into game and cd rom/programs/turtle and do ls, nothing comes up.
Ulthean #150
Posted 12 January 2013 - 04:39 AM
Hey, I was wondering if you could do a tutorial video of it and how to keep them fueled and get them to put stuff in chests. I just started using computer craft and am very new at this. I've read over a few tutorials but I can't seem to get the nack of it.

Also, how do I install your programs? I dropped them into my .rar of computercraft\rom\programs\turtle but whenever I go into game and cd rom/programs/turtle and do ls, nothing comes up.

I am making some final changes to the code before making the tutorial. I can't give you an exact time when it will be up, since it may be quite some work, but it shouldn't be too long.
pingwel #151
Posted 12 January 2013 - 04:39 AM
I have another good idea if you want to hear it :D/>

Why not make a startup GUI or is it called an api ? xD so ppl can choose what they want the turtle to do and just will have to click around ?
then ppl dont have to type in stuff :)/>
Ulthean #152
Posted 12 January 2013 - 04:49 AM
Shouldn't be too hard, what do you have in mind? One that automatically starts up when the world/server gets loaded? Or a short program that can be called, for example: 'dig' which starts the UI?

I am also planning on making an auto-updater, so people won't have to download the programs themselves (if they want to, if not they can just choose not to install that startup script.
pingwel #153
Posted 12 January 2013 - 04:55 AM
Shouldn't be too hard, what do you have in mind? One that automatically starts up when the world/server gets loaded? Or a short program that can be called, for example: 'dig' which starts the UI?

I am also planning on making an auto-updater, so people won't have to download the programs themselves (if they want to, if not they can just choose not to install that startup script.

Just alittle really simple UI like this


———–Welcome to MLG Mining Program———-



Make Tunnels

Make Shafts

Search For Ores



(and so on it goes when there are anything new to it)




Something like this maybe ?
Bullen #154
Posted 12 January 2013 - 05:39 AM
First of, I love this program.

I found a little bug though. When setting up the docking stations at the surface and changing the config to go downwards, skip 2 levels and use one chest. When I then use digAndExcavate it starts of as normal but then it goes down 2 levels and dump the ignoreblocks and the torches thinking there is a station there an then starts to mine..

Here's the config: http://pastebin.com/CaPg7kqc
Ulthean #155
Posted 12 January 2013 - 05:46 AM
First of, I love this program.

I found a little bug though. When setting up the docking stations at the surface and changing the config to go downwards, skip 2 levels and use one chest. When I then use digAndExcavate it start of as normal but then it goes down 2 levels and dump the ignoreblocks and the torches thinking there is a staton there an then starts to mine..

Here's the config: http://pastebin.com/CaPg7kqc

I will look into it ASAP, I haven't tested going downwards yet, so good of you to report it!
Zagi #156
Posted 12 January 2013 - 07:25 AM
Thanks for the answer you gave me a while back Ulthean, appreciate it. It's a great timing too, because FTB/Tekkit are still getting bigger by the day and people will be searching for this type of stuff.

Keep it up, looking forward to a video sometime :)/>.
Lithuex #157
Posted 13 January 2013 - 12:20 AM
Ah, okay. How do I install Computercraft scripts/programs? I can't seem to add them.
Ulthean #158
Posted 13 January 2013 - 12:37 AM
I updated the tutorial in the first section a bit, though I suggest trying the http route, it is MUCH easier.
If it is a single player world you can enable http by
  • going to your minecraft folder (or Tekkit/Feed the beast folder)
  • opening the folder named "config"
  • opening the file named "mod_ComputerCraft"
  • changing the line that says "enableAPI_http=0" to "enableAPI_http=1"
  • restarting minecraft
If it is a server, ask the server admin to do the same.
Ulthean #159
Posted 13 January 2013 - 02:12 AM
Update released

I suggest reinstalling the programs: if you are using the previous version and http is enabled this can easily be done with the following command (it will not change your config file!):
  • rm getPrograms
  • pastebin get mcEpZDQe startup
  • startup
If you don't want the turtle to update automatically in the future you can just give the startup program a different name, example:
  • rm getPrograms
  • pastebin get mcEpZDQe update
  • update
Changes made:
  • Added an automatic updater for the programs (checks for updates each time the world/server is loaded)
  • I suggest adding cobblestone as an ignore block too, I myself have replaced wood with cobblestone in my default line-up of 6 items: "Smooth stone, dirt, gravel, cobblestone, marble, stone bricks" If you don't do this in some very specific cases, where lava meets water in a certain way, the turtle may or may not get stuck. Though the changes in the next two bullets solved some of the problems
  • The movement of the turtle got improved: this fixed some troubles people were having
  • Certain Obstructions will now be handled more elegantly
  • The turtle will now notify the user when it needs more torches (via its terminal)
  • Torch restocking is now properly functioning
  • Torch placement is improved when using 'digSidesToo'
  • Torch placement got changed to avoid dark spots in the shafts: it will now place a torch every 6 block
  • Using the programs with just one chest should now work
  • General Debugging
Future work:
  • Tutorial video
  • Menu with mouseclicks
Bullen #160
Posted 13 January 2013 - 04:36 AM
Hi, thanks for the update and keep up the good work.

I don't know if you have tried to fix the problem or not with the turtle spitting out the ignoreblocks and torches going downwards with just one chest.

I tested it and the turtel does the same. the only thing that changed is that the turtle stops and waits for torches.
Ulthean #161
Posted 13 January 2013 - 04:52 AM
I tested it and it seemed to work for me, can you show me a screenshot of your starting station and where the turtle drops the ignoreBlocks?

Edit 1:
I mean, it wasn't working, I made some changes (which are included in the last update) and now it should work.

Edit 2:
Is it possible that because of the confusing name "oneChest" you only placed a single (1) chest? Since the turtle still needs 4 chests in your case:
  • 1 For the fuel
  • 1 For the ignore blocks
  • 1 For the torches
  • 1 For the excavated blocks
Next update I will rename it to 'oneStation', since that is closer to the actual meaning: you don't need a refuel/dropoff station in each tunnel. But you still need a 4 chests in the initial location.
Bullen #162
Posted 13 January 2013 - 05:56 AM
HI, thanks for the reply, I attached a screenshot fo my station,

This is the station I always use and it works excellent when going up.
Ulthean #163
Posted 13 January 2013 - 06:24 AM
Seems right, I will try to replicate your results, using the exact same config file you posted before and simply calling 'digAndExcavate'. I will keep you informed about the results.

PS: Nice setup :)/>

EDIT: I get the same results, which is good, now I only need to find the cause.
Ulthean #164
Posted 13 January 2013 - 06:56 AM
Okay, found the bug and fixed it (such a small bug it was). Could you give it another spin just to be sure?

(if you use the updater it should update automatically, if not: rerun startup or just renew api_sharedFunctions (http://pastebin.com/0XwBmGEi))
Bullen #165
Posted 13 January 2013 - 07:23 AM
It seems so be working!

I'm very impressed by how fast you fix your program.
Ulthean #166
Posted 13 January 2013 - 07:25 AM
It seems so be working!

I'm very impressed by how fast you fix your program.

It was an easy fix once I found it :)/> Let me know if you encounter any other defects.
In the meanwhile I will be working on the tutorial video.
xInDiGo #167
Posted 13 January 2013 - 07:34 AM
ulthean you seem to be the best around! why not get yourself a portrait?! :D/> i chose my favorite dog, they're so cute ;)/>

anyways, going to give this a run right now, i'll post my results! wish me luck :P/>
Ulthean #168
Posted 13 January 2013 - 07:36 AM
Good luck!

Edit: Just for you: a profile picture ;)/>
xInDiGo #169
Posted 13 January 2013 - 08:45 AM
so i did as you said here
I suggest:
  • Dig out an 11x11 room, 3 high
  • Place 4 dropoff/refuel stations on the wall, one on each of the walls, Each station has 4 chests:
    • Top=fuel
    • Left (when looking from the center)=the ignore items (smooth stone, dirt, gravel, marble, wooden planks, stone bricks (you can take fewer, but change the config too)
    • Right (when looking from the center)=torches (default he won't use this)
    • Down = empty chest, for dropping the mined goods
  • Place a turtle in the center of one of these stations and run the following command:
    • digAndExcavate -numS 1

and it seems to be going well, except when he comes back he throws everything onto the ground instead of the chest below him. im using the default config


once i put a chest behind him instead of below him it seemed to work out. the config file is changed so that it thinks the fuel is behind it and to drop items behind it. i don't know if thats because of the -numS 1 or if its because of the update.
Ulthean #170
Posted 13 January 2013 - 09:16 AM
You are correct, I changed the config file for my tests and uploaded the wrong one, fixed this now. If you want to get the correct config file use the following commands on the turtle:
Or copy and paste the following pastebin file/edit your config file to match the values: http://pastebin.com/9F7XU4fS
  1. rm config
  2. rm changelog
  3. startup
This is assuming you are using the uploader.
Sorry for any inconvenience this may have caused.
xInDiGo #171
Posted 13 January 2013 - 09:44 AM
so the default is 1 level, 4 tunnels, but 16 shafts. i thought shafts were the areas he digs out inside the tunnel. with this current set up he digs 2 in each tunnel, but to me that is only 8 total from all tunnels. i feel like i'm missing something here.

if i wanted to do multiple levels, would each level need to contain all the refueling &amp; deposit areas?
Ulthean #172
Posted 13 January 2013 - 10:24 AM
  1. Those default values are correct.
  2. When you add the "-numS 1" parameter to the program you tell it to only dig 1 pair of shafts in each tunnel, so that's why you only get two shafts per tunnel (or 8 in total).
  3. I suggested using that parameter so you can test if your setup is correct, once you know it is correct you can start the program without that parameter, and it will dig 16 pairs per tunnel, or a grand total of 128 shafts per level.
  4. If you want you can add the "-oneChest" parameter, if you do this the the turtle will only need ONE refueling and deposit area. An example program call would be: digAndExcavate -numL 2 -torches -oneChest this would dig two levels (8 tunnels in total, or 256 shafts), would place torches in the tunnels and shafts and only need one refueling and deposit area: where you start the turtle. Keep in mind that large excavation operations take a while and that the program will stop when the chunks/world/server gets unloaded. I suggest only doing really large excavations when you know you have enough time.
  5. You can always dig one level, and when the turtle finishes use the command: digAndExcavate -numL 2 -skipL 1 -torches -oneChest.This has the same function as the above, but the '-skipL 1' parameter tells the turtle to skip the first level.
Hope this helps, it is a lot of information at once, I tried to keep it as clear as possible :)/>
xInDiGo #173
Posted 13 January 2013 - 11:31 AM
very useful! i wasn't sure how those parameters worked but now i know! is there support for if 2 turtles walk into each other, or arrive at the refuel station at the same time? also, in your setup, how come you add a diskdrive?
Ulthean #174
Posted 13 January 2013 - 11:41 AM
very useful! i wasn't sure how those parameters worked but now i know! is there support for if 2 turtles walk into each other, or arrive at the refuel station at the same time? also, in your setup, how come you add a diskdrive?

If they run into each other they will not dig each other, but wait for the other turtle to move. The only problem is: if they both want to go to the space where the other turtle is they will get stuck. Also: I do not recommend having turtles share the refuel station, this will almost always result in them getting stuck in the end. The pictures in the setup are outdated and will get reworked when the video is ready, I am recording them now. (read: I don't have a disk drive anymore, that was from the early days of ths program)
Ulthean #175
Posted 13 January 2013 - 03:40 PM
Made a small teaser trailer, tutorial itself should be up tomorrow, depending on pastebin (need my daily pastes to be restocked first)

I hope you enjoy it! (don't take it too seriously ^^)

Edit: Had to remove audio.

[media]http://www.youtube.com/watch?v=j_JPppTSqBA[/media]
D3matt #176
Posted 14 January 2013 - 02:11 PM
I reported a week ago that the program was broken on servers that don't require fuel. Guess what? It's still broken, even after you restructured the entire program. It's literally a 1 line fix.
Ulthean #177
Posted 14 January 2013 - 02:38 PM
Weird, I changed it a while ago to add that line you mentioned. Maybe I took the wrong file (and reverted the change). I will have it changed within the hour.

Just checked, it is changed in pastebin code. If you are positive you are using the right version of the code let me know and I will look into it.

From the api_sharedFunctions on pastebin:

function needsRestocking(configuration)
  if configuration.requiresFuel then
    if turtle.getFuelLevel() < configuration.returnFuel then
	  return true
    end
  end
  ...
end
Znubbis #178
Posted 15 January 2013 - 01:39 AM
Im really looking forward to test this tonight!
Some questions:
  • How do you recomend me to setup this with multiple turtles? one per level or several per level?
  • What is this program i read on the threrad that dig the center vertical shaft called?
  • And a small feature request if not already implmented, can we have some rednet messages for a controlroom to listen for? :D/> All mining operations need a controlroom with big screens :)/>
Good work, love these kinds of projects :)/>
Ulthean #179
Posted 15 January 2013 - 02:04 AM
Question 1:
  • It all depends what you want, if you place them really close to each other there is a very small chance that two turtles will collide, if they are excavating the same ore vein at the same time. Then there is an even smaller chance that they will both want to move into each other's space and get stuck. From safest to fastest:
    • SAFEST: 1 turtle per two levels (orient one north of the center, the other south just to be sure)
    • 1 turtle per level (one north, one south)
    • 2 turtles per level (lvl 1: north/south, lvl 2: east/west)
    • FASTEST: 4 turtles per level
  • But ofcourse it is more epic to have them work at the same sides, and the chances of them getting stuck are pretty small, so it's up to you.
Question 2:
  • Unfortunatly this program isn't finished yet, I have been pretty busy and to have it do everything is a pretty big task. It probably will become a reality one day.
  • I will try to put a very small version online tonight (no chests etc will be placed yet, but it can dig the vertical rooms)
  • Another possibility is to use the standard excavate program to dig an 11x11 column downwards, though you won't have any floors to walk on.
Question 3:
  • I might look into this, I haven't tested rednet yet, but it seems like a fun idea.
Znubbis #180
Posted 15 January 2013 - 02:21 AM
Question 1:
  • It all depends what you want, if you place them really close to each other there is a very small chance that two turtles will collide, if they are excavating the same ore vein at the same time. Then there is an even smaller chance that they will both want to move into each other's space and get stuck. From safest to fastest:
    • SAFEST: 1 turtle per two levels (orient one north of the center, the other south just to be sure)
    • 1 turtle per level (one north, one south)
    • 2 turtles per level (lvl 1: north/south, lvl 2: east/west)
    • FASTEST: 4 turtles per level
  • But ofcourse it is more epic to have them work at the same sides, and the chances of them getting stuck are pretty small, so it's up to you.
Question 2:
  • Unfortunatly this program isn't finished yet, I have been pretty busy and to have it do everything is a pretty big task. It probably will become a reality one day.
  • I will try to put a very small version online tonight (no chests etc will be placed yet, but it can dig the vertical rooms)
  • Another possibility is to use the standard excavate program to dig an 11x11 column downwards, though you won't have any floors to walk on.
Question 3:
  • I might look into this, I haven't tested rednet yet, but it seems like a fun idea.

I guess you can let 4 turtles dig the shaft and tunnels if they takes one direction each?

Very cool, some kind of digger that leaves floors every x level will works fine as a start :)/>

Rednet does not have to be very advanced, just some messages from the turtles telling their name and what they do, like going back to empty inventory, low on fuel, out of fuel in chest and other good to know warning and information. Maybe write a message function that handles all kinds of messages both to the terminal and to the rednet.

Fun with a active developer! Hope you can find the energy and time to make this baby more advanced!

Best Regards!
Ulthean #181
Posted 15 January 2013 - 02:36 AM
I guess you can let 4 turtles dig the shaft and tunnels if they takes one direction each?

This is possible yes, even digOres works fine 90%+ of the time, it's only for completion's sake that I mentioned it :)/>
Leo Verto #182
Posted 15 January 2013 - 02:48 AM
I reported a week ago that the program was broken on servers that don't require fuel. Guess what? It's still broken, even after you restructured the entire program. It's literally a 1 line fix.
I used to use this on Geevancraft too, worked very well and got me loads of resources.
leminz98 #183
Posted 15 January 2013 - 03:56 AM
ok, total computercraft and coding noob, i dont have much idea how any of it works, but i ran startup, then digAndExcavate, it gets the fuel then it says

ERROR:
————————
You said you wanted to turtle
To ignore 6 blocks but didn't
place them all in the chest
chest direction=left
————————
ABORTING
Leo Verto #184
Posted 15 January 2013 - 04:06 AM
ok, total computercraft and coding noob, i dont have much idea how any of it works, but i ran startup, then digAndExcavate, it gets the fuel then it says

ERROR:
————————
You said you wanted to turtle
To ignore 6 blocks but didn't
place them all in the chest
chest direction=left
————————
ABORTING
The default amount of blocks to ignore is 6, place 6 different types of blocks in a chest on the left of the turtle.
In case you want it to ignore more or less blocks, you can change the var somewhere at the beginning of the code or by using an argument (use digAndExcavate -help to list all arguments)
leminz98 #185
Posted 15 January 2013 - 05:35 AM
why would i want it to ignore blocks?
sjkeegs #186
Posted 15 January 2013 - 06:27 AM
why would i want it to ignore blocks?
Ignore blocks are typically Stone, Dirt, Gravel, etc… Blocks that you don't want the turtle to mine and bring back home. It allows a turtle to dig out valuable blocks without filling up it's inventory with junk. Of course if you do want it to pick up those blocks then change the config.
Leo Verto #187
Posted 15 January 2013 - 07:02 AM
why would i want it to ignore blocks?
Ignore blocks are typically Stone, Dirt, Gravel, etc… Blocks that you don't want the turtle to mine and bring back home. It allows a turtle to dig out valuable blocks without filling up it's inventory with junk. Of course if you do want it to pick up those blocks then change the config.
Feel free to put in 6 random items other than stone, your turtle would mine forever :P/>
xInDiGo #188
Posted 15 January 2013 - 07:06 AM
this script works great once configured properly! the only thing missing is a self building start room! but i'm working on that my self! i usually only do 3 tunnels, 3 shafts each on 3 levels, with -oneChest. i use a stone golem to filter the drop off chest of cobble, gravel, and dirt, but i'm sure other people can use pipes!
Ulthean #189
Posted 15 January 2013 - 07:31 AM
I would like to thank sjkeegs and leo verto for helping out the other users on this thread!

This is not standard quarry program, instead it digs shafts and then will dig out any veins of ores it encounters. If you do not put in ignore blocks he will start to dig a vein of 'smooth stone' AKA he will start to excavate the entire world, never returning to drop off.
Leo Verto #190
Posted 15 January 2013 - 07:42 AM
Thanks :D/>

I'm not sure if this issue has been fixed yet, but during my tests the turtle started placing cobble once it ran out of torches, probably because the slot was still active and cobble is usually the first item to fill it.
Ulthean #191
Posted 15 January 2013 - 08:23 AM
This should have been fixed, the turtle will now properly restock torches once it runs out, so you should end up with nice, well-lit shafts :)/>
Leo Verto #192
Posted 15 January 2013 - 10:26 AM
Nice, so I can hook up an automated torch farm to the top chests if I want torches, on the other hand I might just start chunk loader turtles and check their process regularly.

I prefer to run only the digOres program, I usually don't visit the tunnels afterwards anyways.
leminz98 #193
Posted 15 January 2013 - 10:52 AM
I would like to thank sjkeegs and leo verto for helping out the other users on this thread!

This is not standard quarry program, instead it digs shafts and then will dig out any veins of ores it encounters. If you do not put in ignore blocks he will start to dig a vein of 'smooth stone' AKA he will start to excavate the entire world, never returning to drop off.

does this mean i need to put a smooth stone in the ignore chest? or does cobble work?
Leo Verto #194
Posted 15 January 2013 - 11:45 AM
I would like to thank sjkeegs and leo verto for helping out the other users on this thread!

This is not standard quarry program, instead it digs shafts and then will dig out any veins of ores it encounters. If you do not put in ignore blocks he will start to dig a vein of 'smooth stone' AKA he will start to excavate the entire world, never returning to drop off.
does this mean i need to put a smooth stone in the ignore chest? or does cobble work?
I suggest putting smooth stone, dirt, gravel and cobble in it and lowering the value to 4. Smooth stone is also a suggested block but you rarely hit a stronghold. If you've got RedPower installed, you should also add a block of marble.
Ulthean #195
Posted 15 January 2013 - 01:52 PM
Yeah, I just put in stone bricks to be absolutely sure, else you will lose the turtle when he hits the stronghold. But 4 blocks is safe enough.
D3matt #196
Posted 15 January 2013 - 05:23 PM
Weird, I changed it a while ago to add that line you mentioned. Maybe I took the wrong file (and reverted the change). I will have it changed within the hour.

Just checked, it is changed in pastebin code. If you are positive you are using the right version of the code let me know and I will look into it.

From the api_sharedFunctions on pastebin:

function needsRestocking(configuration)
  if configuration.requiresFuel then
	if turtle.getFuelLevel() < configuration.returnFuel then
	  return true
	end
  end
  ...
end
Interesting. I'm not sure where the guy I was helping got the program from, then. My bad.
Ulthean #197
Posted 15 January 2013 - 08:56 PM
No problem at all, should the problem persist keep me informed. In the next version I will remove the -noFuel parameter and have the turtle automatically detect this.
pingwel #198
Posted 15 January 2013 - 11:19 PM
Hmm im not sure if this can be helped but i was really unluck with my turtle atm. the problem i ran into was that the turtles can get stuck when there is one in the dock station and then another turtle move infront of it. is there a way to tell them to move 1 block down and wait 10-15sec and then move on again ?

Next problem i had was the digOres program. my turtle keept taking down all the torches that was places around in the tunnel and shafts. even though i had 6 blocks to ignore and 1 of them are torches.

I'll let you know if i run into anything els
Ulthean #199
Posted 15 January 2013 - 11:50 PM
  • Do you have multiple turtles using the same dropoff station?
  • The ignore blocks are only used when checking the walls of the shafts, it will still dig and blocks in its path if needed. (you can technically use digOres as the only program, and the turtle will function just as well). Though normally, if you use the -torches parameter again, he will dig the torches and replace them, this time at the top of the shafts, I find this convenient to check which shafts have been done and which haven't: if the torches are at the top the turtle excavated this shaft, so the turtle is currently working on the first shaft where the torches are still at the bottom of the shafts.
pingwel #200
Posted 15 January 2013 - 11:57 PM
i have 3 turtles running and thier all going to one chest i made that in thier config's.
1 turtle for tunnel
1 for shaft
1 for ore

im not really useing the parameters im going in to the configs and changing stuff there :P/> but i can try out the para's
Ulthean #201
Posted 16 January 2013 - 01:19 AM
  • I do not recommend having multiple turtles working on the same dropoff station, collisions are almost sure to happen at one point or another. In general try to keep the areas where they work seperated, they could get stuck at the refuel station or when they encounter eachother during digging/excavating. You could have 4 turtles running digAndExcavate, each doing one tunnel per level, and that program will dig the tunnels, the shafts and the ores. (and give each of them a seperate station)
  • You can do it in the config too: placeTorches=true
pingwel #202
Posted 16 January 2013 - 01:56 AM
isnt there a way to tell them when they can see a turtle in front of them they will try to go up or down ? i think the only problem is the shaft turtle and the ore turtle ? maybe tell the ore turtle that when it can see another turtle move down and wait 10sec and then go up again and move on
sjkeegs #203
Posted 16 January 2013 - 04:19 AM
isnt there a way to tell them when they can see a turtle in front of them they will try to go up or down ?
Turtles can't really detect other turtles (afaik). I suppose it might work if you put a turtle in a slot and tried to detect using that slot, but I haven't tried anything like that.

To do something like that and have turtles maneuver around each other you would probably need to implement some rednet communication and have a control computer sequence when the turtles allowed to go to the common point.
Leo Verto #204
Posted 16 January 2013 - 04:26 AM
isnt there a way to tell them when they can see a turtle in front of them they will try to go up or down ?
Turtles can't really detect other turtles (afaik). I suppose it might work if you put a turtle in a slot and tried to detect using that slot, but I haven't tried anything like that.

To do something like that and have turtles maneuver around each other you would probably need to implement some rednet communication and have a control computer sequence when the turtles allowed to go to the common point.
There is a simpler way of doing that, you could use the distance returned by rednet.receive (id, msg, distance) to make turtles communicate and prevent collisions of they get too close to each other.
Ulthean #205
Posted 16 January 2013 - 05:13 AM
Turtles can detect each other, and the programs includes this feature, (peripheral.getType("left") == "turtle") this is why, if they are trying to move into a space occupied by another turtle they will not 'dig' that turtle, but will instead wait for the other turtle to move away. The problem is when they both want to move to each other's space they will both wait until the other one leaves (which is never).
I could implement something tlike pingwel suggested, but the problem lies in the fact that this may cause unwanted behavior: if one of them is in the docking station moving down probably results in the turtle digging up one of the chests.

I suppose I could have the turtle look for an empty space around it, and possibly even have a test for chests 'drop an item in a direction'.

I will look into it.
sjkeegs #206
Posted 16 January 2013 - 08:33 AM
Turtles can detect each other, and the programs includes this feature, (peripheral.getType("left") == "turtle")
I should avoid commenting when I'm not sure of the answer…

I suppose I could have the turtle look for an empty space around it, and possibly even have a test for chests 'drop an item in a direction'.
If you had space to set up a turtle queue, you could simply have them line up and wait for their turn, moving up one spot when the turtle ahead moves forward.
tofuturkey #207
Posted 16 January 2013 - 11:08 AM
I don't suppose someone could make a tutorial? I am a complete noob at this and I don't know how to set up the dropponts etc. If a set of instructions could be added to the OP, that'd be awesome. Thanks!
leminz98 #208
Posted 16 January 2013 - 12:29 PM
I don't suppose someone could make a tutorial? I am a complete noob at this and I don't know how to set up the dropponts etc. If a set of instructions could be added to the OP, that'd be awesome. Thanks!
I would love this as well
Ulthean #209
Posted 16 January 2013 - 12:36 PM
I know I promised this before, but normally I should be able to finish the tutorial tonight.
WeiseGuy #210
Posted 16 January 2013 - 06:19 PM
Definitely will look forward to that tutorial!
Ulthean #211
Posted 16 January 2013 - 11:10 PM
Ladies and gents, I present to you: the 'tutorial', no music so you can have your own music playing in the BG :)/>

[media]http://www.youtube.com/watch?v=Re24QTxK3Go[/media]

Let me know if any parts are still unclear, I tried to keep it both short and informative (there is no way I can cover all the different parameters in a single video, unless).
leminz98 #212
Posted 17 January 2013 - 05:56 AM
Thanks!
calmelb #213
Posted 17 January 2013 - 07:32 AM
This is the most awesome computer craft program ever made! It will dig out your own mine just for you!!! I love this! PS, Ulthean I am callummelb on youtube!
Ulthean #214
Posted 17 January 2013 - 10:23 AM
This is the most awesome computer craft program ever made! It will dig out your own mine just for you!!! I love this! PS, Ulthean I am callummelb on youtube!

Thanks, I figured you were, you mention your alternative nicknames in your first video :)/>
calmelb #215
Posted 17 January 2013 - 06:41 PM
This is the most awesome computer craft program ever made! It will dig out your own mine just for you!!! I love this! PS, Ulthean I am callummelb on youtube!

Thanks, I figured you were, you mention your alternative nicknames in your first video :)/>/>

How did you get the idea to do this program?
Diamondclaw #216
Posted 17 January 2013 - 07:25 PM
First off thanks for making such an amazing program. This is by far the best branch mining program I have ever seen.

I have some questions regarding the program:

1) To get the tunnel structure you have in your two videos do you mine with or without the -sides parameter? From looking at the video it looks like you are mining the sides since when I test the program in my world if I do not specify -sides I get tunnel "levels" instead of the extremely tall tunnels I see in the videos (ie blocks seperate the levels).

2) If you do not specify the -sides parameter I see that the turtle places torches on the floor of the tunnels to provide light in between the shafts. However, if -sides is specified in the command it does not place the torches on the ground. I understand the reasoning behind this is because if you have multiple levels of turtles and all the floors are dug out than there is no floor to place torches on. Would it be possible for the turtle to place torches on the walls of the tunnels instead? Also did you place the torches on the walls of the tunnels in both your videos or were you able to automate that somehow?

3) I see the turtle currently digs the shafts 2 blocks high. With the current structure of the tunnels and shafts would it be possible to make them dig the shafts 3 blocks high? I only ask as with the 2 shaft height it is actually possible that we are missing diamonds in that third block row in between the seperate shafts.

Thanks for any help or information you can provide.
Ulthean #217
Posted 17 January 2013 - 08:46 PM
How did you get the idea to do this program?

It isn't really such an innovating idea :)/> it started off as a straight branch mining program, just digging one tunnel and having shafts either side of it. For some reason I can't exactly remember I thought it would be cool to have a central hub, with 4 tunnels going north, south, east and west. It probably was inspired in part by Zisteau's pinwheel mine.
(all his shafts meet up in the center, kind of.

Spoiler

Questions

It's nice to hear you like the program, now for your questions
  1. You are correct about me using "-sides" in the big stacked tunnels. I originally implemented -sides so you could easily replace the floor and walls with other blocks, but I like the effect it created with stacked levels so I never bothered to add the walls and floors again :)/>
  2. Normally if you use "-sides -torches" the turtle should place torches on the walls of the tunnels instead of on the floor, this for the exact reasons you mention. Are you sure you ran the program with both "-sides" and "-torches" as parameters?
  3. I chose to use the current default parameters because they have a good cost/efficiency ratio: they gather most ores, but won't spend a lot of extra time digging extra shafts/levels jjust to get a few more ores.
  4. What you could do is use "-height 2", in this case it should discover most veins (since they normally are 2x2 big). Or you could use "-height 2 -betw 2", this will cover most blocks, only 1 row of blocks will be unchecked per shaft. If you really want to cover every single block the only option at the moment is by using "-height 2 -betw 1 -evenOffs 1". This will create a shaft every 2 blocks, but is pretty inefficient.
Znubbis #218
Posted 17 January 2013 - 10:56 PM
I got a interesting result yesterday

I had finished digging ore on one level and was testing if i can get a turtle to dig another tunnel for level 2 in one direction. so i tested this

digTunnels -numL 2 -numT 1 -skipL 1

It moved to the right corner of the center room and dug down and have never been seen again :)/> any idea what i did wrong? should i just create another level and add more chests manually? Ive seen on the videos that you use stations for each level, is that to speed things up or is thats how levels work?

(Could you add a rednet broadcast when turtles run out of fuel that sends some info of where they think they are so if something strange happens you can get a hint where to look? :)/> )
Ulthean #219
Posted 17 January 2013 - 11:10 PM
I got a interesting result yesterday

I had finished digging ore on one level and was testing if i can get a turtle to dig another tunnel for level 2 in one direction. so i tested this

digTunnels -numL 2 -numT 1 -skipL 1

It moved to the right corner of the center room and dug down and have never been seen again :)/> any idea what i did wrong? should i just create another level and add more chests manually? Ive seen on the videos that you use stations for each level, is that to speed things up or is thats how levels work?

(Could you add a rednet broadcast when turtles run out of fuel that sends some info of where they think they are so if something strange happens you can get a hint where to look? :)/> )

Did you use the standard config file? If not: could you pastebin it? I'm most interested in the 'dirNextL' value. Also, at what elevation did you use the program?

Edit: In the video's I use chests on each level because I think it's cooler, but you can have him use only the initial station, in this case you would need to add the -oneChest parameter. So it would become:
digTunnels -numL 2 -numT 1 -skipL 1 -oneChest
Coming to think of it: the turtle is probably at the position where the second station would be, 3/4 blocks below where you started it, waiting for torches or fuel since it expects there to be a station.
Znubbis #220
Posted 17 January 2013 - 11:41 PM
http://pastebin.com/ebphuEM2

I'm not sure what turtle it was i noticed that the other 3 had up as nextDirL so it can have been up also. but he did dig down, and the funny part was that he filled the hole above him. Not sure if that was server lag or if its intended.

I have to look more tonight if i can find him.

I think the elevation is around 50 my plan was to dig a shaft down to bedrock but i started with one level to see how it works.

So is one chest recommended for multi level digging unless you have stations on all levels? i could probably dig out and prepare another station under my current, how far down shall the next level be for best result? (edit: Or do one chest mean one station with 4 chests?)
Ulthean #221
Posted 18 January 2013 - 12:08 AM
  • From what you told me nextDirL was probably down like you said. And he shouldn't fill the hole above him, so I figure that's server lag.
  • For multi-level digging you either need stations on all levels OR have "-oneChest" enabled, there is no in-between.
  • One chest does indeed mean one station, with 4 chests, I plan on renaming the parameter in the next update. I just haven't done it yet since I dislike changing the interface every few days, that's too confusing for other users.
  • The turtle assumes to next level is 'height+1' blocks above/below the current one. So in your case that would be 4. But again, if you use -oneChest you don't need an extra station, it's only a little bit faster most of the times.
Znubbis #222
Posted 18 January 2013 - 01:15 AM
Ah thank you very much for the information, it cleared things up a bit :)/>

I guess its just to continue with 3 levels and skip 2 when im done with my second level.
Ulthean #223
Posted 18 January 2013 - 01:26 AM
Yeah, that should work like a charm!
Diamondclaw #224
Posted 18 January 2013 - 01:32 AM
Thanks for the quick reply.

  1. Normally if you use "-sides -torches" the turtle should place torches on the walls of the tunnels instead of on the floor, this for the exact reasons you mention. Are you sure you ran the program with both "-sides" and "-torches" as parameters?

I'll run another attempt real quick in my test world with a shaft size of 5. The command I will use is DigAndExcavate -numT 1 -numS 5 -betw 2 -sides -torches

I'm hoping this will create 1 tunnel with 5 shafts on each side that are separated by 2 blocks and have torches placed on the walls in both the shafts and the tunnels once the program is complete. Will report back my findings shortly.
Ulthean #225
Posted 18 January 2013 - 01:35 AM
Thanks for the quick reply.

  1. Normally if you use "-sides -torches" the turtle should place torches on the walls of the tunnels instead of on the floor, this for the exact reasons you mention. Are you sure you ran the program with both "-sides" and "-torches" as parameters?

I'll run another attempt real quick in my test world with a shaft size of 5. The command I will use is DigAndExcavate -numT 1 -numS 5 -betw 2 -sides -torches

I'm hoping this will create 1 tunnel with 5 shafts on each side that are separated by 2 blocks and have torches placed on the walls in both the shafts and the tunnels once the program is complete. Will report back my findings shortly.

That should be correct
Diamondclaw #226
Posted 18 January 2013 - 01:54 AM
Thanks for the quick reply.

  1. Normally if you use "-sides -torches" the turtle should place torches on the walls of the tunnels instead of on the floor, this for the exact reasons you mention. Are you sure you ran the program with both "-sides" and "-torches" as parameters?

I'll run another attempt real quick in my test world with a shaft size of 5. The command I will use is DigAndExcavate -numT 1 -numS 5 -betw 2 -sides -torches

I'm hoping this will create 1 tunnel with 5 shafts on each side that are separated by 2 blocks and have torches placed on the walls in both the shafts and the tunnels once the program is complete. Will report back my findings shortly.

That should be correct

Ok I think I found the problem. When I specify -betw 2 no torches are placed in the tunnel. However, when I specify -betw 3 (the default in the config) it places the torches in the tunnel fine. I wonder if it is attempting to place the torches with -betw 2 but can't because a shaft is where it expects there to be a wall. It should still be able to place torches on the 1 or 2 blocks in between the shafts though no? For example if I used -betw 1 it should be able to still place a torch on the 1 block in between all the shafts.
Ulthean #227
Posted 18 January 2013 - 02:04 AM
Ah, this is possible, I haven't tested other values of betw, I will check it out ASAP
Diamondclaw #228
Posted 18 January 2013 - 02:13 AM
Ah, this is possible, I haven't tested other values of betw, I will check it out ASAP

Thanks and thank you again for making this program.
Ulthean #229
Posted 18 January 2013 - 02:17 AM
Could you try it now? I updated the pastebin file, so run:

rm changelog
startup
Or whatever you called the 'updater'

Note: I think this should solve the problem, but I am not at home so I can't test it :)/>
Diamondclaw #230
Posted 18 January 2013 - 03:23 AM
Could you try it now? I updated the pastebin file, so run:

rm changelog
startup
Or whatever you called the 'updater'

Note: I think this should solve the problem, but I am not at home so I can't test it :)/>

Testing now.
Guizmus #231
Posted 18 January 2013 - 03:40 AM
Nice job you did here Ulthean !
I don't like to use other's programs though, so I'm creating my own using some of your ideas. I love what you did though :)/>
Ulthean #232
Posted 18 January 2013 - 03:44 AM
Good luck with your programs, should you need any help with some of the parts feel free to contact me!
Diamondclaw #233
Posted 18 January 2013 - 04:18 AM
Could you try it now? I updated the pastebin file, so run:

rm changelog
startup
Or whatever you called the 'updater'

Note: I think this should solve the problem, but I am not at home so I can't test it :)/>

Testing now.

Ok tested with -betw 2 and though it initially placed the torches on the walls during the digtunnels phase it then took them down during the digores phase as it would go to enter the shaft, check the sides of the entrance, detect a torch, and dig it off the wall.
Ulthean #234
Posted 18 January 2013 - 04:39 AM
Ah y, I will need to fix that (should be easy, just include the torch as an ignore block). I will test this out tonight and report back to you.

Edit: changed the pastebin code, should remedy the problem. But again, this is untested code, so you can either wait until I have the chance to test it or test it out yourself.
Diamondclaw #235
Posted 18 January 2013 - 05:04 AM
Ah y, I will need to fix that (should be easy, just include the torch as an ignore block). I will test this out tonight and report back to you.

Edit: changed the pastebin code, should remedy the problem. But again, this is untested code, so you can either wait until I have the chance to test it or test it out yourself.

Out of the house atm but I will test it when I get home this afternoon. Thanks again!
Diamondclaw #236
Posted 18 January 2013 - 08:30 AM
Works great now thanks a bunch!
Ulthean #237
Posted 18 January 2013 - 08:57 AM
Thanks for reporting the problem!
ikehoff #238
Posted 20 January 2013 - 11:32 AM
Noticed a slow down when mining near bedrock. While on y=5, the turtle stops on top of bedrock for several seconds. I assume it is trying to dig this block because it is not included in the "ignore blocks" and after some timeout period, it moves on.

Here is how I initialized the turtle "digAndExcavate -numS 4 -numIgnore 4 -torches"

Is there a way to make bedrock a permanent ignore?
outlawgb #239
Posted 20 January 2013 - 12:13 PM
not that i know of you could nei bedrock in and add it to your ignore chest or stay a couple above bedrock i use mine at y11 vanilla turtles have know way of knowing what blocks are around them short of checking with a block in its inventory
ikehoff #240
Posted 20 January 2013 - 12:23 PM
I could have it dig tunnels and shafts and manually collect ores on this level. Dig and excavate on every other level. It's not a super big deal, just slows execution time when it stops on every bedrock it comes across.
Ulthean #241
Posted 20 January 2013 - 08:25 PM
I could add a parameter specifying the number of retries/the timeout period if you would like that.
ikehoff #242
Posted 21 January 2013 - 04:58 AM
No, I don't think that will be necessary. Besides, there are lots of parameters already.
moverperfect #243
Posted 21 January 2013 - 06:10 AM
I think i have a bug report, i ran digAndExcavate with 1 level and one chest and that is the top level you see, after that completed i ran it again but with -numL 2 -skipL 1 and that is what the turtle is doing now, i believe it is placing the torches in the wrong place, i will add an edit when it gets round to digging the shafts.

http://i.imgur.com/ZPqZD1f.png

EDIT: Is this supposed to happen :S

http://i.imgur.com/JVFQjO5.png

Info:
Sides: True
Shafts: 4

No bug, jut me being derpy and not catching up on all the new functionality.
Bullen #244
Posted 21 January 2013 - 06:16 AM
I think i have a bug report, i ran digAndExcavate with 1 level and one chest and that is the top level you see, after that completed i ran it again but with -numL 2 -skipL 1 and that is what the turtle is doing now, i believe it is placing the torches in the wrong place, i will add an edit when it gets round to digging the shafts.

http://i.imgur.com/ZPqZD1f.png

Info:
Sides: True
Shafts: 4

Looks correct, as far as I know it will offset every other level.
Ulthean #245
Posted 21 January 2013 - 08:09 AM
If you prefer them exactly below the other shafts you can use "-evenOffs 0" though using this offset will generally get you more ores in the end.

EDIT: Also, I love the way the shafts and tunnels look on your mini-map :)/>
DeletedBad #246
Posted 21 January 2013 - 08:51 AM
I found a bug, if it places a torch on an ore when it breaks the torch it doesn't replace it.
MorphiusX #247
Posted 21 January 2013 - 08:05 PM
is there a tutorial that explains what each setting does as i set up a compact version 5x5 excavate but not sure how to tell the turtle that
Ulthean #248
Posted 21 January 2013 - 10:00 PM
is there a tutorial that explains what each setting does as i set up a compact version 5x5 excavate but not sure how to tell the turtle that

Do you mean that the central area with the refueling/dropoff station(s) has a size of 5x5? In this case a centerRadius of 2 should do the trick.
Either add the following parameter to your function call: "-radius 2" or change it in the config file.
MorphiusX #249
Posted 21 January 2013 - 11:23 PM
cheers mate :)/>
cyclotis04 #250
Posted 23 January 2013 - 07:17 PM
A few questions - I tried looking through this topic, but at 13 pages forgive me if I ask something that's already been answered.
  • First, is there a reason that the turtles don't mine ores out of the tunnels themselves?
  • Second, I started my mine just above bedrock - the turtles pause for a second when passing over a bedrock block looking for ores. Why is that?
  • Third, since I started my mine at the bottom, is there a way to tell the turtles to mine the next level higher than the last? IE, mine bottom-up? Oops - missed that this was default.
  • Fourth, your videos imply that multiple turtles will all work together. How would I set this up?
  • Lastly, have you considered supporting enderchests? It would allow turtles to carry their 4 requisite chests with them, and never need to return to base.
Thanks for the great script!
Ulthean #251
Posted 24 January 2013 - 12:48 AM
A few questions - I tried looking through this topic, but at 13 pages forgive me if I ask something that's already been answered.
  • First, is there a reason that the turtles don't mine ores out of the tunnels themselves?
  • Second, I started my mine just above bedrock - the turtles pause for a second when passing over a bedrock block looking for ores. Why is that?
  • Third, since I started my mine at the bottom, is there a way to tell the turtles to mine the next level higher than the last? IE, mine bottom-up? Oops - missed that this was default.
  • Fourth, your videos imply that multiple turtles will all work together. How would I set this up?
  • Lastly, have you considered supporting enderchests? It would allow turtles to carry their 4 requisite chests with them, and never need to return to base.
Thanks for the great script!
  1. At the moment the turtle will indeed only dig out the shafts, since checking the tunnels is not a very efficient use of the time (hopefully most veins in the tunnels will be part of one shaft or another). I might add optional functionality for this one day, but it's a low priority for me
  2. Since bedrock is an unknown block (not one of the ignore blocks) he will try to mine it for a while, if it does not succeed after 10 tries (about 5 seconds) he will continue. A solution to this is adding bedrock to the ignore items, though you probably would have to spawn it in. I just thought of a way to speed up this process, though it will need some testing.
  3. Indeed it is :)/>
  4. Basically it's just a lot of turtles working individually, each having their own part of the area to excavate. So place each turtle individually, then run them with the correct parameters (if you want to have 4 turtles per level set numT to 1 (aka: dig only one tunnel))
  5. Now that you mention it this might be convenient, I will look into it.
My first priority now is to have it be able to resume. I'm not entirely sure how to yet (given the structure of the program) but I think I have a pretty good idea.
About having turtles cooperating: I would like to refer to the following post as a guideline:

————————————————————————————————————————————————-

If you place them really close to each other there is a very small chance that two turtles will collide, if they are excavating the same ore vein at the same time. Then there is an even smaller chance that they will both want to move into each other's space and get stuck. From safest to fastest:
  • SAFEST: 1 turtle per two levels (orient one north of the center, the other south just to be sure)
  • 1 turtle per level (one north, one south)
  • 2 turtles per level (lvl 1: north/south, lvl 2: east/west)
  • FASTEST: 4 turtles per level
cyclotis04 #252
Posted 24 January 2013 - 03:33 AM
  1. At the moment the turtle will indeed only dig out the shafts, since checking the tunnels is not a very efficient use of the time (hopefully most veins in the tunnels will be part of one shaft or another). I might add optional functionality for this one day, but it's a low priority for me
  2. Since bedrock is an unknown block (not one of the ignore blocks) he will try to mine it for a while, if it does not succeed after 10 tries (about 5 seconds) he will continue. A solution to this is adding bedrock to the ignore items, though you probably would have to spawn it in. I just thought of a way to speed up this process, though it will need some testing.
  3. Indeed it is :)/>
  4. Basically it's just a lot of turtles working individually, each having their own part of the area to excavate. So place each turtle individually, then run them with the correct parameters (if you want to have 4 turtles per level set numT to 1 (aka: dig only one tunnel))
  5. Now that you mention it this might be convenient, I will look into it.
My first priority now is to have it be able to resume. I'm not entirely sure how to yet (given the structure of the program) but I think I have a pretty good idea.
About having turtles cooperating: I would like to refer to the following post as a guideline:

————————————————————————————————————————————————-

If you place them really close to each other there is a very small chance that two turtles will collide, if they are excavating the same ore vein at the same time. Then there is an even smaller chance that they will both want to move into each other's space and get stuck. From safest to fastest:
  • SAFEST: 1 turtle per two levels (orient one north of the center, the other south just to be sure)
  • 1 turtle per level (one north, one south)
  • 2 turtles per level (lvl 1: north/south, lvl 2: east/west)
  • FASTEST: 4 turtles per level

Thanks for the quick answers. What happens if two turtles "collide"? Does one mine out the other?

The enderchest idea is from this script I tried: http://www.computercraft.info/forums2/index.php?/topic/7663-rebootable-rabbit-hole-mining-program/
It elliminates roundtrips for item dropoff. You could try making it an option only for ore-mining at first (especially useful if many ignored blocks fill up your turtle's inventory.) Slightly less useful, but still a good feature, would be torch and fuel enderchests.
Ulthean #253
Posted 24 January 2013 - 03:36 AM
They shouldn't mine each other, they will normally wait for the other one to move out of the way, but every so often they will both want to go to the block where the other turtle is (example: 2 turtles on top of each other, the top one wants to go down, the bottom one wants to go up) and they will get stuck.
cyclotis04 #254
Posted 24 January 2013 - 07:59 AM
I have one more suggestion that might be easier than the ability to resume: make the turtles carry fuel with them rather than consume it all at once. This way, even if a turtle cannot resume, it can be broken and returned to the beginning without losing entire stacks of fuel.
sjkeegs #255
Posted 24 January 2013 - 08:08 AM
I have one more suggestion that might be easier than the ability to resume: make the turtles carry fuel with them rather than consume it all at once. This way, even if a turtle cannot resume, it can be broken and returned to the beginning without losing entire stacks of fuel.

If you label the turtle it won't lose its fuel level when you break it.

"label set myturtle"
cyclotis04 #256
Posted 24 January 2013 - 09:46 AM
I have one more suggestion that might be easier than the ability to resume: make the turtles carry fuel with them rather than consume it all at once. This way, even if a turtle cannot resume, it can be broken and returned to the beginning without losing entire stacks of fuel.

If you label the turtle it won't lose its fuel level when you break it.

"label set myturtle"

Oooh, thank you. Fairly new to turtles, sorry. =P
Zeadsheen #257
Posted 24 January 2013 - 11:45 AM
Everytime i try to use the dig and excavate command it keeps telling me this api_turtleExt :329 : attempt to compare number with string expected, got number
cyclotis04 #258
Posted 24 January 2013 - 12:33 PM
My turtles have been having troubles resuming work after running out of torches. They'll sit facing the torch chest, sucking up any torches they can, telling me I require 1 more torch.
Ulthean #259
Posted 24 January 2013 - 10:20 PM
Everytime i try to use the dig and excavate command it keeps telling me this api_turtleExt :329 : attempt to compare number with string expected, got number

I think you play with unlimited fuel mode, use the parameter -noFuel or change it in the config file. This should resolve the problem.

My turtles have been having troubles resuming work after running out of torches. They'll sit facing the torch chest, sucking up any torches they can, telling me I require 1 more torch.

Have you tried giving them another torch? They need 65 to get moving at this moment (though in retrospect this isn't necesarry and I will change this to 64 in the next update) They will keep sucking torches until they get at least one torch in the first empty slot (apart from the torch slot) and will then redeposit that one torch.
Znubbis #260
Posted 25 January 2013 - 01:25 AM
Can you add a check for room in the chest when they unload? my sorter had stopped yesterday and it filled the whole system up and i think the turtles just dumped the ore on the ground when the chest was full.

Thank you!
Slind #261
Posted 25 January 2013 - 03:07 AM
hey,

is there a way to continue a program after server restart?

if not, is it possible to add something like this via gps?
cyclotis04 #262
Posted 25 January 2013 - 05:12 AM
My turtles have been having troubles resuming work after running out of torches. They'll sit facing the torch chest, sucking up any torches they can, telling me I require 1 more torch.

Have you tried giving them another torch? They need 65 to get moving at this moment (though in retrospect this isn't necesarry and I will change this to 64 in the next update) They will keep sucking torches until they get at least one torch in the first empty slot (apart from the torch slot) and will then redeposit that one torch.

Yes, they've had 64 torches in the first slot, plus more in other slots. They'll suck up whole stacks and just keep saying they need 1 more torch. I've needed to terminate the program and restart for anything to happen. I'll try and get more details if I can.
Bullen #263
Posted 26 January 2013 - 09:20 AM
I had the same problem, I don't recall what made it but the turtle was waiting for torches no matter how much I gave it or the chest. I hade to terminate the program to continue.
Manazu #264
Posted 28 January 2013 - 04:34 PM
Make sure everyone uses the same ignore blocks as shown in the video!!
danyo #265
Posted 29 January 2013 - 09:04 AM
So, I finally got my turtle running, I had him do 1 level with 6 shafts for each tunnel with the one chest program with torches. It was going fine for the first tunnel and shafts, so I decided to leave him running for a while and come back to check up on it later…

So, I came back, and I found the chest completely filled, wich is, in all honesty, my own fault for not checking up on him sooner, and not having a set up that clears the chest automaticly to prevent overflow. But it was still somewhat of a testrun, and I didn't mind too much. The problem is though… I wanted to go see where my little guy was working. He finished digging the tunnels and shafts, but for some reason, he didn't finish digging the ores. Now, I assumed he just wasn't done yet, so I kept looking for him. Turns out, I can't find him anywhere, and when I started having a closer look at the place, I noticed a lot of holes to bedrock, and all the way up to the surface, and I have no idea why that happened. The turtle is nowhere to be found, and I have no idea why he ended making those holes :o/>

In any case, is there actually a way to find him back? Or should I just not bother to look for him ( in the time he was working, he did manage to get me more resources then he costs, so it's fine if I can't, I'm just curious where he ended up ) There's also still fuel left, so I guess there's a chance he'll come back, but I doubt it since he seems to have lost control over his location. Also, what's the reason for him going haywire like that? Could it be caused by the dropoff chest being full?

I do like it, and I'll probably keep using it, but I just wanted to find out what exactly I did wrong and if there's a chance I'll see my little buddy again or not.
Ulthean #266
Posted 29 January 2013 - 09:53 PM
For everybody who reported bugs or asked questions: I did hear them, I'm just quite busy atm, but I will answer them/fix them ASAP.

@danyo: my guess is that you forgot to give him smooth stone as an ignore block. Is this possible? By default the turtle expects the ignore blocks to be present in the chest to his left.
danyo #267
Posted 30 January 2013 - 12:21 AM
No, I definitely gave him smoothstone, though now that you mention it, the chest with the ignore blocks was empty when I returned. He did do the tunnels and part of the ore digging correct at least ( the first tunnel, it seems to have gone wrong when he was gonna start digging the ores in the other tunnels )
Ulthean #268
Posted 30 January 2013 - 01:52 AM
Aha, did you use -oneChest? or did you have a set of chests ready for the second tunnel?

Sounds like he went to the second tunnel, dropped the ignore blocks on the ground there, and then started digging etc. If you don't use -oneChest he assumes there is a refueling/dropoff station there.
bukuskat #269
Posted 30 January 2013 - 03:00 AM
Hey, i'm trying to set this up, but ran into a problem right off the bat… went trying to run the pastebin it comes up with "no such program"
yet when i actully go to pastebin its there?
danyo #270
Posted 30 January 2013 - 03:29 AM
Aha, did you use -oneChest? or did you have a set of chests ready for the second tunnel?

Sounds like he went to the second tunnel, dropped the ignore blocks on the ground there, and then started digging etc. If you don't use -oneChest he assumes there is a refueling/dropoff station there.

I may have forgotten that when I started the proper test run :(/> So basicly, he just kept digging around that area most likely untill he ran out of fuel… ( It seems he did still ignore dirt when he was digging those holes, since he did stop before the surface was reached )

decided to use one of those seethrough texturepacks to find him again, made it a lot easier :)/> Happy I got him back now at least.
Leo Verto #271
Posted 30 January 2013 - 03:33 AM
Hey, i'm trying to set this up, but ran into a problem right off the bat… went trying to run the pastebin it comes up with "no such program"
yet when i actully go to pastebin its there?
Set http-enabled in .minceraft/config/ComputerCraft.cfg to true, without HTTP pastebin won't work.
Faux soyeur #272
Posted 31 January 2013 - 04:36 AM
hi all, sorry for my english
i discover minecrat one month ago and find this mod, and like a newbie i lost my unique turtle while running this program. I try to recover it, but no result for the moment.
each time i used this turtle a directory was created in my saves ones like 0 1 2 etc
i place 4 computers in the vicinity and try to modify startup file to locate this turtle and i m very bad.
MY turtle is wireless, i run digandexcavate with config modified for torch=true and i have only few notions of programming
if somenone can tell me how to find information to recover this turtle well, i d be happy.
Sorry to break the line of this thread, but i cannot create topic for the moment i read.
tx to read me.
bukuskat #273
Posted 31 January 2013 - 05:33 AM
Hey, i'm trying to set this up, but ran into a problem right off the bat… went trying to run the pastebin it comes up with "no such program"
yet when i actully go to pastebin its there?
Set http-enabled in .minceraft/config/ComputerCraft.cfg to true, without HTTP pastebin won't work.

Yes sorry i figured this out last night, i ended up enabling http in minecraft rather then FTB. works great now.
bukuskat #274
Posted 31 January 2013 - 08:33 AM
Ulthean are you going to be creating anymore scripts?
danyo #275
Posted 02 February 2013 - 07:10 AM
Oké, got 2 questions, nothing urgent or anything, just curious.

So I tested out the turtle again, and it succesfully did a single level with 4 tunnels and 6 shafts each ( with the digandexcavate program ), my questions now are, can I make it continue from this point to do other levels without having to set up a new docking station ( I'm guessing the skip level might do that, but wanna make sure )

Second question is, if you make more then one level, does it go up, or down after finishing the current level?

Simple questions really, but I was a bit overzealous last time and it made a mess, so I wanna make sure I know what it'll do before I do it now xD
Ulthean #276
Posted 02 February 2013 - 11:41 AM
snip (lost turtle)
You could try to use an 'x-ray' texture pack. (google it, it is basically a texture pack where all the blocks are invisible, so you should be able to find the turtle). Another way is to find the turtle by following any tunnels it might have dug.

Ulthean are you going to be creating anymore scripts?
I would love to, but I am working on my master thesis at the moment, so I don't have a lot of time to spare. If I find some time between my work I plan to keep this updated, rather than start a new project until I finished my thesis.

Oké, got 2 questions, nothing urgent or anything, just curious.

So I tested out the turtle again, and it succesfully did a single level with 4 tunnels and 6 shafts each ( with the digandexcavate program ), my questions now are, can I make it continue from this point to do other levels without having to set up a new docking station ( I'm guessing the skip level might do that, but wanna make sure )

Second question is, if you make more then one level, does it go up, or down after finishing the current level?

Simple questions really, but I was a bit overzealous last time and it made a mess, so I wanna make sure I know what it'll do before I do it now xD
  • Yes you can use "-skipL" like you mentioned, but be sure to add "-oneChest" aswell, so it will return to the current restocking/refueling station.
  • By default it moves upwards, but you can change this using "-dirNextL down"
danyo #277
Posted 02 February 2013 - 03:04 PM
Perfect, thanks for the response :)/> that'll make things easier.

And yes, I'm pretty sure I screwed up last time by not making it -oneChest since this run it had no problems whatsoever.

Thanks for the great program, I really like it!
bukuskat #278
Posted 04 February 2013 - 07:50 AM
Hey, i have a few suggestions for your program.

After playing around with this for a few days, i came up with some ideas.
not sure if any of these can actully be done but ill leave that up to you.

Ideas are

1. Time - set amount of time for the turtle to mine, then it returns to the "base" (would be helpful so we dont have to go looking for the turtles after a server restart or we logout if not on a server.)
2. Remember - lets the turtle pick up where it left off after said amount of time or server restarts/client logouts etc..(rather then having to reload the program all the time)
3. Base setup - digout and place base items (chests pipes etc..(althought i dont remember if it can already do that or if that was another program i seen))
4. Auto Fill - after the digOres, go around and place in blocks where the holes are (shaft walls(floor, sides, roof and end of the shaft), lava/water (just the path it made for the shafts).

Same may say that the Auto Fill idea may be alittle to much, but for myself i like to have a "clean" look to my mining shafts,tunnels etc. just a thought.
tigar #279
Posted 07 February 2013 - 11:09 PM
I had an idea while messing around with setting up a few turtles to run in together so figured id share it

What about a program that you can run that builds the base itself as in the chests and all that as that would mean that you could walk into a desert place the turtle tell it to run that program and give it the chests needed and it starts to build the basics for it and all you have to do is fill the chests with torches/coal/blocks needed to be ignored and place the turtles and run the commands

I tried making it myself but it would be nice to see it being part of this as well as i would make starting off a bit easier especially for someone who comes across this for the first time as i myself when i tried it for the first time missed out on placing a few chests and kept wondering why it never worked :P/>


just thought id share that idea :)/>

edit: right after i post it i see that someone already beat me to it with asking -.- :P/> i should read the last few posts when having an idea oh well :P/>
Nom4d #280
Posted 08 February 2013 - 10:21 AM
Ulthean, just wanted to reply to let you know that I've had some really good experiences using your program, so for that I wanted to say thank you!
Znubbis #281
Posted 08 February 2013 - 10:48 PM
This program works really nice, last shaft i build i made a construction with frames so i can move it once im done. I used some ender chests for fuel and torches to save some room and a relay with central chest for the rest.

My plan is to make a program for a turtle to dig out a large enough shaft to the next dig site and jack on some engines and move the rig there, but i haven't got to that yet :)/>



tigar #282
Posted 11 February 2013 - 07:54 PM
I got an other idea for an other command

What if you where able to tell the turtle to keep a bucket on itself at all times so that when it encounters lava(if it can detect it) that it grabs all the lava in its path and refuels itself on the fly?
It would help in clearing a path through lava lakes if all the source blocks around the turtle are cleared away by the turtle before hand

Just a thought i had :)/>


Also i keep getting this with the latest code "turtle:18: Too long without yielding" on a server that i play on
I sit here watching it mine and then it randomly stops and gives me that error message and it does the same for some of my friends
It does not matter which program is run it does it on all of them and im guessing it might be due to server hickups or something but ya i thought id let you know
vampsama #283
Posted 16 February 2013 - 12:31 PM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
Ragnar #284
Posted 18 February 2013 - 07:34 AM
Really nice trailer!
I'm looking for a turtle program that just digs a circle downwards, nothing too fancy. Does your program do this as well or can someone help me point out a nice program for that?
outlawgb #285
Posted 18 February 2013 - 02:29 PM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
that message should only happen when you first load a world are you quitting while you run the program if so theres your problem
vampsama #286
Posted 18 February 2013 - 09:40 PM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
that message should only happen when you first load a world are you quitting while you run the program if so theres your problem

Yeah I disconnected and rejoined the server.
Would the Turtle need to update when I leave if someone else is alreadey online when i rejoin?
Will the turtle attempt update when someone else joins the server?
Otherwise I guess I have to idle on the server while my turtle does its thing?
Would a chunk loader upgrade let the turte continue its business?
ickr #287
Posted 19 February 2013 - 04:06 AM
I get a [bios:333: Not an HTTP URL] error when trying to run [startup]. I have looked at the bios.lua at line 333 and I really cannot make heads or tails of it. I'm very green and not sure what I should be looking for.

Thanks for the help
ickr
cookiesk8r #288
Posted 19 February 2013 - 07:39 AM
hi after reading through the thread i couldn't see an answer to my question. Is it possible to download the pastebin file while in minecraft and place on a floppy to put in a drive behind the turtle thus removing connection time of download each time
Dekken #289
Posted 19 February 2013 - 08:09 AM
Is there a reason why the turtle dug all the shafts just fine, then came back and started digging all the way up, way behind the chests and everything? just digging 4 blocks in the L shape upwards.
| _ _ _
And he also was full, and kept dropping everything.
outlawgb #290
Posted 19 February 2013 - 12:13 PM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
that message should only happen when you first load a world are you quitting while you run the program if so theres your problem

Yeah I disconnected and rejoined the server.
Would the Turtle need to update when I leave if someone else is alreadey online when i rejoin?
Will the turtle attempt update when someone else joins the server?
Otherwise I guess I have to idle on the server while my turtle does its thing?
Would a chunk loader upgrade let the turte continue its business?
yes a chunk loader is what you need if you are using chicken chunks set it high with 16 shafts i set mine to 7 or 8 in the gui
outlawgb #291
Posted 19 February 2013 - 12:17 PM
Is there a reason why the turtle dug all the shafts just fine, then came back and started digging all the way up, way behind the chests and everything? just digging 4 blocks in the L shape upwards.
| _ _ _
And he also was full, and kept dropping everything.
what command did you use if it was the all in one command did set your ignore blocks right my turtles run just fine i tend use the single commands
outlawgb #292
Posted 19 February 2013 - 12:18 PM
hi after reading through the thread i couldn't see an answer to my question. Is it possible to download the pastebin file while in minecraft and place on a floppy to put in a drive behind the turtle thus removing connection time of download each time
you can copy them to floppy but you should not have to DL each time set labels for turtle retains programs and fuel the command is : label set "your text" whithout quotes
outlawgb #293
Posted 19 February 2013 - 12:20 PM
I get a [bios:333: Not an HTTP URL] error when trying to run [startup]. I have looked at the bios.lua at line 333 and I really cannot make heads or tails of it. I'm very green and not sure what I should be looking for.

Thanks for the help
ickr
did you turn on http in your computer/turtle config file ?
cookiesk8r #294
Posted 19 February 2013 - 12:47 PM
cheers outlaw i just did this tonight on my survival world with a trial at level 40 odd and got 242 ores for 3 shafts :)/> now the only way is down ;)/>
Permutation #295
Posted 21 February 2013 - 07:18 AM
Greetings. Thanks for all your work on this turtle. I've used several, but am always looking for better ways to do things. I d/l yours yesterday via pastebin (rom/programs/http/xxx), altered only one parameter (# of blocks to ignore from 6 to 4), set up the 4 locations on a 5 point radius, and used the "digandexcavate api (as recommended). The first run was on a turtle with a wireless modem and a chunkloader set to +6 (121 chunks). The first section completed as designed, but as soon as the turtle came to the end of the top right corner (orient the turtle pointing to the north with the top right corner in the northeast direction), instead of returning to the center and starting on the next section, it turned north for about 20 blocks, then east, then north, then east, etc. Finally, I had to break the turtle as it was way out of its zone by then. I tried a second run today with a standard mining turtle. This time I oriented the turtle to the east. Again, if finished the first section fine, then returned to the center. In this case, however, it started repeating the first section run with the difference being it took down *every* block. So, instead of having tunnels and shafts, it was creating one large, flattened area.. Also, it refused to return to the dropoff point and was spitting all the blocks out the back.

I play the FTB/Mindcrack pack and am the admin of a commercially hosted server. We had an update yesterday and I don't know if a Computercraft update was a part of that package. If it was, there may be an incompatibility introduced with that update. If there wasn't an update–I don't know what to say other than the script is bugged (I deleted and re-installed on two different turtles).

Thanks again. If you or anyone has any insight as to what's happening, please share as this looked like a promising script to use. For now, however, we've shelved it.
vampsama #296
Posted 21 February 2013 - 09:57 AM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
that message should only happen when you first load a world are you quitting while you run the program if so theres your problem

Yeah I disconnected and rejoined the server.
Would the Turtle need to update when I leave if someone else is alreadey online when i rejoin?
Will the turtle attempt update when someone else joins the server?
Otherwise I guess I have to idle on the server while my turtle does its thing?
Would a chunk loader upgrade let the turte continue its business?
yes a chunk loader is what you need if you are using chicken chunks set it high with 16 shafts i set mine to 7 or 8 in the gui

Chunk loader upgrade worked fine for a while but now I reenter and I get the error again. This time my turtle wasnt in a lava lake atleast…

Does anyone have any insight on how to stop this behaviour?

Is there a way to have the turtle resume operations without having it redoing all the shafts?

im running with -oneChest…
sircrimer #297
Posted 23 February 2013 - 12:56 AM
My turtle gets stuck with the message, once as digAndExcavate -torches -numIgnore 6 and once as digOres

—————————
MLG MINING: NO UPDATE FOUND
—————————

Is there anyway to prevent automatic updates?
that message should only happen when you first load a world are you quitting while you run the program if so theres your problem

Yeah I disconnected and rejoined the server.
Would the Turtle need to update when I leave if someone else is alreadey online when i rejoin?
Will the turtle attempt update when someone else joins the server?
Otherwise I guess I have to idle on the server while my turtle does its thing?
Would a chunk loader upgrade let the turte continue its business?
yes a chunk loader is what you need if you are using chicken chunks set it high with 16 shafts i set mine to 7 or 8 in the gui

Chunk loader upgrade worked fine for a while but now I reenter and I get the error again. This time my turtle wasnt in a lava lake atleast…

Does anyone have any insight on how to stop this behaviour?

Is there a way to have the turtle resume operations without having it redoing all the shafts?

im running with -oneChest…
Yes you can,
1. Tell it what to do digAndExcavate, digOres, digTunnels or digShafts
2. Tell it the amount you want to skip

get ores and skipp 5 shafts:
"digOres -skipS 5"

And I have the same problem with a WorldAnchor, some turtles just shut down when i log out.
I think they might be getting out of the range of the World Anchor.
Ulthean #298
Posted 25 February 2013 - 08:32 AM
It has been a while since I last posted on this thread, I am in the final month of my master's thesis and I lack any form of free time :)/> Just a quick update to let you know that I will continue work on this program, albeit only after I finished my thesis (end of march). I will edit the OP to reflect this.

I would like to thank all the wonderful posters (outlawGB, sircrimer to name just some) who helped the other users out by answering their questions in my absence.

@Znubbis: Nice setup man, I love it!!
outlawgb #299
Posted 25 February 2013 - 02:06 PM
nice to see you are still about ulthean hope you do well on your thesis
sircrimer #300
Posted 25 February 2013 - 09:10 PM
Ok there is a bug in the -numIgnore section.
With 4(Dirt,Cobblestone,Stone,gravel) and with 2(Dirt, Cobblestone) the Turtle ignores the setting and goes off removing cobblestone.
Seems to work fine with the normal 6 ignore Blocks.

Might be smth else altogether, another program had the same problem. I think it is the comparison of the cobblestone blocks.
Might be FTB.

And I had an error in my Chunkloaders, so no more stops. :)/>

Greetings Crimer
Ulthean #301
Posted 26 February 2013 - 09:32 PM
Crimer: did you remember that you need to use SMOOTH stone for comparison? (though it becomes cobblestone after mining)
unobtanium #302
Posted 26 February 2013 - 11:28 PM
I finally tried this program on my server out (after watching this post for three month now…), because i needed diamonds for a quarry.
Within 4 hours a single turtle gave me 30 diamonds. This is much more then i tought. However the problem is that i am not really far in the game and the quarry is the best chunk loader for right now, so i will remove the turtle and set this up. Then i get materials while i am offline.
I really enjoy this program. However: The turtle places down torches but breaks it later on if there are ores around. The turtle doesn't place the torches back. Another negative points is, that the turtle does not get all the materials in the main tunnel. At level 12/13 there are a lot of lava lakes and i can get some ores because i am not superman and can fly into it ;D
The last thing i want to know: I didnt checked it, because this question might be dumb… The turtle sucks in the Ignore Blocks and then drops them back down. Does it safe some data to compare or does it carry the Ignore Blocks all the time? And if it safes data, how did you done that?
Thank you for this program!
xInDiGo #303
Posted 27 February 2013 - 05:08 AM
The last thing i want to know: I didnt checked it, because this question might be dumb… The turtle sucks in the Ignore Blocks and then drops them back down. Does it safe some data to compare or does it carry the Ignore Blocks all the time? And if it safes data, how did you done that?
Thank you for this program!

From what i can tell, it stores the ignore blocks in the chest while it digs the tunnels, then it will come back, take the ignore blocks out, and then go try to mine the ores.

what did you mean by "the quarry is the best chunk loader for right now"?
unobtanium #304
Posted 27 February 2013 - 05:43 AM
Ah okay. Thank you. I didnt check if the turtle carries the ignore blocks with it :D/>

I am not able to build a World Anchor yet, because of the lack of enderpearls i have. For the four hours the turtle was digging i had to stick around, going afk and doing other stuff. The chunkloader plus the turtle wouldn't be such effective, because the World Anchor just keeps 3x3 chunks loaded and needs enderpearls and the turtle couldnt go far out. The quarry now can do its thing if i am offline now. It is much quicker for me to get materials now :D/>
Ulthean #305
Posted 27 February 2013 - 10:15 AM
Just a quick note: quarries load chunks even when not powered, so potentially you can put a max-size quarry just to keep the chunks loaded and have the turtle run within those chunks. Just make sure they do not leave the area :)/>
unobtanium #306
Posted 27 February 2013 - 11:10 AM
Yeah i know. But i have enough power to run the quarry. so i will just run this. Its much easier to setup you know :/
Some chests, pipes, voidpipe for cobblestone, and then in two days i am rich ;D
I really like this program. But until you dont have a dozen of turtles mining multiple layers (and multiple turtles per layer), it isnt worth it. And it takes much more time effort to set all the chests up for each layer and turtle.
NIckodemus #307
Posted 28 February 2013 - 08:37 PM
First of all, I must say that I absolutely love this program. However, I do have one complaint. Running this on a server with a scheduled restart is a bit of a hassle. The turtles tend to be hard to find after the server restarts. Is there some sort of workaround for this? :/
akeldama280 #308
Posted 08 March 2013 - 05:32 AM
What are the advantages of this MLG Mining program, rather than just a regular quarry chest program?
Epic__Dave #309
Posted 08 March 2013 - 12:50 PM
Hello i just recently ran this program on a smp server, seemd to work fine i wasnt really watching it to closely but i did have somthing strange happen, i set everything up correctly as instructed on your video tutorial and ran the DigandExcavate program, everything seemd to be working fine, however i did come to find several hours later a majority of my turtles were not at the docking starion rather a few blocks inward and off to the side in the first shafts wall waiting for torches, and thats to be expected because they never redockd, im not sure why this happend it seemd they ran the full program and got all the ores im not sure if they deposited them all tho after finding them in the wall, or if they simply droped the items and resumed.. any ideas why this could have happend? chunks were all loaded, they never unloaded, server didnt restart and i retrieved the program directly from pastbin, any incite would be apprciated.

Thank you
-Dave

(side note awesome program)
Midreian #310
Posted 14 March 2013 - 04:02 AM
Been playing in SSP for a bit to play around with this program. I love it, works great, plan on using it in SMP, but the only problem I have is when I logoff and come back, the turtles have stopped. The program is still loaded and all, is their a resume option, or do I need to redock them restart them?
Shredus #311
Posted 22 March 2013 - 11:36 PM
I have a problem, by the time the turtle reaches the second tunnel second shaft it suddenly digs all the way up to a certain level and then comes down and again and again. What's the problem?
Shredus #312
Posted 26 March 2013 - 04:50 PM
Now It tells me 'No such program' when i typed digAndExcavate -help
CryoFusion #313
Posted 02 April 2013 - 02:26 PM
Hey guys, loving this program so far but the only problem I have is that after a server reset/shutdown or I exit a Single Player world, the turtle is also shutdown and is unable to carry on with its mining when the server/world comes back on, unless I reset it manually. I play on my friend's private server but they're not able to always keep the server on. So far i'm only using one turtle on the server but I plan on adding more. Is there anyway that I can make the turtles automatically resume from the current program or is there another program? If there is a solution then it will make this program even better.

Also I plan on using these turtles because they're WAY cheaper than a quarry and I just think they're cooler so I plan on using these to make permanent mines.

Thanks.
CamShirayuki #314
Posted 04 April 2013 - 10:10 PM
So, I have been getting into Turtle programs, and I came across this one. This is, by far, my favourite turtle mining program ever! But, I only have one problem. Where do I place a chest for it to deposit into? I didn't know where, and I had to put Obsidian pipes below where it ejected ores and have it connect to a chest. Any help I can get?

By the way, love the program. I hope you come back soon and make more programs that are as great as this one is.
Steven McWayne #315
Posted 05 April 2013 - 09:07 AM
The delivery Chest is directly below the Turtle in the Refuel Station as seen in the video.
Steven McWayne #316
Posted 05 April 2013 - 09:15 AM
Hey guys, loving this program so far but the only problem I have is that after a server reset/shutdown or I exit a Single Player world, the turtle is also shutdown and is unable to carry on with its mining when the server/world comes back on, unless I reset it manually.

I get the same problem. I actually take all the torches from the torches chest half an hour before i go offline or server goes down, so the turtles are in the station.
A startup script where the turtles broadcasts their gps location would be cool.

I have a problem, by the time the turtle reaches the second tunnel second shaft it suddenly digs all the way up to a certain level and then comes down and again and again. What's the problem?

You're missing stuff in the ignore chest before you started.
actuall yi would thing theres missing "smooth stone"

Now It tells me 'No such program' when i typed digAndExcavate -help

Parameters etc are on the first page. :P/>
Lithillya #317
Posted 15 April 2013 - 09:19 PM
I'm having trouble getting this to work on the server I'm on. The turtle is able to load the > pastebin get DwJDDMJc startup part, but when I try to run the 'startup' part, the program hangs for ages, until eventually giving an "Error connecting to server" message. Any idea what the problem could be?
Steven McWayne #318
Posted 18 April 2013 - 06:42 AM
The Server maybe itself? :P/>
Imho they run also without Wireless Module, you just need to use a Disk for copying it to the Turtle.
Doktorb #319
Posted 22 April 2013 - 03:37 PM
~solved~
Vorg #320
Posted 06 May 2013 - 03:59 AM
I tried this program. first turtle disappeared after digging the tunnels and starting the ore search. I didn't include sand in the ignore list and a nearby desert was reduced to a bunch of sand stacks. The world gen the desert over a cave system with few solid blocks to hold it up. There wasn't much sand at the bottom though and around 23 stacks of sand (not enough for what looks to be missing) was sent to my base. I "think" the turtle dig a sand block after it was well under the desert and filled up trying to dig out. Seems to me, if it is full, it can't dig because it has no place to put it. So it can't dig itself out to move. I couldn't find it though.

Tried a second turtle from the same startin point, but with sand added to the list and another block removed. This one stopped while digging side tunnels with a message about no updates found. I found the message looking through the files and it was from the startup program:

—————————
MLG MINING: NO UPDATE FOUND
—————————

And i had just ran the startup before running digandexcavate.
Draaven #321
Posted 13 May 2013 - 12:36 PM
Anyone else find that if they're running a few Turtles in the same area and they meet face to face, they don't actually do anything else to get past each other. They just stay there out staring each other. The initial description of the program made out that they could handle other Turtles, but I find it an issue if I run more than 1 in the same area. Anyone got a fix for this? I've also modified the startup so that it sends the turtles location back to a central computer so that I can find lost turtles, via a GPS network.
aex243 #322
Posted 13 May 2013 - 09:03 PM
how i can deal whit server restart ?
Draaven #323
Posted 15 May 2013 - 01:49 PM
For server restarts and not knowing where your Turtles are, I have a computer back at my base that sends out a broadcast with a specific message in a loop. It then waits for a response back from any turtle and displays the message received. The turtles have a modified Startup program that looks for that broadcast constantly in a loop, when it receives the broadcast, it sends back a message to the computer with it's coordinates and then stops running any program. I have a GPS network setup so I can use gps.locate(). I can then go and fetch the turtle and set it going again using the -skip? arguments.
GalaxyMaster #324
Posted 16 May 2013 - 11:56 AM
Seems good, will try this. But one question: How does the turtle see the ores that are in the middle of the three layers between shafts?
aex243 #325
Posted 18 May 2013 - 12:50 PM
I want to know if is possible after a server restart , say to the turtle to continue his job
Second_Fry #326
Posted 19 May 2013 - 10:03 AM
Just noticed turtle stack in forever loop trying to mine cobblestone which is being generated by lava and water. Maybe point that you probably should put cobble to avoid?
Also (didn't check yet) but what would happen if miner will get to the dungeon? AFAIK if it will break chest loot will be on the ground and that is probably sad…
shanewilks #327
Posted 01 June 2013 - 12:03 PM
will this work with tekkit classic? I have run it on tekkit lite and it is amazing, but i ahve all of the same files over on my tekkit classic save and it will not work. It says

api_turtleExt:301: attempt to call nil

Would appreciate some help
TotalBrokenPickaxe #328
Posted 14 June 2013 - 08:21 AM
Loving these programs and would like for there to be an easy way to startup turtles rather than to have to manually do it. Can I do it with Floppy Drives and if so how? I just started with computercraft and have started messing around with lua and have learned a bit of it. I also am getting problems with my turtles. Sometimes they will go whereever they want to. Usually two or three start working and one will just disappear to somewhere else. I also had a problem where all of my turtles stopped. I right clicked on the turtle to see what happened and it said MLG MINING: NO UPDATE
TotalBrokenPickaxe #329
Posted 15 June 2013 - 07:57 PM
I believe the bug or glitch, whatever you may call it, happened because it went out of the chunks that were kept loaded. Now keep in mind that I did have a chunk loader, but, a chunk is only 16 blocks long, not very far at all. You have to keep placing more and more chunk loaders because a chunk loader covers 48(9 chunks) blocks in any given direction. This is not caused by your programming it is caused by you leaving the chunk.
airtonix #330
Posted 01 July 2013 - 09:39 PM
Installed mlg via pastebin (would be good if you could use github to allow others to collaborate on this)
  1. placed chest underneath for drop offs
  2. placed chest to the right for torches, then filled with torches
  3. placed turtle ontop of dropoff chest
  4. ran : digAndExcavate -noFuel -torches -numIgnore 0
it started on the first main branche, created 3 tunnels on either side of that main tunnel, then proceeded to go crazy digging a vertical shaft all the way to the surface (almost dug right through one of my 3x3 piston doors).

Last time (a few months ago) I used this, it didn't behave like this.
cmray #331
Posted 13 July 2013 - 07:38 PM
Hello, I am trying to do this in a single player world and am using the pasetbin link to download the program onto the turtle. The program will download just fine but every time I try to execute a command such as -digTunnels -numS 8 -numL 2 -oneChest it will come out with this error:

api_turtleExt: 329 : attempt to compare number with string expected, got number

I do not know how to code or to check the problem so could someone please assist me?
Horseband #332
Posted 19 July 2013 - 12:48 AM
Installed mlg via pastebin (would be good if you could use github to allow others to collaborate on this)
  1. placed chest underneath for drop offs
  2. placed chest to the right for torches, then filled with torches
  3. placed turtle ontop of dropoff chest
  4. ran : digAndExcavate -noFuel -torches -numIgnore 0
it started on the first main branche, created 3 tunnels on either side of that main tunnel, then proceeded to go crazy digging a vertical shaft all the way to the surface (almost dug right through one of my 3x3 piston doors).

Last time (a few months ago) I used this, it didn't behave like this.

It's behaving exactly as you told it to. Think about it, how exactly is the turtle to know what you want it to excavate. There's no database of every single ore ever put into a mod. So instead of having a list of what TO mine, it has a list of what NOT to mine. This is what the ignore list is for. By telling him not to ignore any blocks, you essentially said, "I want you to gobble up every single block you see", which happens to be cobblestone in this case.

The ignore really isn't "optional". I'd recommend having sand, stone, cobblestone, gravel, and dirt. This way once it gets to the excavate phase, it's not going to go crazy and munch every block it sees.

@CMRay

You shouldn't type "-" before the program name. It should be, "digTunnels -numS 8 -numL 2 -oneChest".
jakemg #333
Posted 24 August 2013 - 10:36 PM
very nice program
zanskrila #334
Posted 04 September 2013 - 10:42 AM
I recently used this alot, and it is VERY effective and decently fast!
tigar #335
Posted 13 September 2013 - 07:43 AM
you know a way for it to recover from a server restart is to have a 2nd file called location(or anything like that) where every step it takes it writes down where it moved to

so the moment you run the normal program the turtle is at 0,0,0 it moves forward once it writes that its at 1,0,0(or which ever direction it went) so say its at 87(forward),0(down/up),12(left right) and the server crashes the moment it comes up the turtle reads the location file and can thus for go on as it knows where it was so all you would have to do is make the turtle write down into that file as well what task its doing and tada no need for gps networks or anything to make the turtle keep going and never get stuck

now that line that it writes down when it moves it gets over written every time it moves and maybe to make sure it doesnt go out of wack you could write a 2nd line that shows the 4 turns it can do so it would look like this 87,0,12,3 standing for 87 blocks forward 0 down 12 to the left(and -12 for right) facing backwards

so that when it comes up it will check for ores in every direction if not itl make its way back up to the tunnel it dug after it faces the right way and continue on its merry way

now maybe after something like that is in you could write a extra script that you could run if you wanted to that would make that turtle tell a computer where it is if its in range thus for you can have more then 1 turtle running and you can look at a screen to see where they are and which one is done
reason for that is if a turtle stores that info in a location file and you made it a wireless turtle a computer could talk to that turtle and request that info every few seconds :)/>
Etone #336
Posted 22 September 2013 - 08:21 AM
I quite like this Programm, but after a daily Server restart and the following search for the turtle (sometime in the middle of a huge lava lake) i decided to use another Programm. If you could make it session persistant, it would be by far the best and my first choice

greetings
Etone
Draaven #337
Posted 04 May 2014 - 07:43 AM
Just setup a FTB Monster server and using this mining script again that I used on FTB Ultimate last year and loved. Only problem was that there are so many blocks you would really like to add to the ignore list and can't due to the limit of the Turtle's inventory that I was finding that the turtle would wander off for miles excavating everything that it could and eventually leave the chunk loaded area or run out of fuel before being able to return, plus it wasn't checking if it was full properly during the excavate routine, so would end up just digging and dropping everything that it found. So I've modified the app_DigOres slightly so that it only wanders off for up to 10 blocks when finding it's initial block that it needs to mine. You can lower this down to 5, works just as well really. So basically it tries to stay in the vicinity of the shafts.

Here's the excavate function with my changes:

function excavate(configuration)
local numSteps = 0
local steps = {}
local goneTooFar = false
repeat
steps[numSteps] = steps[numSteps] or 0
steps[numSteps] = lookForOres(configuration, steps[numSteps])
if steps[numSteps] ~= 7 then
if ((numSteps==0) or (steps[numSteps]~=api_turtleExt.reverseIntDir(steps[numSteps-1]))) then
if numSteps==10 then
goneTooFar=true
end
if goneTooFar==false and api_turtleExt.digAndMove(api_turtleExt.turnedDir(api_turtleExt.intToDir(steps[numSteps]))) == 1 then
configuration.numOres=configuration.numOres+1
numSteps = numSteps + 1
end
end
else
steps[numSteps] = 0
numSteps = numSteps - 1
if numSteps >= 0 then
api_turtleExt.digAndMove(api_turtleExt.reverseDir(api_turtleExt.turnedDir(api_turtleExt.intToDir(steps[numSteps]))), 1, 0)
end
end
until numSteps < 0
end
Turtle_droid #338
Posted 15 July 2014 - 10:39 PM
Anyone else having issues with the turtle stopping if something gets in its way for instance gravel stacks?
UkeFox #339
Posted 26 July 2014 - 03:12 AM
Anyone else having issues with the turtle stopping if something gets in its way for instance gravel stacks?

It has something to do with the attack command. It gave me an error like api_turtleExt: 208 invalid direction. I checked line 208 of the referenced api and tried to fiddle with it… I eventually just removed the tDir variable… it works now but it won't attack things that get in it's way. I believe it has to do with how the arguments for turtle.attack() work with the most current update. I don't know how to fix it
Edited on 27 July 2014 - 03:07 AM
stellarhopper #340
Posted 17 September 2014 - 06:02 AM
I'm seeing the same problem with a gravel block falling in place of one it dug. The error I got was something like "invalid block".
Another thing I saw was while digging a shaft, if it hits bedrock, it exits with the same error.

Would love a fix!
JiRB0T #341
Posted 07 November 2014 - 08:49 PM
I'm having troubles with my turtle when it reaches anything it doesn't like it returns a "api_turtleExt:208: Invalid side", I've setup as shown and have dug a tunnel and shafts proper but once it reaches a player/gravel it give this error any thought or fixes?
UkeFox #342
Posted 13 November 2014 - 05:59 AM
I'm having troubles with my turtle when it reaches anything it doesn't like it returns a "api_turtleExt:208: Invalid side", I've setup as shown and have dug a tunnel and shafts proper but once it reaches a player/gravel it give this error any thought or fixes?

It's an easy fix :D/>

Five easy steps to solving invalid side:


1. Type edit api_turtleExt
2. Navigate to ln 208 (you'll know you're there by the indicator at the bottom right)
3. You'll see turtle.Attack(tdir). You need to remove tdir so there is nothing in the parenthesis but leave everything else the same.
4. Save your edits.
5. Profit!


I think the problem is in the way ComputerCraft handles variables to the turtle.Attack() class now vs. when this program was written.

Have fun! :D/>
Edited on 14 November 2014 - 07:35 PM
swisszeni #343
Posted 30 December 2014 - 08:34 PM
It's an easy fix :D/>

While you are correct with this fixing the crash of the turtle (and that is sufficient for most I guess ;)/> ), it won't fix the function as giving it back its old behaviour. This will lead to a problem if the turtle should attack up- or downwards since turtle.attack() will only attack mobs/players in front of the turtle. To reachiev this, you also need to implement turtle.attackUp() and turtle.attackDown() direction dependent.

The function with this addition would look like this:

function attack(dir)
  turnTo(dir)
  local tDir=turnedDir(dir)
  local attack
  if dir==up then
	attack=turtle.attackUp
  elseif dir==down then
	attack=turtle.attackDown
  else
	attack=turtle.attack
  end
  local success
  while attack() do
	success=true
	sleep(0.3)
  end
  turnFrom(dir)
  return success
end

Since editing the code may not be that easy for everyone, I forked the project to make the updating easyer. You can get the modified startup-script at http://pastebin.com/Jyyby90U. If there is enough time, I'll add some other features as persistence for server restarts or centralized coordination between turtles.
Edited on 30 December 2014 - 08:34 PM
Deathdrgn #344
Posted 20 January 2015 - 03:18 PM
After running in to the attack(tdir) issue myself in regards to gravel, I found that changing line 208 from "while turtle.attack(tDir) do" to "while turtle.attack(Dir) do" will restore original function
swisszeni #345
Posted 03 February 2015 - 03:54 PM
After running in to the attack(tdir) issue myself in regards to gravel, I found that changing line 208 from "while turtle.attack(tDir) do" to "while turtle.attack(Dir) do" will restore original function
No it won't. Since the var "Dir" isn't set anywhere in the function, you are actually passing a NULL value. Furthermore the turtle-API will ignore the value passed. In the end your solution is the same as UkeFox's. Fixes the crash but won't restore the original behaviour.

Stick to my post for a real fix.
drakkon20 #346
Posted 11 February 2015 - 02:35 PM
After running in to the attack(tdir) issue myself in regards to gravel, I found that changing line 208 from "while turtle.attack(tDir) do" to "while turtle.attack(Dir) do" will restore original function

Hey Death! I think I've tracked you down! You should join my private server! I miss playing with you! I came back to MC recently and everybody is missing :S Whats the best way to chat? Let me know!
ISteam #347
Posted 25 February 2015 - 07:09 PM
Is there a way to make this program self contained (=so the mining turtles don't stop if I move out of the chunk,log out, etc….) ?
Picksme #348
Posted 13 April 2015 - 03:24 AM
This looks super cool! Well done.
voidbreath #349
Posted 28 November 2016 - 01:53 PM
Two years later, im getting the api_turtleExt:208: Invalid side error on contact with gravel, ive tried all 3 solutions posted above. Anyone got other ideas?
Bomb Bloke #350
Posted 30 November 2016 - 04:41 AM
And what happened when you did this?
voidbreath #351
Posted 30 November 2016 - 05:50 AM
And what happened when you did this?

api_turtleExt:219: attempt to call nil

or with it written like so:
function attack(dir)
turnTo(dir)
local tDir=turnedDir(dir)
local attack
if dir==up then
attack=turtle.attackUp()
elseif dir
==down then
attack=turtle.attackDown()
else
attack=turtle.attack()
end
local success
while attack() do
success=true
sleep(0.3)
end
turnFrom(dir)
return success
end
api_turtleExt:215: attempt to call boolean

was unsure if it was an oversight that the parentheses weren't there so i tried it both ways

Edit: accidently put turnfrom(dir) instead of turnFrom(dir), I now get api_turtleExt:215: attempt to call boolean regardless of parentheses
Edited on 30 November 2016 - 04:59 AM
Bomb Bloke #352
Posted 30 November 2016 - 06:03 AM
Where line 215 is…?
voidbreath #353
Posted 30 November 2016 - 06:09 AM
Where line 215 is…?

Oh right sorry, 215 is "while attack() do"
Bomb Bloke #354
Posted 30 November 2016 - 06:54 AM
Ah, right, you've added some extra brackets to the function. Try it the way swisszeni had it - just do a straight copy/paste.
voidbreath #355
Posted 30 November 2016 - 07:22 AM
Ah, right, you've added some extra brackets to the function. Try it the way swisszeni had it - just do a straight copy/paste.

Well this is vaguely embarrassing, i suppose it came down to a typo on my part :(/> thanks a bunch for your patience and help with this
Bomb Bloke #356
Posted 30 November 2016 - 08:05 AM
You're not the first to make a mistake, and you won't be the last. :P/>
peanutinky #357
Posted 21 March 2018 - 02:09 PM
is there a way to make it bedrock proof it stops at bedrock and sits there for a minute then it finally moves on. i know that i could cheat and go to creative mode and get bedrock and put it in a ignore block.
i love using this program it works well and with the bug fix that was submitted about api_turtleExt line 208. i still have some problems with grave stopping it from finishing getting it out of the way. thanks again for thew great program. im not a programmer trying to learn from everybody's coding i have read the lua verision 1 on line but this uses lua verision 2 i think.
:D/>
atithaoss #358
Posted 21 March 2018 - 03:33 PM
Hello,
I have a problem with MLG.
In my previous server all were working like a charm now in my new server when i try to make 4 tunnels the turtle stuck without any error in the East side and in the North side.
Have you experience this problem???
atithaoss #359
Posted 21 March 2018 - 05:01 PM
I download my map locally and it is working but not in my server….
do you have any clue why is that?