Jump to content




Mine Manager for turtle fleet


  • You cannot reply to this topic
23 replies to this topic

#1 PTS

  • New Members
  • 14 posts

Posted 16 March 2012 - 09:37 AM

I've put this software together for our server but I figure it's good enough to be published. It supports up to 4 turtles and works best in strip-mining operations. I considered adding support for a larger fleet, but your hands will be full taking care of just these guys, they work fast!

Features:
  • Manage all droids from a centralised location
  • Droids report their status and progress so you know what's going on and when to intervene
  • When the cargo hold is full, droids will automatically drop off and then return to where they stopped
  • Distress call when obstructed by mobs or players (will resume working as soon as obstruction is removed, no need for further orders)
  • Easy to use GUI with all information visible at all times
  • Works with 1.3 and 1.31 (read notes)
Some screenshots
Spoiler
Server
Turtles

To install, go to .minecraftsaves{worldname}computer and extract the contents of the appropriate archive into the folder of the computer/turtle you want to use (you can check which folder you need by entering 'id' on a console or turtle in Minecraft). I have not made an installer cause it's been just me maintianing the computers on our server and if the foreman had a problem I went there and fixed it. I do consider it for a future release though.

NOTE: This software does not work as an API, because there are several files that chain-load. If you place the files in the API folder you will get errors. Remove calls to os.loadAPI() if you want ot use it this way (make sure you know what you're doing first).

How to use:
  • Turtles
Spoiler
  • Server
Spoiler
  • To set up a mine
Spoiler
  • To set up a dock
Spoiler
Known bugs and issues
Spoiler

How I may improve it:
  • Sync all coordinate operations with the new GPS API
  • Add screen support so droid status can be displayed and visible from a larger distance
  • Recall droid function
  • Store fleet data permanently on the server
  • Various automations like detecting all droids in range, surveying the land, assigning large lots that are automatically split in smaller chunks and sending the droids to those chunks without manual entering of coordinates (now easier with screens)
  • Sanity check for entered coordinates. You cannot imagine how much it sucks to accidentally omit a minus and have the droid fly off into the sunset. So if distance is larger than say 100 blocks, confirmation should be required
You can see our mine in this gallery
http://www.failreactor.com/set/88
It took a single foreman about 3 real-time days to excavate the entire volume with 3 droids (we had 4, but one was lost to creepers, and we didn't really need any more to be efficient). The mineral resources we acquired are among the tens of thousands (hundreds of each RedPower gem type and thousands of each common metal ore, including iron). You can see the drop off points (RedPower filters), one for every droid, so they don't dump around if two are unloading at the same time. Sorting machines filter out cobblestone, which is sent to be incinerated in a small lava pool and the rest is split between three silos.

#2 Zer0t3ch

  • Members
  • 33 posts
  • LocationIllinois, USA

Posted 16 March 2012 - 03:59 PM

Looks awesome! I will try it out with some friends on my server after school!

#3 ironsmith123

  • New Members
  • 69 posts

Posted 16 March 2012 - 08:33 PM

verycool!i see this becoming quite popular!

#4 crimsonknight3

  • Members
  • 39 posts

Posted 17 March 2012 - 04:01 PM

Does the turtle have to be a wireless turtle and a modem connected to the server?? I've set everything up as instructed however the mining bot does utterly nothing >.>

[edit] another question while i was reading. does the mining operation HAVE to be directly in front of the droid? For example, my droids co ords are
X -262 Y 74 Z 313 Facing 3. If i told it to dig from X -264 Y 74 Z 313 and have the hole 3 wide 5 long and depth of 50. Or does the droid *have* to face south and have its mining co-ords going South-West? Also do you know of any mod that forces chunk loading to prevent droids disappearing That isnt teleport pipes as thats not been updated?



[edit] nevermind i got it working now (maybe specify wireless miner?) though facing 3 it digs forward the to the right so its direction are different depending on what direction its original position is facing?

#5 crimsonknight3

  • Members
  • 39 posts

Posted 17 March 2012 - 05:22 PM

Okay strange behaviour. Got my turtle to mine out a small ish shaft. It says completed 100% 144/144 even though it left out 6 blocks. Now the strange part is that when it got back to its starting postion, it didnt have ANY items in its inventory and it didn't dump out a single item.? I dont know why though?

[edit] Just thought id point out that when i did a test shaft RIGHT in front of its starting position only about 5 deep, it dumped the items out fine

#6 Dreamlash

  • New Members
  • 12 posts

Posted 17 March 2012 - 06:54 PM

When I attent to run the "setcoords" it returns "a attent to index? (a nil value)

and remote-pc attent to call nil

:D/>

#7 PTS

  • New Members
  • 14 posts

Posted 17 March 2012 - 11:41 PM

crimsonknight3:
The turtles have to be wireless and the console needs to have it's modem placed on the right side, sorry for not specifying. And you need to run the program on the droids first and then send the mining order.
It doesn't matter which way the turtle is facing when you assign the operation, but this is the direction in which items will be unloaded, so if you have a special block that will receive them (redpower filter or some sort of pipe), it has to be facing that way. The depth variable is actually the depth you want the turtle to reach, not how deep the hole would be (I guess I could have chosen a better name), so if you specify a depth of 50, the turtle will dig down to and including y:51.
Chunk loading is a bit of a problem, but it cannot be circumvented. You need to be around the droids when they work, or else the program will unload (it's what all computers do).
As I've mentioned in the description, there might be a problem with the last few blocks, but it's hardly an issue too great. Your turtle was probably empty from the previous trip but did not realize it had nothing more to dig when it went back, so it came home empty the second time.

Quote

When I attent to run the "setcoords" it returns "a attent to index? (a nil value)

and remote-pc attent to call nil

:D/>
Did you place all the files in the same folder? In single player, you need to open the folder located in .minecraftsaves<worldname>computer and in there find the appropriate folder. You can see which folder you need by executing 'id' on the computer/turtle you want to configure. All four files from the server.zip must be extracted in the same place (the folder with the same ID as your controlling computer) and every turtle needs all 9 files that are in droid.zip.</worldname>

#8 Kghareus

  • Members
  • 8 posts

Posted 18 March 2012 - 03:07 PM

Ok I've installed it.

Clicking on the designated server computer returns "rednet:319: attempt to call nil"

Clicking on any one of the droids gets me the same thing but with "File not found" at the top

Clicking on any computer that isn't the server gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

and clicking on any turtle that wasn't a droid gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

All of this happens upon computer startup. It doesn't let me do anything on the computer.

#9 Kghareus

  • Members
  • 8 posts

Posted 19 March 2012 - 12:01 AM

Could anyone give me a tutorial or something on how to install this?

#10 PTS

  • New Members
  • 14 posts

Posted 19 March 2012 - 12:42 PM

View PostKghareus, on 18 March 2012 - 03:07 PM, said:

Ok I've installed it.

Clicking on the designated server computer returns "rednet:319: attempt to call nil"

Clicking on any one of the droids gets me the same thing but with "File not found" at the top

Clicking on any computer that isn't the server gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

and clicking on any turtle that wasn't a droid gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

All of this happens upon computer startup. It doesn't let me do anything on the computer.

You shouldn't have placed the files in the API folder but in the folder of each computer. Go to .minecraftsavesworldnamecomputer and in there you'll see folders with numbers for names. Each folder corresponds to a computer in the game. While playing, you can approach any computer and type 'id' and it'll tell you which folder belongs to it. Now you can go to this folder and extract all of the files in there, depending on if it's a console (then server.zip) or a turtle (then droid.zip). Also, the console must have it's modem on the right side. The program wont work without a modem and wireless mining turtles.

#11 mememan000

  • New Members
  • 8 posts
  • LocationUnited States

Posted 19 March 2012 - 07:13 PM

~

Edited by mememan000, 28 August 2015 - 02:39 AM.


#12 Kghareus

  • Members
  • 8 posts

Posted 19 March 2012 - 09:19 PM

View PostPTS, on 19 March 2012 - 12:42 PM, said:

View PostKghareus, on 18 March 2012 - 03:07 PM, said:

Ok I've installed it.

Clicking on the designated server computer returns "rednet:319: attempt to call nil"

Clicking on any one of the droids gets me the same thing but with "File not found" at the top

Clicking on any computer that isn't the server gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

and clicking on any turtle that wasn't a droid gets "File Not Found" 3 times and then "remote-pc:23: attempt to index ? (a nil value)

All of this happens upon computer startup. It doesn't let me do anything on the computer.

You shouldn't have placed the files in the API folder but in the folder of each computer. Go to .minecraftsavesworldnamecomputer and in there you'll see folders with numbers for names. Each folder corresponds to a computer in the game. While playing, you can approach any computer and type 'id' and it'll tell you which folder belongs to it. Now you can go to this folder and extract all of the files in there, depending on if it's a console (then server.zip) or a turtle (then droid.zip). Also, the console must have it's modem on the right side. The program wont work without a modem and wireless mining turtles.

Yea. I've re-installed computercraft and it's working now. I'm just trying to figure out how placing some files into a folder could've made all the computers stop working.

#13 PTS

  • New Members
  • 14 posts

Posted 20 March 2012 - 06:26 PM

View PostKghareus, on 19 March 2012 - 09:19 PM, said:

Yea. I've re-installed computercraft and it's working now. I'm just trying to figure out how placing some files into a folder could've made all the computers stop working.
It's because all the files in the API folder are loaded whenever a computer runs, so if there's an error, ALL computers will have that error. In this current case, remote-bot loads smartmine which loads smartmove which loads pervar, which is ok in terms of how programs work, but then all these files have already been loaded, because they are in the API folder, and attempting to load them again, causes problems. I'm happy you managed to get it to work now.

agsking said:

this is awesome! One problem though is you spelt calibrate wrong in the GUI haha

Do you think you could add some pictures of the dock and which point to enter for the dock coords? or even better if u could make a video of how to do the entire set up.

Also do you have to start all the droids from the docking station or can you start them from anywhere? Whats the purpose of the docking station anyway ha?

and where do the turtles drop off the items relative to the docking station? Mine seemed to put them to the right of it.

and for the facing direction on the dock config is it the angle? like 0-360?


Sorry about all the questions but its really interesting. I cant wait until it supports more than 4 turtles and you improve the other parts :D/>

The dock looks like so:
Posted Image
The one block that is missing is the direction you should specify. Just stand in the dock, look out trough the opening and press F3 on your keyboard. You'll notice your coordinates x, y, z as well as a fourth number, denoted as f. This number is the direction. You can start the droids anywhere, but you have to manually enter their coordinates with setcoords. Resources are dropped where the droid starts from, so position it where your receptacle is and then order them to dig, they will come back to the starting location when full or when the job is done. The docking station has no meaning for the droids, other than when you're calibrating them, so you don't need to specify it's location if you're not using it.
I can see how a video would be useful, but I haven't ever made one and honestly don't have the time to do it. But I would appreciate if someone wants to do it for me, I'll provide detailed instructions :)/>

#14 pcmaster160

  • New Members
  • 28 posts

Posted 21 March 2012 - 05:01 AM

This is amazing. Like great job! This has a huge amount of effort put into it I mean like this is huge like very great job. I may make a video of this mod in a new series i'm working on.
My one problem is that you said in the bugs the variables aren't persistent over sessions. Unfortunately this would be a pain for ssp. If I understand it right the turtles will mindlessly mine until the inventory is full? Is there some way to stop them there? So when I save and quit all I would have to do is set their coords and server ids.

#15 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 21 March 2012 - 06:14 AM

Why not use persistant variables for this? There is alteast 2 on this forum. Cookiebal has one and i believe Liraal doees.

#16 PTS

  • New Members
  • 14 posts

Posted 21 March 2012 - 11:32 AM

View Postpcmaster160, on 21 March 2012 - 05:01 AM, said:

This is amazing. Like great job! This has a huge amount of effort put into it I mean like this is huge like very great job. I may make a video of this mod in a new series i'm working on.
My one problem is that you said in the bugs the variables aren't persistent over sessions. Unfortunately this would be a pain for ssp. If I understand it right the turtles will mindlessly mine until the inventory is full? Is there some way to stop them there? So when I save and quit all I would have to do is set their coords and server ids.
Turtle coordinates are persistent over sessions, your only job would be to order them to go back to their drop off point using moveto :(/>
They will mine far less from mindlessly, instead once 8 slots are full and the ninth slot has one block in it (meaning if a new ore is encountered, it wont fit in the inventory) they go back to where they started, drop their cargo and then return to where they stopped and resume, all done automatically. If you stop the session mid-course though, they'll just sit there until ordered to move, do something else.
The server console does not store it's data across sessions, but that's hardly an issue, since all you have to reenter are the IDs of the worker droids. It was merely an issue with having too much files in the pv directory, but I've fixed this and will be uploading a new version of the server software by the end of the week.

View PostFuzzyPurp, on 21 March 2012 - 06:14 AM, said:

Why not use persistant variables for this? There is alteast 2 on this forum. Cookiebal has one and i believe Liraal doees.
I am indeed using a system of my own, inspired by Cookiebal, for which he deserves a credit here. I did however made a few features of my own, like the ones you'll see in the next version, namely being able to store entire config sets in the form of lua tables in a single file. I'm also playing around with GUIs and I think it's turning up quite nice.

#17 Aerik

  • New Members
  • 15 posts

Posted 08 April 2012 - 09:51 PM

Epic!

Little question though, how high up does the turtle go on it's way to mining location? Because my first and only turtle just went straight up, out of view, and has yet to arrive at its destination...

EDIT: Hmm, second try seems to be working fine, though I lost that first turtle... (And yes, I checked the coords without a "-")

#18 GhostRecon

  • New Members
  • 2 posts

Posted 25 May 2012 - 08:24 PM

Hello,

First off, I wanted to say - Awesome program! Looks very cool, and when I've gotten it to work, its awesome!

However, this leads me to problem number one: Getting it to work consistently. I'm sure I'm doing something wrong, somewhere, but I just can't get this program to initiate on the Turtles consistently. I'll set the Turtle into remote-bot mode and assign it an ID (Though regardless of what ID I enter, it always enters whatever PC ID it is), then I'll turn on remote-pc and enter in dock coordinates; however, when I try to calibrate the Turtle it always hangs and does nothing. Trying to manual do setcoords and run mining operations off of the turtle when the turtle is suffering the "calibrate hangup problem" has the same results... its like the turtle doesn't register at all to the remote-pc program.

Some notes:
Using computercraft 1.33
Wireless Mining Turtle
Console with Mine Manager installed (modem on right side, based on player orientation)
Dock (Various configurations tried - originally trying to do something with obsidian pipe and teleport pipe, so I can make this relatively mobile)

#19 mariahw

  • New Members
  • 2 posts

Posted 07 June 2012 - 12:22 AM

Thank you for this program, it is exactly what I need, the problem is I got a new computer and reinstalled tekkit, and a server for my own personal use. The program was running great on my old computer and old tekkit, but now after it mines a while the miner stops and
displays the following error:

pervar:33: attempt to index ? (a nil value)

I love this program and can not find anything else like it, please tell me
what I have to do to fix this or what the problem is.

Any help please

Mariah

#20 NeonPhoenix

  • New Members
  • 4 posts

Posted 29 August 2012 - 06:51 AM

hey this is a great program but...

every time a start the Mining Operations option my turtles just spin around in circles on the spot
i have gone through the instructions a thousand times and follow everything to the letter
but no matter what i do it just decides to spin around and around

can you help me please





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users