Request for a turtle mining script?

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Scum

New Member
Jul 29, 2019
80
0
0
So I've been looking into turtles, and I want to make a quarry with them. Here's what I want:

Variable size (I probably won't go higher than 64x64)
Automatic refueling/unloading
Ability to unload into an enderchest (not sure if that has to be built into the script so I just thought I'd make sure)
Doesn't have to be multi turtle, but if it is, great
I must be able to define a list of blocks that it will not mine, so I can make it ignore diamonds, redstone, lapis, etc and let me silktouch them. If it can't do that then I really don't have much of a reason to use turtles instead of BC quarries.

Using Mindcrack v7, so MiscPeripherals items can be used. I hear there are chunkloading turtles and turtles with enderchests built into them, if you can implement them into the program that would be great, but not required.
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
Turtles can't detect what a block is, only compare to a block in their limited inventory space, so "I must be able to define a list of blocks that it will not mine, so I can make it ignore diamonds, redstone, lapis, etc and let me silktouch them" - You'll find this is what will limit your ability to do this efficiently.
 

Skirty_007

New Member
Jul 29, 2019
436
0
1
I have found this GPSExcavate one to be really useful. You also need to install the "goto" program (which I discovered the hard way should be saved as "goto" and not "Goto"). Despite the name (and the sentence in the first post), it doesn't use GPS or other turtles, it's also pretty smart. Uses a LOT less fuel than the standard Excavate program, and can save the position and start again next time (you have to pause it though, if you crash or go out of range you'll have to manually start it again).

ETA: As mentioned, it can't tell what it's about to mine, so can't miss out certain blocks.
 

WeiseGuy

New Member
Jul 29, 2019
19
0
0
You can set it to compare to certain blocks, store them in variables, then run compare against those variables, no?

Example (probably not formatted well, sorry I'm getting back into lua still and turtle api):

turtle.suckup() //chest above with items you don't want to be mined)
Item1 = turtle.compare()
Item2 = turtle.select(2) turtle.compare
turtle.drop() //Place all items back in chest

then when using turtle.dig, check the block against the variables.

if turtle.compare = Item1
if turtle.compare = Item2

etc
 

PhilHibbs

Forum Addict
Trusted User
Jan 15, 2013
3,174
1,128
183
Birmingham, United Kingdom
  • Like
Reactions: WeiseGuy

mikeemoo

New Member
Jul 29, 2019
117
0
0
You can set it to compare to certain blocks, store them in variables, then run compare against those variables, no?

Example (probably not formatted well, sorry I'm getting back into lua still and turtle api):

turtle.suckup() //chest above with items you don't want to be mined)
Item1 = turtle.compare()
Item2 = turtle.select(2) turtle.compare
turtle.drop() //Place all items back in chest

then when using turtle.dig, check the block against the variables.

if turtle.compare = Item1
if turtle.compare = Item2

etc

Nope, you can't do that :)

compare will simply return true or false, it stores no reference at all to an item.
 

WeiseGuy

New Member
Jul 29, 2019
19
0
0
Well that sucks....no way to store the compared item in a variable at all? I find that hard to believe.....hmmmm. We need a itemid function added to the api lol
 

mikeemoo

New Member
Jul 29, 2019
117
0
0
Well that sucks....no way to store the compared item in a variable at all? I find that hard to believe.....hmmmm. We need a itemid function added to the api lol

Nope, turtles are blind and will stay blind. They have no concept of what an item is - all they can do is compare (which returns true/false). They know nothing else.

If you use OpenCCSensors there's an inventory sensor which can get item names within an inventory (or his own inventory), but we've purposely kept them blind to blocks around them for balance. (although we're making a Sonic sensor that can detect air/water/solids)

Unfortunately OpenCCSensors isn't in FTB though. :)
 

NTaylor

New Member
Jul 29, 2019
221
0
0
For detection you could reverse what he wants instead of making it detect the ores he wants instead make it so it detects dirt stone and gravel and only mine them would leave all the ores in place to clear up later.
 

WeiseGuy

New Member
Jul 29, 2019
19
0
0
That would work too and I've seen that done in some other programs to save slot space. Good tip for sure.
 

Larroke

New Member
Jul 29, 2019
301
0
0
There is only a handful of the ores he's want to mine himself.. so place a silk touched ore into slots 12-16 or 8-16 and do a compare loop.. Would take more time, and the turtle would have to empty inventory much more frequently but it would work.
 

NTaylor

New Member
Jul 29, 2019
221
0
0
The thing about this kind of program is in a way what is the point (unless you are on a server with limited space in which case ignore this) running the program like this and then manually mining the ores that are left will definitively take a lot more time than just running the turtle on excavate/a tunnel bore/ a quarry and while in this program you would get more diamonds/quarry you would probably get less than if you just ran a strip mine program over a larger area and allowed the turtles to get the diamonds.
 

WeiseGuy

New Member
Jul 29, 2019
19
0
0
True, I like the application of not getting loads of cobble from the stone (dirt I dont care AS much, but dont need/want). Silk touch diamond to use an enchanted fortune pick would be nice, but probably take longer i agree.
 

PhilHibbs

Forum Addict
Trusted User
Jan 15, 2013
3,174
1,128
183
Birmingham, United Kingdom
I like the idea of turtles having no Block ID functionality other than being able to compare with inventory slots. It makes block-sensitive turtles less efficient as they have to carry around a known example, but I think that's a reasonable trade-off. Also I llike that it's difficult to compare to "exotic" blocks like mob spawners. Limits like this make the challenge more interesting. Turtles should be a bit dumb, it adds to their charm.
 

BluSunrize

New Member
Jul 29, 2019
45
1
0
By use of MiscPeripherals, Turtles should be able to find out what the block infront of them is. If you craft the Thaumic Scanner Turtle (Thaumcraft Glasses) they can see the aspects in the block, which, with a database you'd have to setup beforehand, would allow them to recognize the blocks.

Or atleast get close to the ID of the block, as I'm not sure if there are blocks with the same aspects.
 
  • Like
Reactions: siebharrin

NTaylor

New Member
Jul 29, 2019
221
0
0
By use of MiscPeripherals, Turtles should be able to find out what the block infront of them is. If you craft the Thaumic Scanner Turtle (Thaumcraft Glasses) they can see the aspects in the block, which, with a database you'd have to setup beforehand, would allow them to recognize the blocks.

Or atleast get close to the ID of the block, as I'm not sure if there are blocks with the same aspects.

There are blocks with the same aspects but if this makes sense if something has the same aspects as something you want to pickup later with silk touch then it is also probably something you want to silk touch of fortune.
 

Wizaerd

New Member
Jul 29, 2019
138
0
0
I use OreQuarry: http://www.computercraft.info/forums2/index.php?/topic/7675-advanced-mining-turtle-ore-quarry/

I'm considering programming it to abort and return home if it discovers Mossy Cobblestone, so that I don't accidentally destroy mob spawners. I haven't found a Skeleton spawner yet.

If you love mining turtles, then you have to get one of these: http://www.shapeways.com/shops/computercraft?sort=popularity
I just bought a bunch of them.

I've been using this script for my mining turtle for a while, and like it well enough. It's not perfect, but it is better than the default Excavate script.