Jump to content




Variable Size Quarry (now with Super Ore Quarry™)

turtle

595 replies to this topic

#481 KaidoX

  • New Members
  • 2 posts

Posted 06 April 2015 - 08:07 PM

Hey, I'm still fairly a noob with the turtles but love this program. I was trying to set a few of my own parameters using the -forcePrompt [parameter] and couldn't quite get it to ask for those parameters when starting up the program. The main ones I'm interested in are:
  • -oreQuarry
  • -startDown
  • -restore or autoRestore
  • -doRefuel
  • -lava/lavaBucket/lavaRefuel [slot]
I know how to do each one individually, just trying to figure out how to get the program to ask these every time in a prompt like it does with the dims.

#482 civilwargeeky

  • Members
  • 393 posts

Posted 07 April 2015 - 03:24 AM

View PostKaidoX, on 06 April 2015 - 08:07 PM, said:

-snip-
Unfortunately the current version does not allow you to change the program config to load a file, so you have two options that I can think of.

Option 1 (Preferable)
Open a file (better with a short name)
edit a
Now, just type each parameter you want to add on a new line, so for you it would be like this

Quote

forcePrompt oreQuarry
forcePrompt startDown
forcePrompt autoResume
forcePrompt doRefuel
forcePrompt lava
Then save the file

Now, when you run quarry just do this:
quarry -file a

Option 2 (Not preferable and kind of annoying to do)
Go down to the parameter definitions (starting at line 625), and change the 4th parameter of the items you want to force prompt to "true". For example,
addParam("oreQuarry", "Ore Quarry", "boolean" )
would become
addParam("oreQuarry", "Ore Quarry", "boolean", true )
Likewise,
addParam("lavaBucket","Lava Bucket Slot", "slot 14", nil, oreQuarry)
would become
addParam("lavaBucket","Lava Bucket Slot", "slot 14", true, oreQuarry)

Then you would save the file and run it normally


Hope I helped :)
Thanks for your interest in the program :D

Edited by civilwargeeky, 07 April 2015 - 03:24 AM.


#483 KaidoX

  • New Members
  • 2 posts

Posted 07 April 2015 - 03:31 AM

Thanks, that helped a lot. Option 1 is definitely best.

#484 keystyles

  • Members
  • 3 posts

Posted 12 April 2015 - 03:38 PM

this is an awesome program! I have a question though... is it possible for the program to treat spawners like bedrock and give you their location and stop mining?

#485 civilwargeeky

  • Members
  • 393 posts

Posted 13 April 2015 - 01:16 PM

View Postkeystyles, on 12 April 2015 - 03:38 PM, said:

this is an awesome program! I have a question though... is it possible for the program to treat spawners like bedrock and give you their location and stop mining?
Not with how the current program is set up, but you can do this yourself!

Step 1:
Place a spawner in some world, place turtle in front of it. Type "lua" then type
turtle.inspect()
Write down whatever it says for "name"

Step 2:
Open up the code for the quarry somewhere. Go to line 1701 (If doing this on turtle I recommend one of the advanced editing programs). Type in something like the following:
if check and data.name == "the thing you wrote down" then
  bedrock()
end 
Then, go to line 1570 and type
if data.name == "the thing you wrote down" then
  bedrock()
end

Step 3:
Now run the program with
-oreQuarry true -frontChest true


Hope this does what you want! :D

#486 Kotawolf

  • Members
  • 26 posts

Posted 14 April 2015 - 02:25 AM

Hello again.

I've been playing around again and I've found something they may not be resolvable.

Not sure when this started, but with the recent update, the turtle will dump the trash blocks without having to come back up. But if it is say down below 20, and it dumps, say for instance it had 20 red stone in slot 10. But when it dumps, it dumps cobble from slots 3, 5, 12. The next block is red stone, that will go into slot 3 instead of stacking.

Don't know if it is possible, but is there a way to tell the turtle to try and stack these more logically, instead of having two or three or four partial stacks of things?

#487 civilwargeeky

  • Members
  • 393 posts

Posted 14 April 2015 - 02:41 AM

View PostKotawolf, on 14 April 2015 - 02:25 AM, said:

Hello again.

I've been playing around again and I've found something they may not be resolvable.

Not sure when this started, but with the recent update, the turtle will dump the trash blocks without having to come back up. But if it is say down below 20, and it dumps, say for instance it had 20 red stone in slot 10. But when it dumps, it dumps cobble from slots 3, 5, 12. The next block is red stone, that will go into slot 3 instead of stacking.

Don't know if it is possible, but is there a way to tell the turtle to try and stack these more logically, instead of having two or three or four partial stacks of things?
Hmm. Yeah.No way for it to do that right now, but I could definitely write a "compress" function so the stacking is a bit more intelligent. Added to the todo! (Don't when I can get to it though :( )

Thanks for the awesome suggestion!

Actually, since I figured why not, I just added that small change to my progress on 3.6.5
Here you go: http://pastebin.com/Z2J4uW5Y
Completely untested, but should theoretically work properly. Hope you enjoy :)

Edited by civilwargeeky, 14 April 2015 - 03:00 AM.


#488 mugsy888

  • Members
  • 10 posts

Posted 28 April 2015 - 12:26 PM

ok. I'm a dumbass.

can somebody explain why my blacklist isn't working. the damn thing just keeps picking up everything and i have no handling equipment for the just blocks yet.

minecraft:stone
minecraft:dirt
minecraft:gravel
minecraft:sand

I have the obvious ones and this doesnt even work edit: ok i got this working. apparently it didnt want the lines spaced in the txt file.
i would also like to add the other rubbish like granite andesite marble

edit:
it does not appear to like having spaces in the names?
chisel 2:diorite
chisel 2:granite
chisel 2:andesite
chisel 2:marble
thaumcraft:fire infused stone
thaumcraft:water infused stone
thaumcraft:earth infused stone
thaumcraft:air infused stone
thaumcraft:order infused stone
thaumcraft:entropy infused stone
thaumcraft:cinnabar ore
thaimcraft:amber bearing stone

definitely need to get the blacklist working, i have received 25 stacks of garbage chisel 2 blocks in a single chunk.
i have destroyed so much coal trying to get this to work i am just about ready to get a different script :( which is a pity because its just what i wanted.

Edited by mugsy888, 28 April 2015 - 02:14 PM.


#489 PiggyWhiskey

  • New Members
  • 2 posts

Posted 28 April 2015 - 02:07 PM

View Postmugsy888, on 28 April 2015 - 12:26 PM, said:

<snip>
it does not appear to like having spaces in the names?
chisel 2:diorite
chisel 2:granite
chisel 2:andesite
chisel 2:marble
thaumcraft:fire infused stone
thaumcraft:water infused stone
thaumcraft:earth infused stone
thaumcraft:air infused stone
thaumcraft:order infused stone
thaumcraft:entropy infused stone
thaumcraft:cinnabar ore
thaimcraft:amber bearing stone


i have destroyed so much coal trying to get this to work i am just about ready to get a different script :( which is a pity because its just what i wanted.

Thats because the names don't have spaces. The Localised names do (The names that are translated between languages set in your MC Client)

Use F3+H to see items in NEI with the name of the block.
Usually its in camelCase (starting with lowercase and every word after it is a capital letter)
Also, some blocks are common items with different meta data

Thaumcraft:blockCustomOre with meta data of 1 = Air Infused Stone
2 = Fire Infused
3 = Water Infused
4 = Earth Infused
5 = Order Infused
6 = Entropy Infused

I don't have Chisel on my modpack to check the exact names for you. Use F3+H to see them.

#490 mugsy888

  • Members
  • 10 posts

Posted 28 April 2015 - 11:12 PM

Thanks for that!

If I'm only mining one chunk at a time (16x16x62~)
what would be a good guess at setting a max fuel so I actually get some coal back or should I set it relatively low and provide a fuel chest?

Edited by mugsy888, 29 April 2015 - 06:18 AM.


#491 Kotawolf

  • Members
  • 26 posts

Posted 29 April 2015 - 02:34 AM

View Postcivilwargeeky, on 13 March 2015 - 06:40 PM, said:

Quarry 3.6.4 (The Lava and Chests and Things Update)
Downloads:
Quarry: http://pastebin.com/rpXRAZs4
Receiver: http://pastebin.com/6smzHGJY
-snip-
Okay, I've came across this error a couple times now with this version of the receiver.
Posted Image
The turtle and receiver were running in a Mining world. And I'd come back to check on the receiver to find it this way.
https://www.dropbox..../turtle-rec.png

Edited by Kotawolf, 29 April 2015 - 02:36 AM.


#492 civilwargeeky

  • Members
  • 393 posts

Posted 29 April 2015 - 02:44 AM

View PostKotawolf, on 29 April 2015 - 02:34 AM, said:

View Postcivilwargeeky, on 13 March 2015 - 06:40 PM, said:

Quarry 3.6.4 (The Lava and Chests and Things Update)
Downloads:
Quarry: http://pastebin.com/rpXRAZs4
Receiver: http://pastebin.com/6smzHGJY
-snip-
Okay, I've came across this error a couple times now with this version of the receiver.
The turtle and receiver were running in a Mining world. And I'd come back to check on the receiver to find it this way.
https://www.dropbox..../turtle-rec.png
Uhhhh Hmmm.
Well, Java errors are usually not my fault, as they are from the underlying code of computercraft, but if you could give me some steps to reliably reproduce the bug I could hopefully fix it :)

Edit: Also, does this only happen for only this version of receiver or for other ones too?

Edited by civilwargeeky, 29 April 2015 - 02:46 AM.


#493 civilwargeeky

  • Members
  • 393 posts

Posted 29 April 2015 - 02:53 AM

View Postmugsy888, on 28 April 2015 - 12:26 PM, said:

-snip-

Ok. So first off, no it does not like spaces in the names, because as far as I know, you can't have spaces in the names.
To find the block that you want to add to the blacklist, place the block in front of a turtle, type "lua" then "turtle.inspect()" the thing under "name = " is the name you want to add to the blacklist file.
Alternatively, if you have bspkrsCore installed, there should be a file in your config folder called "UniqueNames.txt"
For example, here is mine:
Spoiler
This includes both items and blocks, though, so it could take a while to find the block you're looking for :)

Hope I helped you in your quest.

P.S. It also shouldn't have any problems with spaces at the start of lines. The regex it uses is this:
[%w_.]+:[%w_.]+
Which just captures groups of alphanumeric characters separated by a colon.

Edit: Also, because you asked about the fuel, as long as you're consistently mining coal, you should be fine to keep -maxFuel at a fairly low number and turn -doRefuel on :)

Edited by civilwargeeky, 29 April 2015 - 02:56 AM.


#494 mugsy888

  • Members
  • 10 posts

Posted 30 April 2015 - 06:00 AM

hey thanks, that was a quick reply.

I am still having issues though with my blacklist. I used the inspect command and that's great now that I know how to get the names.

the inspect command gives me chisel:marble with meta data zero, does this mean I am supposed to use chisel:marble or chisel:marble0 ? neither work for me in any case... it still picks up everything with either or both in the blacklist.txt.

once i get all this working, how do I load it to other turtles? I have already used -startupname or something like in my quarry parameters that but cant work out how to load it again.

and how do I give the turtle a name that I can re-use?

The turtles I have been using end up filling up their inventory with coal.. how do i get them to refuel with what they find but dump the excess in the chest so it doesn't have to come back as often.

cheers,
mugsy

#495 civilwargeeky

  • Members
  • 393 posts

Posted 30 April 2015 - 06:09 AM

View Postmugsy888, on 30 April 2015 - 06:00 AM, said:

-snip-
Okay... that's odd then.
First you should use "chisel:marble" as I don't accept or check for the metadata right now.
For sharing the blacklist file, you will have to figure it out using disk drives or physically moving files on your computer :P You can place a disk drive in front of the turtle and put a floppy in, then copy the files to a disk and then to another turtle.
Or, you could use "pastebin put theFileYouHave" and then do "pastebin get theCodeYouGot fileName" on another turtle

To give turtles names so you can reuse them, do "label set NameNoSpaces"

So, to make sure that you are getting everything you want, use the turtle with the following parameters:
quarry -doRefuel true -maxFuel [some number like 2000 maybe] -oreQuarry true -blacklist [fileName] -dumpCompareItems true [any other parameters after this]

Edit: For an explanation, doRefuel makes it try to refuel itself whenever it drops stuff off. It will refuel itself up to "maxFuel" and then dump the rest in the chest. oreQuarry makes the turtle only mine the stuff in the blacklist. blacklist loads a custom blacklist. dumpCompareItems should already be true by default, but saying true makes the turtle dump compare items instead of putting them in the chest.
For more parameters, do "quarry -help"

Also, if you want to use these same parameters multiple times or for multiple turtles, you can make a parameter file and load it as well. So, say you do "edit aFile" in the file, just type out all the parameters you want
doRefuel true
maxFuel 2000
oreQuarry true
blacklist someFileName
dumpCompareItems true
Save it, then run
quarry -file aFile
Much shorter :)

P.S. If you are still having problems, you're going to need to provide me with more information like modpack, minecraft version, CC version. If you could provide a video showing your files and what is going wrong, that'd be great. If you use the receiver as well, use advanced monitors and you can hit buttons to make the turtle drop stuff off at the chest when you tell it to (this speeds up the checking for blacklist working) (also you could do "COMMAND [screen side] DROP" on the receiver program)

Edit 2: It may also be helpful to watch this video I made :)
https://www.youtube....C1REYbBADk#t=83

Edited by civilwargeeky, 30 April 2015 - 06:20 AM.


#496 mugsy888

  • Members
  • 10 posts

Posted 02 May 2015 - 11:45 AM

hi civilwargeeky! thanks again for the prompt replies.
the strangest thing happened today with your script.

I had continued to have trouble with the blacklist and one of my friends was having serious lag issues on my server. in an attempt to solve some of the lag problems i switched from windows7 to linux on my server box which always works wonders, all of a sudden the blacklist works without changing a thing!?! I switch back to windows to test and it doesn't read the blacklist again. anyway that works now oddly enough.

I have noticed 2 things;
1. my turtles never put coal in the chest. my last one came back with 12 stacks of coal and it took ages to finish because the inventory would be full all the time.
i have -dorefuel t -maxFuel 10000 and the turtles are pretty much always full of fuel but not once have i received coal in the chest at the top.

2. twice now when the server has been vacant for a bit (about an hour) a turtle seems to just disappear even though i have 2 spot loaders per quarry (one for the mined chunk and one for the previous chunk with the receiver). i cant find it anywhere, the return command doesn't work and the receiver just sits there with no errors still showing everything its supposed to. the second time I whipped out a pocket computer just as an experiment and bound it as a second receiver, the turtle re-appears and keeps digging though it is not in the same location as it stopped and i need to go hunting for it. it is not difficult to find as you can clearly see where it has kept digging straight after is reaches the edge of the chunk i am mining as if it has reset from the chest at wherever it re-appeared.

I managed to replicate the problem a third time with a bit of trial and error but not again since.
  • only happened when i had 2 quarries going side by side.
  • all three times it was the second one placed.
  • the receivers functioned like normal, just the second one stalled with no errors.
  • the second and third time i got the turtle back by binding a pocket pc (the first one is gone because i re-used the rednet channel).
  • i am using the latest direwolf20 in a world only a few days old and no other computercraft or rednet objects are present in the server.
  • linux dedicated server


#497 civilwargeeky

  • Members
  • 393 posts

Posted 02 May 2015 - 04:35 PM

View Postmugsy888, on 02 May 2015 - 11:45 AM, said:

-snip-
Hello again. First, thanks for the very thorough bug report. I'm glad that you were able to give me some reproduction steps :)
Unfortunately, though, I won't have the time to properly find and squash the bug before the end of next week, as this is finals week for me :P

That is really strange that the blacklist works fine on linux os, but not windows. Especially since I run servers on windows 7 and 8 and it works fine :P
One theory for the receiver becoming unresponsive is that the turtle somehow got lost and went out of range of the computer modem. By default, the modems have a ridiculously short range (I don't know about in DW20 pack). When it goes out of range, the receiver will continue to just sit there forever because it receives no messages and thinks the turtle is just doing something that takes awhile. Also, if you don't set the receiver as startup, when it is unloaded it will display the last screen it had open, but the program won't be running. Just make sure it is :)

I did, however, look at the drop code (which I should have done earlier but didn't), and I discovered it indeed does not ever drop off fuel if doRefuel is on. So I wrote in a line that makes it drop off fuel if it is already fully fueled. This also has a change from last page that compresses inventory items when it drops off excess compare items, so this should work well for you :) http://pastebin.com/i7Hk0t7k
Edit: I didn't just add this to the main release because its experimental, so if you could give some feedback, that would be nice.

I'm sorry I couldn't get to testing your stalling bug, I promise I will look into it next week :)

Edited by civilwargeeky, 02 May 2015 - 04:36 PM.


#498 mugsy888

  • Members
  • 10 posts

Posted 03 May 2015 - 10:53 PM

Hi again,

Yes its good you didn't add it to the main release :) The first time it stops for full inventory it throws an error and cancels the script... next time! :D Thanks a lot for the quick try though.


I have not managed to replicate my disappearing turtle a fourth time yet but I will keep trying haha.


edit: I will admit though that in experimenting with the pocket pc to get my turtles back i have realised how totally awsome they are. i am nervous to do what i am thinking incase i stumble on some bugs... but i suppse thats what this thread is for!!!!

so what im going to start doing is binding an advanced computer as the receiver locally at the quarry like normal. i am going to bind my advanced pocket computer to whichever quarry i want to keep an eye on... i am expecting to have problems with that quarry when i disconnect (unload the pocket pc). but we will see how it goes when i fiddle with it tomorrow.

Edited by mugsy888, 04 May 2015 - 01:59 PM.


#499 FunkDooBiesT

  • Members
  • 5 posts

Posted 11 May 2015 - 12:14 AM

1st of all, GOOD JOB!

I have used this program since I found it and never looked back! Really good job on the coding!

Right now I have been adding a personal feature to your program since I started using it but with the update to the turtle now being able to identify blocks I am having some trouble to get this to work the way I want.

The feature I'd like you to consider is as follows:

parameter -plugHoles t/f --Places a unwanted block from the turtle's inventory in the location of a mined block, open air, water & lava blocks.

I used to just add a function to the part of code where the turtle mines a block and then I run a select on one of the blocks that I knew was always a unwanted block and place it.
Now with the new id's method I'm having trouble locating these blocks to select them for placing.

I know this might seem weird feature to add but I have three reasones for it:
1) Leaves less room for mobs to spawn.
2) Allows the turtle mine longer.
3) I prefer not to drop items in world on servers.

Cool beans, I hope you consider this as a feature to your program.

#500 mugsy888

  • Members
  • 10 posts

Posted 15 May 2015 - 01:37 AM

filling in lava would be great.
I often go down to the bottom of my quarries to collect the missed ores (I don't use flat bottom world, when we started it was just to test the server.. now we don't want to restart the world :D )





5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users