Can Mining Turtles Resume When Logging Back In?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • 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

Danwatson

New Member
Jul 29, 2019
77
0
0
When logging back in Feed The Beast after time spent away my mining turtles seem to always stop mining and grind to a halt. When accessed I am given a screen that shows the turtle version but nothing else, the turtle just stops. My question to you is there any way to allow the turtle to continue to resume it's mining when logging back in or will I just have to keep moving it's collection chest and restart the program?

Thanks :')
 

Bibble

New Member
Jul 29, 2019
1,089
0
0
On SSP, no. The machines reset on reload. If they're chunk loaded on a server, then all is well. There are also some auto-resume mining programs out there
 

Hitmaniac

New Member
Jul 29, 2019
88
0
0
I am no computercraft expert but I believe you write the code in /edit startup. When you do that, it will start up whenever you enter the world. I might be completely incorrect.
 

MilConDoin

New Member
Jul 29, 2019
1,204
0
0
With the default excavate program, you cannot have restart-resistant turtles.
They'll need some method to inform themselves on restart what they need to do. Examples include saving initial parameters (size, position) and after each step where it currently is and what it's next action will be. Or add some GPS compatibility to that.
 

Neirin

New Member
Jul 29, 2019
590
0
0
I spotted a program on the ComputerCraft forums that advertised restart-resistant mining. I haven't tried it, but maybe that'll help.
 

Silent

New Member
Jul 29, 2019
74
0
0
Writing your own programs is the whole fun of cc

Sent from my GT-I9300 using Tapatalk 2
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
I'm not, I can't code and it would be nice if someone could come up with something like this, it would just help a little. It's not compulsory.
Lua is very simple, if you want to play with turtles, then I suggest you to go and try it out :). It's fun. The resources are plentiful. You shouldn't have much trouble.
 

Dreossk

New Member
Jul 29, 2019
218
0
0
As said above, the turtle will resume if you put the code in a file called startup but the problem is they will start mining at the Y they currently are than so if you coded them to dump stuff in a chest at the surface they will have trouble because they won't be able to get there. You need to set up a GPS station somewhere high on the surface and use coord on the turtle instead of go forward x, turn left, etc. so it's not a matter of code, you have to build infrastructure too. I use many turtle but not one of them actually moves (obviously I don't have a mining turtle), they only turn, so when the chunk is unloaded/loaded, they will simply resume with no problem. I also heard about problems with moving turtles and chunk loader so I prefer not to touch that.
 

Quesenek

New Member
Jul 29, 2019
396
0
0
As said above, the turtle will resume if you put the code in a file called startup but the problem is they will start mining at the Y they currently are than so if you coded them to dump stuff in a chest at the surface they will have trouble because they won't be able to get there. You need to set up a GPS station somewhere high on the surface and use coord on the turtle instead of go forward x, turn left, etc. so it's not a matter of code, you have to build infrastructure too. I use many turtle but not one of them actually moves (obviously I don't have a mining turtle), they only turn, so when the chunk is unloaded/loaded, they will simply resume with no problem. I also heard about problems with moving turtles and chunk loader so I prefer not to touch that.
You could write a program to keep and save cords you don't need anything but a turtle but the amount of time that it takes typically makes people want to keep their code to themselves.
 

Damoklesz

New Member
Jul 29, 2019
70
0
0
As said above, the turtle will resume if you put the code in a file called startup but the problem is they will start mining at the Y they currently are than so if you coded them to dump stuff in a chest at the surface they will have trouble because they won't be able to get there. You need to set up a GPS station somewhere high on the surface and use coord on the turtle instead of go forward x, turn left, etc. so it's not a matter of code, you have to build infrastructure too. I use many turtle but not one of them actually moves (obviously I don't have a mining turtle), they only turn, so when the chunk is unloaded/loaded, they will simply resume with no problem. I also heard about problems with moving turtles and chunk loader so I prefer not to touch that.

You don't need infrastructure. You can keep track of the turtles current position in your mining program, and write it into a file after every move you take. No GPS necessary.
 

_squirrel

New Member
Jul 29, 2019
6
0
0
You don't need infrastructure. You can keep track of the turtles current position in your mining program, and write it into a file after every move you take. No GPS necessary.
Well lets say your program is like this:

1: forward()
2: storePos(x,y,z)
3: mine()

as long as you log out when you're not in between 1 and 2 it's gonna work. But if you log out after it moves but before it stores it, it's gonna mess up everything. Having a gps that keeps track of where the chest is is way more reliable and doesn't require much infrastructure.
 

Quesenek

New Member
Jul 29, 2019
396
0
0
Well lets say your program is like this:

1: forward()
2: storePos(x,y,z)
3: mine()

as long as you log out when you're not in between 1 and 2 it's gonna work. But if you log out after it moves but before it stores it, it's gonna mess up everything. Having a gps that keeps track of where the chest is is way more reliable and doesn't require much infrastructure.
I'm not a master of turtles by any means but I'm very sure that nothing like that could actually happen. Turtle code processes once a tick or maybe faster than that even and I believe its something like 20 ticks/s, meaning that as long as you save the cords after every single movement you won't be able to outrun the code.
 

Neirin

New Member
Jul 29, 2019
590
0
0
Wouldn't it be easiest of all to write your mining program such that it drops an ender chest whenever its inventory gets filled, empties itself out, then picks the chest back up. Refueling could be handled with a 2nd ender chest that you keep stocked with charcoal or some such. You would basically never have to worry about coordinates then. The only trick would be finding the darn thing again later.
 
  • Like
Reactions: Danwatson

Quesenek

New Member
Jul 29, 2019
396
0
0
Wouldn't it be easiest of all to write your mining program such that it drops an ender chest whenever its inventory gets filled, empties itself out, then picks the chest back up. Refueling could be handled with a 2nd ender chest that you keep stocked with charcoal or some such. You would basically never have to worry about coordinates then. The only trick would be finding the darn thing again later.
Shhhh.... Don't give the secret away!
 

Damoklesz

New Member
Jul 29, 2019
70
0
0
Wouldn't it be easiest of all to write your mining program such that it drops an ender chest whenever its inventory gets filled, empties itself out, then picks the chest back up. Refueling could be handled with a 2nd ender chest that you keep stocked with charcoal or some such. You would basically never have to worry about coordinates then. The only trick would be finding the darn thing again later.

Writing the program would be easy, but you couldn't really guarantee that the turtle stays at the proper y coordinate, or that the turtle doesn't try to mine out the same area again. Unless you complicate things.

You could write a mini tunnel bore program, digging a 1X1 or 1X3 tunnel forever, but then you can't even have it check for ores in the tunnel walls, because you can't really turn to mine that anyways. So that's not a very efficient way either.