Jump to content




Variable Size Quarry (now with Super Ore Quarry™)

turtle

595 replies to this topic

#1 civilwargeeky

  • Members
  • 393 posts

Posted 03 November 2012 - 12:48 PM

So, many moons ago I decided to code a bit and I decided Hey! I should build a quarry. Now, this may sound simple but I was very new to coding and programming in general so it took a very long time. I finally finished my quarry program, and I impressed myself with how reliably it worked. So I decided to share it.

:D; View Level: OVAR 9000!!!
Yay! The thread has broken 200,000 views!!
Thanks to everyone who looked at this program. You are all awesome.

Update 1/20/2021. I am blown away. I leave for a few years and come back to 465,000 views! I don't know who is still looking at this thread, but you are as awesome as ever :D

:Attention: The program now supports "Ore Quarry" functionality. Use "-oreQuarry true" to use it, or type "-help" to find out more
If you are having trouble in new versions of Computercraft:
http://www.computerc...post__p__246955
Basically, there is a line in your CC config to "disable_lua51_features" Set that to false, because I use old environment functions and concepts.


A year ago, this program had a really BIG update. I basically rewrote the whole program from scratch. It is now much more efficient, modular, and is also easier to adjust from a coding standpoint.
As of version 3.5.0, the turtle also has oreQuarry support built in.

Note: If you don't know how to access any of the features: Type "quarry help" where "quarry" is whatever you named the program.

Features:
  • Huge Sized Quarries possible, the only restriction is how much fuel you can stuff in the turtle (and chunk loading)
  • Will always move to the proper position, will even attack mobs that get in the way!
  • Great for digging out rooms underground
  • Great for demolishing houses (use invert)
  • Great for digging holes down to bedrock
  • Deposits blocks into a chest when finished
  • Checks often to see if inventory is full
  • If inventory full, will go to a home chest to deposit blocks, then go right back where it was and continue mining
  • Ender Chest enabled! Feel free to use them
  • Session Persistence! Quarries will live through crashes and SSP
  • Ore Quarry capable! Check the help section for instructions
  • Turtle can mine down a certain number of blocks before starting. Good for getting to diamonds quickly.
  • If it runs into bedrock, it will come back to start and tell you where bedrock was found.
  • Automatically checks if you have fuel disabled
  • Keeps a (somewhat) detailed record of what it mines
  • Will log mining runs for posterity when done (If you want)
  • While running, displays percent to completion and total blocks mined.
  • Very modular, many different things can be changed by config and arguments
  • Now can be fully automated from parent programs. Everything can be set from arguments
  • Intelligently tells you settings you have changed
  • Now has a companion program to place ladders all the way to the bottom.
  • Now has a companion rednet program to give status updates when running. See below for current version
  • Will intelligently request fuel before mining, so it won't run out half way through.
  • Refuels quickly! You will fueled up and ready to go in no time!
  • Supports GPS networks. Is able to accurately get its position every time (If wanted)
Coming Soon:
  • Shell to control turtle
  • Maybe start quarries through rednet
Drawbacks:
  • None right now :)
Help Section: (just in case you want it here as well)
Spoiler
Use:
Now that everything is configurable by argument, there is more to the use section that you should know.
Spoiler
How to make Parameter Files:
When the shell is done, there will be a cool gui to load and make your own config files :)/>[/spoiler]

Download:
Version 3.6.4 (this goes on the turtle):
http://pastebin.com/rpXRAZs4
Version 3.6.5 Rednet Companion Program (this goes on computer, compatible with 3.5.2 - current):
https://pastebin.com/7Ksx4qUJ
Version 1.0.3 Rednet Repeater Program (goes on computer, compatible with 3.5.4 - current)
http://pastebin.com/Te359WA2
Ladder Placing:
http://pastebin.com/GbWZhXCC

Version Made by Renari compatible with the "Miny Chunky Module" peripheral. (Version 3.5.5)
http://pastebin.com/4y9W8i9i

Showcase Video by utybo. Goes over basics, rednet, oreQuarry, and enderChests (Version 3.6.3)

Full Demonstration Video for (almost) all features of the program (Version 3.0.7)

Demonstration video of the newer Rednet Program (Version 3.5.4)

How to oreQuarry (Version 3.5.5):

Demonstration of using Quadracopters (Version 3.6.1)


Pictures of the new Rednet Program
http://imgur.com/a/AgPR5

My Github: https://github.com/c...ogs/tree/LuaDev
This is where all the new and in-development features of my programs will be. Not all programs are guaranteed to actually run at the time you download them.

Old Versions

Edited by civilwargeeky, 21 January 2021 - 12:27 AM.


#2 ChunLing

  • Members
  • 2,027 posts

Posted 03 November 2012 - 03:43 PM

Why not dig three blocks per move, that's pretty standard and speeds things up a good bit.

#3 civilwargeeky

  • Members
  • 393 posts

Posted 04 November 2012 - 02:54 PM

Updated to 2.1.5
ChunLing I took your advice (somewhat), and it now mines two at time when height is even, otherwise 1 at a time.

#4 tpmrpg

  • New Members
  • 1 posts

Posted 09 December 2012 - 07:44 AM

Fueling partition doesn't work, I just noted it all, and then it was fine! Brilliant program BTW

#5 Koncrete

  • Members
  • 9 posts

Posted 10 December 2012 - 06:02 AM

This is excellent, if I am on a serve though I am probably going to have to enter that line by line hunh....

#6 Modernkennnern

  • New Members
  • 8 posts

Posted 11 December 2012 - 05:42 AM

View PostKoncrete, on 10 December 2012 - 06:02 AM, said:

This is excellent, if I am on a serve though I am probably going to have to enter that line by line hunh....

Pastebin get u3CTvenK Quarry :=)

#7 Blackbeared

  • Members
  • 4 posts

Posted 03 January 2013 - 03:10 AM

How to get this to work properly, it keeps saying it needs more fuel and I've already put a stack of coal in there and it used it all.

#8 20Brogan

  • New Members
  • 4 posts

Posted 04 January 2013 - 06:31 AM

View PostBlackbeared, on 03 January 2013 - 03:10 AM, said:

How to get this to work properly, it keeps saying it needs more fuel and I've already put a stack of coal in there and it used it all.
You made the quarry so big it needs that much fuel to go.

#9 crazygoattoe

  • New Members
  • 7 posts

Posted 06 January 2013 - 06:18 PM

I tried this out and I got an error on line 167 saying "attempt to compare nil with number"

Any idea why? (I don't know much about programming)

#10 civilwargeeky

  • Members
  • 393 posts

Posted 07 January 2013 - 09:06 AM

View Posttpmrpg, on 09 December 2012 - 07:44 AM, said:

Fueling partition doesn't work, I just noted it all, and then it was fine! Brilliant program BTW
Thanks! The fueling portion does work (unless you're playing 1.2.5), however it is somewhat odd. There is a small quirk, but I think I'll change it now that I know better.

View PostBlackbeared, on 03 January 2013 - 03:10 AM, said:

How to get this to work properly, it keeps saying it needs more fuel and I've already put a stack of coal in there and it used it all.
Yeah, unless your quarry is really big (20x20x20 or something), then it shouldn't use that much fuel. Also make sure to do
label set somename 
to stop the turtle from losing fuel when you pick it up.

View Postcrazygoattoe, on 06 January 2013 - 06:18 PM, said:

I tried this out and I got an error on line 167 saying "attempt to compare nil with number"

Any idea why? (I don't know much about programming)
That is a line a line that checks the config to make sure you don't screw up its auto-empty feature. If it dosent work, type

edit quarry

then
maxslots=13

Hope that helps :)

#11 Blackbeared

  • Members
  • 4 posts

Posted 08 January 2013 - 05:18 AM

Oké I have another question. I removed the fuel part (also make it so fuel isn't needed, I'm lazy like that :P). But for some reason the program randomly stops and it gives no error. When I start I give in length: 15, width: 15 and height: 120 is this like a build in stopping system that I am missing, it mines for a while when I start it again but just randomly stops and I have no idea what's causing it.

Any ideas?

#12 civilwargeeky

  • Members
  • 393 posts

Posted 08 January 2013 - 02:26 PM

View PostBlackbeared, on 08 January 2013 - 05:18 AM, said:

Oké I have another question. I removed the fuel part (also make it so fuel isn't needed, I'm lazy like that :P). But for some reason the program randomly stops and it gives no error. When I start I give in length: 15, width: 15 and height: 120 is this like a build in stopping system that I am missing, it mines for a while when I start it again but just randomly stops and I have no idea what's causing it.

Any ideas?

Ok. I haven't ever tried putting the height more than 60 so I would have no experience with that bug (although it should still work). I don't know. Maybe it ran out of fuel (but you said you turned that off...), otherwise it should continue to work. The way it works is through three different loops, and those dimensions would call its dig function 13,500 times separate times. I don't think that would cause it, so I don't know what could have happened. I will post a new version tomorrow with some more of these bug fixes and features (and include a config section for disabling fuel check :) ).

#13 MrHohenheim

  • Members
  • 26 posts
  • LocationDebrecen

Posted 09 January 2013 - 10:16 AM

Yup i like that quarry :) but i need inverted quarry for forest clearing.. hard work to reconfig for me?:)

#14 civilwargeeky

  • Members
  • 393 posts

Posted 09 January 2013 - 12:21 PM

View PostMrHohenheim, on 09 January 2013 - 10:16 AM, said:

Yup i like that quarry :) but i need inverted quarry for forest clearing.. hard work to reconfig for me? :)

Sure! I could do that pretty quickly. I'll post it here when done.

#15 civilwargeeky

  • Members
  • 393 posts

Posted 09 January 2013 - 02:46 PM

Ok, version 2.2.6 is up.
Changes: Better Counting System, Fixed some bugs, smarter fueling system, now you can add an argument to say which side the chest is on (e.g. top, right, left, bottom)
Oh, I also put in some manual-edit config at the top for people who use softcore or do not like the space restrictions and autoempty

Any other suggestions?

#16 MustardFTW

  • New Members
  • 1 posts

Posted 09 January 2013 - 07:19 PM

Hey I have a problem, when I type in quarry or quarry [direction] I get this "bios:338: [string "quarry"]:278: unexpected symbol".

#17 MrHohenheim

  • Members
  • 26 posts
  • LocationDebrecen

Posted 09 January 2013 - 08:43 PM

yeah something wrong line 278 = neededFuel = math.ceil((volume + xyz)/2 + subHeight))

#18 MrHohenheim

  • Members
  • 26 posts
  • LocationDebrecen

Posted 09 January 2013 - 11:42 PM

here the working fixed code :) pastebin get uGBP137c quarry

#19 civilwargeeky

  • Members
  • 393 posts

Posted 10 January 2013 - 02:21 AM

There's a hotfix. Should work (didnt test yet)
You see while simplifying my equation, I forgot that xyz isn't x*y*z, its an undefined variable...
That's what I get for posting it without testing.

#20 MrHohenheim

  • Members
  • 26 posts
  • LocationDebrecen

Posted 10 January 2013 - 02:56 AM

and + " ( "
:) no problem i fixed this





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users