This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
nitrogenfingers's profile picture

Turtles in ComputerCraft: Farming, mining, smelting and archiving

Started by nitrogenfingers, 09 October 2015 - 03:00 AM
nitrogenfingers #1
Posted 09 October 2015 - 05:00 AM
Below is a video showing a couple of scripts I wrote in-game to solve basic survival problems in as reliable and autonomous a way as I could while still giving me flexibility and power over what they do:

https://youtu.be/4j7yGr92P9s

I made them over the course of just playing survival for about a week. The scripts I've written are pretty robust; they will usually keep running if you close the session or if they terminate unexpectedly, and they usually don't require anything more than a few raw materials and a flat patch of land to start working. The code however, written in-game, is hideous so I don't know if I'll publish it unless/until they're polished up a bit.

-NF
Lyqyd #2
Posted 09 October 2015 - 05:59 AM
I'd be interested in taking a look at the turtle archivist script, even in its not-clean state. I've got a similar project I've been poking at on and off for a while and I'd like to compare notes.

I enjoyed the video!
Bomb Bloke #3
Posted 09 October 2015 - 07:09 AM
Ah, the dream of getting your turtles to harvest materials for (and perhaps even build!) your base for you.

Ultimately you end up with something that boils down to the cheesy blocks from MFR, Buildcraft, etc; there for those who aren't quite yet willing to admit that they'd rather be playing in creative mode. But there's a certain satisfaction in having "earned" such a setup by way of coding it yourself!

Regarding the wood chopper, I've taken a liking to this tessellated pattern when planting:

    0    0    0    0
  0    0    0    0  
0    0    0    0    
   0    0    0    0 
 0    0    0    0   
    0    0    0    0

The turtle need only chop up the center of each tree, spinning on its axis as it goes and chopping all leaves/logs encountered. Although "coring" in this manner leaves a lot of wood behind, it'll be collected later when chopping the other trees in the grid, and this is also sufficient to yield a positive income of saplings. The denser plantation coupled with fewer unnecessary movements results in a great amount of wood production. I pretty much ran my entire base's energy needs off the charcoal output from a 16x16 grid once upon a time (… in no small part due to my use of a very high capacity energy cell to act as a buffer, but still, that and a single steam dynamo let me run whatever I wanted whenever I wanted).

A problem with all wood plantations is that only oak trees are happy to grow when in close quarters with other trees. Fortunately a "coring" turtle can still harvest indefinitely with other varieties, as it'll always get enough saplings (even if they aren't growing as densely).

Well, that's assuming you stick with vanilla trees. Many trees from mods are happy to grow in the manner oak does. BOP's sakura, in particular, produces a stupendous amount of wood - I had a turtle chop +20k overnight - but there's a catch; last I tried it, most trees from mods will grow over turtles, deleting them from the world if they happen to be in close proximity. That includes "vanilla" trees which've been in contact with Forestry's butterflies.

(Which led to me programming a system to detect and replace destroyed wood chopping turtles, which led to me finding yet another bug which crashed my server…)

MFR rubber trees work well - happily growing over each other, leaving turtles alone, and producing tons of rubber to boot (which can be used to craft torches, among other things). Unfortunately they don't grow as tall and produce only three jungle planks per log. You just can't beat oak!

(Psst - if you remove the "s" from that "https", the forum software will automatically turn that YouTube link into an embedded video.)
Forgotten_Boy #4
Posted 11 October 2015 - 08:34 AM
Great video!
Link149 #5
Posted 23 October 2015 - 02:46 PM
Because survival shouldn't be a one-man job.

Great video, as always. :)/>
Waitdev_ #6
Posted 24 October 2015 - 03:29 AM
these are the coolest turtle scripts i've seen! and in a video, awesome! i know how some people cant to do youtube videos for their scripts, but its awesome how you've put in all the time for all the essentials. as with the chests, can you request items? that would be pretty cool.