Jump to content




Variable Size Quarry (now with Super Ore Quarry™)

turtle

593 replies to this topic

#581 civilwargeeky

  • Members
  • 392 posts

Posted 06 April 2016 - 02:03 AM

View Postelektronemulo, on 19 March 2016 - 02:55 PM, said:

-snip-

Hi! Sorry but that is not a bug. The way that inverted works is literally by switching the move up and move down commands. If you want, you could poke around the code and make some changes.
At line 2210 of the most recent release is where the program adds all the downs for startDown. You could probably do some sort of logic there, but I don't have the time to add something into a release.

View PostSyberSmoke, on 05 April 2016 - 07:38 PM, said:

-snip-
@Civilwargeeky Thank you for the excellent programs. I do have a question though. Is there a parameter to define a refuel chest, but one that is placed by the dump chest instead of an ender chest? I am in FTB Infinity Evolved also, but playing in expert and well ender chests are WAY pricy. So a wood chest stuffed with charcoal would be excellent for this situation as I kind of need the coal to make steel.

I could have sworn I added this feature so I looked back through and I sort of did. Same for above, I don't have time to code it myself, but if you want to look into it, look for functions "emergencyRefuel" at 1448 and this section at 1758
if not outOfPath and (checkFuel() <= xPos + zPos + yPos + 5) then --If the turtle can just barely get back to the start, we need to get it there. We don't want this to activate coming back though...
    local continueEvac = false --It will be set true unless at start
    if xPos ~= 0 then
	  continueEvac = emergencyRefuel() --This is a huge list of things to do in an emergency
    end
    if continueEvac then
	  eventClear() --Clear any annoying events for evac
	  local currPos = yPos
	  endingProcedure() --End the program
	  print("Turtle ran low on fuel so was brought back to start for you :)/>\n\nTo resume where you left off, use '-startDown "..tostring(currPos-1).."' when you start")
	  error("",0)
    end
  end
and functions "drop" and "dropOff" at 2017 and 2080 respectively. If you also look at how to add a parameter around 630, you should be well on your way to making something that can do what you intend :)

#582 SyberSmoke

  • Members
  • 98 posts

Posted 06 April 2016 - 07:35 AM

View Postcivilwargeeky, on 06 April 2016 - 02:03 AM, said:

View Postelektronemulo, on 19 March 2016 - 02:55 PM, said:

-snip-

Hi! Sorry but that is not a bug. The way that inverted works is literally by switching the move up and move down commands. If you want, you could poke around the code and make some changes.
At line 2210 of the most recent release is where the program adds all the downs for startDown. You could probably do some sort of logic there, but I don't have the time to add something into a release.

View PostSyberSmoke, on 05 April 2016 - 07:38 PM, said:

-snip-
@Civilwargeeky Thank you for the excellent programs. I do have a question though. Is there a parameter to define a refuel chest, but one that is placed by the dump chest instead of an ender chest? I am in FTB Infinity Evolved also, but playing in expert and well ender chests are WAY pricy. So a wood chest stuffed with charcoal would be excellent for this situation as I kind of need the coal to make steel.

I could have sworn I added this feature so I looked back through and I sort of did. Same for above, I don't have time to code it myself, but if you want to look into it, look for functions "emergencyRefuel" at 1448 and this section at 1758
if not outOfPath and (checkFuel() <= xPos + zPos + yPos + 5) then --If the turtle can just barely get back to the start, we need to get it there. We don't want this to activate coming back though...
	local continueEvac = false --It will be set true unless at start
	if xPos ~= 0 then
	  continueEvac = emergencyRefuel() --This is a huge list of things to do in an emergency
	end
	if continueEvac then
	  eventClear() --Clear any annoying events for evac
	  local currPos = yPos
	  endingProcedure() --End the program
	  print("Turtle ran low on fuel so was brought back to start for you :)/>/>\n\nTo resume where you left off, use '-startDown "..tostring(currPos-1).."' when you start")
	  error("",0)
	end
  end
and functions "drop" and "dropOff" at 2017 and 2080 respectively. If you also look at how to add a parameter around 630, you should be well on your way to making something that can do what you intend :)

I wish I could...sadly my brain is pretty pictures and not code. I have honestly tried several times to learn...classes and al...just did not stick. May be someone else though...please?? Pretty please??? And the Cherry?

#583 civilwargeeky

  • Members
  • 392 posts

Posted 08 April 2016 - 05:29 AM

View PostSyberSmoke, on 06 April 2016 - 07:35 AM, said:

-snip-

Well you know what, since you asked so nicely, I decided to take like an hour and a half and code something up. It's a touch hacky, but it should work alright. Let me know how it goes! (very slightly tested)

http://pastebin.com/NFYUgsLJ

Recommended usage:
quarry -basicFuelChest [side the fuel chest will be on] -doCheckFuel false -maxFuel [maximum fuel to fuel it to]
The doCheckFuel false is so it doesn't ask for large amounts of fuel at the start.

Happy Trails!

Edited by civilwargeeky, 08 April 2016 - 05:30 AM.


#584 SyberSmoke

  • Members
  • 98 posts

Posted 25 April 2016 - 05:02 PM

Thank you, I will give it a try. Was taking a break from playing. Hurm, lets see how this goes. hehe

#585 ABLukas

  • Members
  • 3 posts

Posted 22 May 2016 - 02:03 AM

so i set up a quary to remove a bunch of obsidian a previous owner left on his plot but when i set it to run i get found bedrock at these coridinates

#586 civilwargeeky

  • Members
  • 392 posts

Posted 23 May 2016 - 12:45 AM

View PostABLukas, on 22 May 2016 - 02:03 AM, said:

so i set up a quary to remove a bunch of obsidian a previous owner left on his plot but when i set it to run i get found bedrock at these coridinates
Uhh... Is there more context? If its says it found bedrock, it probably tried mining bedrock (or some other material it can't break). Make sure it is set to mine the exact dimensions of the unwanted obsidian so it doesn't go and try mining nearby bedrock or something.

If these steps did not get you want you want, I will need more information.

#587 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 May 2016 - 03:18 AM

If a turtle is telling you it can't mine something it should, and the server uses some sort of system for defining "plots" (presumably barring anyone but their owner from mining there), then that'd suggest you should asking the server owner, yeah?

#588 Vex

  • Members
  • 6 posts

Posted 23 May 2016 - 06:24 AM

Quarry programs are always useful, thanks for releasing it!

#589 FunkDooBiesT

  • Members
  • 5 posts

Posted 17 October 2016 - 12:54 PM

Howdy again, I'd simply like to point out that I'm missing the -plugHoles parameter big time.

I'm going to attemp to hack it into the new version you have updated.

Thanks!

#590 civilwargeeky

  • Members
  • 392 posts

Posted 18 October 2016 - 05:59 PM

View PostFunkDooBiesT, on 17 October 2016 - 12:54 PM, said:

Howdy again, I'd simply like to point out that I'm missing the -plugHoles parameter big time.

I'm going to attemp to hack it into the new version you have updated.

Thanks!
By "-plugHoles parameter", do you mean it should cover up a quarry hole it made? That was never a part of this program. If you want I could also try to hack it in and post it here, but the program really wasn't designed with placing blocks in mind. I suppose it could conditionally work on an oreQuarry after the last run was done... Maybe it could check if it has enough "filler" blocks to cover the top section, and then do it if it has enough, otherwise don't bother.

That's what you meant, right?

#591 FunkDooBiesT

  • Members
  • 5 posts

Posted 19 October 2016 - 10:51 AM

Lol nope, You actually made a new branch for your program that had a feature I requested in it. This version of the program that had the feature got rather outdated as time went on.

So then I went to your Github and grabbed the newest version I could find and compared if to the one you made me. I found everything I could relating to plugHoles and just put it into the new program.

Here is a link to the post with the description of the feature request.
1st issue:
So ATM the hacked program is plugging the holes it finds but with whatever it can find in the inventory.

I need a way for the turtle to check and use only cobble or dirt or maybe modded items like granite or marble, not gravel as gravel placed above it will just fall down.

i think you refer to these blocks as fillers in the program somewhere.

2nd issue:
When the turtle drops off the items, I need it to keep at most one stack or half a stack of cobble, dirt whatever. This will give it a buffer to plug hole with until it can mine more.

I have a pastebin of the hacked version that I used to get the program onto the turtle if you want to see what I did.

Anyway glad to see your still around man and I hope you can help me out!

#592 civilwargeeky

  • Members
  • 392 posts

Posted 20 October 2016 - 04:13 AM

View PostFunkDooBiesT, on 19 October 2016 - 10:51 AM, said:

-snip-

Wow! Its been a long time since I've coded lua :P
I stopped adding computercraft to my mod packs awhile ago, and haven't been playing minecraft significantly in a long time, but I still remembered most important things about my code! (and then disregarded some systems anyway :P)

So I took the "hacked" version that you showed me, and I added in some logic to make it better. So first, whenever it plugs the holes, instead of doing a complicated inventory checking thing with types and slots and assumptions and things, it just checks directly against the blacklist and uses unwanted blocks. It should also be very efficient, as it only looks for a new slot when it runs out of blocks in that slot. The only way it could fail is if there is ore directly in front of it and it uses its last piece of filler :\ . NOTE: This requires that you are using at least Computercraft 1.64 and will not work with older versions. If that's a problem for you, let me know.
The second thing I did is go into the drop function. When it is dropping off things, it tries to keep 32 filler material in its inventory for filling purposes (this applies to every time it drops stuff off, including mid-run without going to a chest, just fyi) (also this only applies if plug holes is on).

To stop it from dropping gravel, or add mod blocks to its blacklist, go to line 919 and take out gravel, add mod blocks, etc. To find out what the name of the mod block you want to add is, there are a few ways I know. First, there is a setting in NEI you can turn on. Second, if you have bspkrs core, there is an output file in your config file that has a list of all blocks installed. Third, if you have bibliocraft, there is a debug book you can give yourself that tells you the name of item stacks you put in it. Just add them to the blacklist in a way similar to the other ones

If you want to change the amount of filler material it tries to keep in its inventory, go to line 2237 and change the number there. It will keep it in multiple slots if necessary.

Anyway, now that I have talked you to death, here's the program: http://pastebin.com/wS5dv0Ax
Tested it on my machine. Can't guarantee it will always work. Hope it is an improvement. Thank you so much for sticking with my program for so long. It makes me happy to know all of my effort is still appreciated :D

#593 FunkDooBiesT

  • Members
  • 5 posts

Posted 22 October 2016 - 01:53 PM

Hey there,

I do get some very weird behavior when I try to use the parameter -dumpCompareItems f, I was forced to change it in the variable table. After that the turtle was great with 32 items in slot 1 mainly cobble that it mined.

I then gave it a enderchest in slot 15 and sent it off this was last night and the server is down for maintenance so can't tell you how that worked out.

Thanks for the update on the program man, I really do appreciate!

#594 civilwargeeky

  • Members
  • 392 posts

Posted 22 October 2016 - 05:03 PM

View PostFunkDooBiesT, on 22 October 2016 - 01:53 PM, said:

-snip-

Went back and checked, turns out that I was specifically checking for "oldOreQuarry" for whether or not to accept the dumpCompareItems switch. I just removed that restriction, so it should work fine now :)
Please redownload





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users