Jump to content




powerful Tree Farm

turtle

16 replies to this topic

#1 Kaikaku

  • Members
  • 46 posts

Posted 03 March 2015 - 03:20 PM

Program aTreeFarm

Hi there! There are already lots of tree farm programs shared here, so you might ask: "Why adding one more to the list?"
Well, I think this program is a little bit different from what I've seen so far and it's quite powerful.

Features:
- automatic tree farm set-up (small thing, but usefull)
- no bonemeal
- turtle auto-refuels from crafted planks
- uses up to 88 saplings (I think)
- collects sapplings and replants them
- handles allmost all tree types (some modded trees are hard to handle...)
- handels 2x2 trees
- easy to use (I hope)
- everything within one chunk
- option to switch off with redstone signal
- option to set how many rounds the turtle should go

Program:
http://pastebin.com/JgRgRK5q

Video:


Output test:
I tested 12 tree types, started with new empty farms and 64 sapplings
and this is the output after 2 hours (planted sapplings not included).
Posted Image

Improvement ideas:
- add GPS support for startup (would need to swap out the crafting table)
- as the turtle doesn't collect all sapplings a water system or s.th. like a vacuum hopper would help
- I have some ideas for a different approach that could be a bit more efficient, but who needs so much wood? ;)


If you have comments, feedback or improvement ideas I'd like to hear them :)

#2 AngelWhite193

  • New Members
  • 1 posts

Posted 31 March 2015 - 11:06 PM

need startup for this program :(

#3 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 01 April 2015 - 12:06 AM

for any program to start at on computer boot make a file called startup in the root directory

add this code to it
shell.run("programName")

where programName is the path and name of the program you want to run

#4 Kaikaku

  • Members
  • 46 posts

Posted 01 April 2015 - 06:22 AM

View PostAngelWhite193, on 31 March 2015 - 11:06 PM, said:

need startup for this program :(

View PostLupus590, on 01 April 2015 - 12:06 AM, said:

for any program to start at on computer boot make a file called startup in the root directory

add this code to it
shell.run("programName")

where programName is the path and name of the program you want to run

Yes, that's generally right.

In order to make the turtle start this program without asking for pressing enter a few times, you need to add any additional parameter (well, not setup).
If this is a number, the turtle will go for so many rounds and stops then.
For example: Save the following line of code as startup and the turtle will go for 4 rounds, when the chunk is loaded.
shell.run("aTreefarm 4")

When the chunk is unloaded (not using a chuck loader, save single player world, sever shut down) the turtle will stop execution where it is and later starts from this point.
To prevent the turtle from doing so, please make sure that it halts at its starting position (e.g. by only going for x rounds / applying a redstone signal at its back / manual shut-down).
I think in part 2 of the video I give some info about this.

#5 stubob

  • Members
  • 10 posts

Posted 04 April 2015 - 10:42 PM

This is amazing! Thank you.

#6 Kaikaku

  • Members
  • 46 posts

Posted 09 April 2015 - 07:06 AM

View Poststubob, on 04 April 2015 - 10:42 PM, said:

This is amazing! Thank you.

You're welcome and many thanks :)

#7 Zair

  • New Members
  • 1 posts

Posted 23 May 2015 - 02:10 PM

Suggestion: It appears that the turtle uses the chest to store wood in before refueling, then pulls wood out if necessary to refuel. I set up some pipes to pull the products out of the chest automatically, and this caused the turtle to eventually run out of fuel. Would it be possible to have the Turtle maintain a constant supply of wood and/or planks internally so that the chest could be kept empty?

Question/problem/bug?: I ran into an issue where the program would hang on the the startup step where it says "Provide materials and press enter:" with the instructions above. Pressing enter does nothing, I can type into the prompt but when I press enter it just deletes what I typed and does nothing. The setup worked fine, it is just the run step that is failing. This program was working a few weeks ago the last time I used it, just now it is failing. Any suggestions?

Thank you very much for an excellent program, and thanks in advance for the support and/or future expansion!
~Zair

Edit: Running FTB Ultimate v1.7.10 pack

Edited by Zair, 23 May 2015 - 04:55 PM.


#8 Zeplar

  • New Members
  • 1 posts

Posted 16 June 2015 - 06:49 PM

View PostZair, on 23 May 2015 - 02:10 PM, said:


Question/problem/bug?: I ran into an issue where the program would hang on the the startup step where it says "Provide materials and press enter:" with the instructions above. Pressing enter does nothing, I can type into the prompt but when I press enter it just deletes what I typed and does nothing. The setup worked fine, it is just the run step that is failing. This program was working a few weeks ago the last time I used it, just now it is failing. Any suggestions?

Thank you very much for an excellent program, and thanks in advance for the support and/or future expansion!
~Zair

Edit: Running FTB Ultimate v1.7.10 pack

The program requires that you have 11+ saplings, *exactly one* log, and *exactly one* chest. If your turtle has >1 log in its inventory, it won't start.

#9 YukiiSan

  • New Members
  • 1 posts

Posted 17 August 2015 - 03:08 AM

Hello all!

I was definitely excited about trying this program out, however once placing all the correct items into the correct slots and pressing enter to start, I got this message....
fell:173: attempt to perform arithmetic__sub on string and number
Fell being the program name as most will probably know.

What can I do to fix this?

#10 Restioson

  • Members
  • 20 posts
  • LocationSecret meeting of the South African Internet Users club

Posted 25 December 2015 - 05:30 PM

View PostZair, on 23 May 2015 - 02:10 PM, said:

Suggestion: It appears that the turtle uses the chest to store wood in before refueling, then pulls wood out if necessary to refuel. I set up some pipes to pull the products out of the chest automatically, and this caused the turtle to eventually run out of fuel. Would it be possible to have the Turtle maintain a constant supply of wood and/or planks internally so that the chest could be kept empty?

This would be a good idea ^^

#11 Restioson

  • Members
  • 20 posts
  • LocationSecret meeting of the South African Internet Users club

Posted 26 December 2015 - 07:41 AM

I'm getting an error which relates to auto-refuelling. I believe this is because there is no fuel in slot 15, maybe this is because of autocrafting failing.

Screenshots:

Also, I have a suggestion pertaining to running the program. When you run the program setup, it places a chest down at the beginning of the loop. However, when you run the program, it still requires you to provide it with a chest, leading to a setup like this.

Thanks,
Restioson

#12 Towtow10

  • Members
  • 31 posts
  • LocationGold Coast, Australia

Posted 26 January 2016 - 05:47 AM

I have made a modified version of this to be compatible with turtles with unlimited fuel.
http://pastebin.com/xWGAdiP6

#13 Foogles

  • Members
  • 32 posts

Posted 26 January 2016 - 05:40 PM

This is a fantastic program! I use it gather fuel for my farming turtle :)

#14 stubob

  • Members
  • 10 posts

Posted 22 February 2016 - 05:21 AM

I really enjoy this one. A startup/resume script would be real nice though.

#15 Andale

  • Members
  • 46 posts
  • LocationNWIndiana

Posted 07 April 2016 - 03:07 PM

View PostKaikaku, on 03 March 2015 - 03:20 PM, said:

Improvement ideas:
- add GPS support for startup (would need to swap out the crafting table)


If you have comments, feedback or improvement ideas I'd like to hear them :)

Gonna suggest that rather than a gps you set it up to track its position either to an external file or by using the blocks below.

With the external file the problem becomes possibly bad data depending on the timing of restarts. I've tried this and it worked, but now every time. Sometimes it would update the file before the move and so the restart would put it back 1 block.


The pathway blocks are a great way to do it tho. If you had a separate autonomous program as a startup file that made it drop down and compare blocks for the path (which means saving 1 path block) and travel to the end of the path by comparing under and to sides. The easiest way would be to make it do compare/move until it got to the chest and then to begin the normal program. It would waste some fuel, but probably better than having to hunt the thing out of the trees grown around it.


I'd also point out that you should either remove the 20 minimum saps to start or make it save at least 20. Every restart I have to manually farm to get 15 or so saps to restart it.

Edited by Andale, 07 April 2016 - 03:12 PM.


#16 Makenshi

  • New Members
  • 1 posts

Posted 02 February 2018 - 11:55 PM

I know this is a necro, but I've exhausted all options to fix this problem. So please bear with me.

I've made the turtle and put in all the required materials and told it to run the setup. However when it asks for fuel no matter what I put in, whether its a single item or a whole stack, the turtle registers only 20/1920 fuel and deletes everything else in the fuel slot. I've tried logs, planks, coal, charcoal, but nothing makes it register over 20 fuel.

If I modify the program to require only 20 fuel, then it works and places anywhere from 9-13 blocks for the path and then stops. After that the only way to get it to do anything is break it and start over. So I have no idea what to do. I'm on a 1.7.10 server if that helps.

#17 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 03 February 2018 - 03:37 AM

Can you get any turtle past 20 fuel? If you type "refuel all" straight into the command prompt, it'll attempt to charge up off anything in its inventory. It sounds like your server owner has changed ComputerCraft's config.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users