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

TARTLE ALPHA 0.0.1 | The Clever Wheat Farming Turtle

Started by hugeblank, 20 December 2016 - 07:02 AM
hugeblank #1
Posted 20 December 2016 - 08:02 AM
Tired of the drab of farming? Constantly having to go break and replace crops? Sick of trampling your crops accidentally?

HI MY NAME IS BILLY MA– *ahem…*


Introducing: Tartle


Tartle is a sophisticated program, designed to harvest and plant wheat farms of ANY dimension, from 1x1 all the way to infinity (given Tartle doesn't unload). Let's get right into it!


1:
Spoiler


Get your field ready by tilling the soil and making sure that all spots are properly hydrated. While Tartle is smart, he can be lazy. This is one of those moments.

2:
Spoiler


Tartle is extremely polite, and does not harm any blocks other than the wheat that needs to be harvested. His politeness can cause some issues, however. In the picture above you can see all of the spots around the edges that cannot have blocks marked with red (Don't place blocks over the field either, but that's common sense). The lime is where you can optionally place blocks. Tartle personally prefers that you just wrap the perimeter of the farm with fences, that way there is guaranteed no issues.
Also in the picture above you can see that there is a chest in the bottom left corner. Make sure that that chest is always on the bottom left, from wherever you want to be facing.


3:
Spoiler


In that chest you also are going to want to put a source of fuel. It does not matter what type of fuel it is, just as long as it is in fact fuel.
Hang on to a couple of pieces, you are going to need it to kick-start Tartle in a little bit.


4:
Spoiler


Let's finally get Tartle installed! Place your turtle of choice 1 block above the closest crop space to the chest (the bottom left corner of crop space).
To install simply run
pastebin get kx2x60De

As you can see in this screenshot, I put a stack of seeds into Tartle's first slot. This was just to start Tartle off. The next time you run Tartle, he will gain seeds, so technically I could have given Tartle 1 seed and he would have been okay (provided the fully grown crop doesn't drop just wheat). Eventually the entire field would get filled.

5:
Spoiler


Now let's understand how to run Tartle. Tartle takes a length and then a width, like shown in the photo above.
So if your field was a 9 by 9 you would type in
Tartle 9 9


6:
Spoiler
On starting, Tartle will immediately request fuel, should you have not provided some. Simply replace the seeds you placed previously with a few bits of fuel, enough to get him through 1 field scan. Replace the seeds back in, and he should be good to go. This should only occur once, Tartle is very good at doing it on his own, he just needs a little assistance to start.




And off Tartle goes!

SpoilerPlanting the seeds:



Ready to go again:

Starting Tartle again is as simple as running the program again!
Harvesting:


Fully harvested:

Note that the turtle appears to have missed some wheat. Tartle never misses, all circumstances of him 'missing' wheat would be that it grew after he passed by it.

If you have any issues or crashes please leave comments down below. Tartle is in alpha, meaning he is nowhere near complete. Expect bugs, crashes, and messy code, especially in its early phases.

This script runs only runs in 1.64 or higher
Ultrasonic54321 #2
Posted 21 December 2016 - 12:53 PM
Issue on line 81.
hugeblank #3
Posted 24 December 2016 - 08:36 AM
Issue on line 81.
Please specify what exactly it says :P/>
I can't really tell what's wrong otherwise.
Pyuu #4
Posted 26 December 2016 - 10:01 PM
I looked at Line 81, just to be sure. The only way that line could error is if "w" is nil. So the error would be:
"Attempt to perform arithmetic on global 'w' (a nil value)"
BIG_J_06 #5
Posted 29 December 2016 - 12:05 AM
Very good job ! :)/>

I have an error at line 39 when the turtle goes to a "cropped without seeds" block, and does not have any seeds in her inventory.
It's a error on the var.data which seems to be nil. (It's because if there is nothing on the bottom block ? )
Nice work by the way, I took a screenshot after cropping !





Someday I will also post my switching display and control with RailCraft/Computercraft, but I have to clean the code and to make an api before :)/>
For those interested I can already give the map.


hugeblank #6
Posted 20 January 2017 - 06:17 AM
I have an error at line 39 when the turtle goes to a "cropped without seeds" block, and does not have any seeds in her inventory.
(*snip*)

Known issue :P/> To circumvent it, put a stack of seeds into the Tartle's first slot.
I'll look into it, and also refining the code. (It's a mess)
I think my end goal is that Tartle will be able to farm anything and everything in its path.
Edited on 20 January 2017 - 05:18 AM
0xZenos #7
Posted 02 May 2017 - 12:15 AM
Line 53 error:

Tartle:53: attempt to call nill.

I have no clue what do to fix this.
Bomb Bloke #8
Posted 02 May 2017 - 12:34 AM
This script requires ComputerCraft 1.64 or later.
hugeblank #9
Posted 25 May 2017 - 01:54 AM
This script requires ComputerCraft 1.64 or later.

Adding this to the post, thanks for informing :P/>