Jump to content


[1.3] AutoTreeFarm program



22 replies to this topic

#1 BikerEleven

    Clueless

  • Members
  • 4 posts

Posted 10 March 2012 - 04:25 AM

*Having stopped playing minecraft this code is hereby abandoned however other like Anonomit have updated the code you can find the post here http://bit.ly/NhYPsp


This is simply an automatic tree farm designed to maintain a few rows of trees automatic, or semi automatic.

Its main features are:
  • Automatic sapling planting
  • Block placement if unable to plant a sapling
  • Auto harvesting
  • Simple settings menu
  • Feature to output redstone at the end of a harvest for an automatic refill/collector system
To use this system, simply install the file as startup -or another name if its not a dedicated turtle- then when it first runs it will ask if it should output a redstone signal unless its invitory is cleared.
Next it will ask how many rows (columns) should it manage, after that it will ask how many trees per row (column).
Once that is done its ready to get a renet message "startLoging" or hit r on the main screen to start a harvest(cycle).

Saplings go into the first slot (Recomended 50) and dirt gos into the second slot (Recomended 50)

Also on the main screen between cycles you can hit s to bring up the settings menu. Settings are saved between sessions.

Preview video:





Old download: http://pastebin.com/tByWEdJE




#2 Zer0t3ch

    Clueless

  • Members
  • 33 posts
  • LocationIllinois, USA

Posted 12 March 2012 - 09:45 PM

I like it. Have this installed on my server, and we love it! Thanks! :-)

#3 themandk

    Clueless

  • New Members
  • 1 posts

Posted 22 March 2012 - 05:04 PM

I like it. But what is the name of the pip below the turtle in your redstone setup ??.
I've tried every pip but can not find it.
Thanks.:(/>

#4 HTxL

    Clueless

  • New Members
  • 16 posts

Posted 23 March 2012 - 12:24 AM

Very nice
I liked that you used the same technique to check if he puts the right blocks since for some reason when you try to put a block from an empty slot
it moves to a slot with a block and place it....

I really like it thanks for sharing :]

#5 hamish1001

    Script Kiddie

  • New Members
  • Pip
  • 75 posts
  • LocationAustralia

Posted 24 March 2012 - 06:47 AM

awesome, the best thing is that it works thanks :(/> :)/>

#6 BikerEleven

    Clueless

  • Members
  • 4 posts

Posted 30 March 2012 - 08:12 PM

View Postthemandk, on 22 March 2012 - 05:04 PM, said:

I like it. But what is the name of the pip below the turtle in your redstone setup ??.
I've tried every pip but can not find it.
Thanks. :o/>

Its a Logistics supplyer pipe, A buildcraft addon by Krapht

#7 MathManiac

    Script Kiddie

  • New Members
  • Pip
  • 57 posts

Posted 17 May 2012 - 07:11 AM

This, my friend, is 97% awesomesauce. The other 3% is epicsauce.

#8 onecaveman

    Clueless

  • New Members
  • 2 posts

Posted 24 June 2012 - 03:57 AM

hi, i have typed in the colde in the turtelos 1.3

but when i run the program i get this error
For input string: "0local"

im new to luna, can you please help me out

im playing on a smp tekkit server..

thank you for your time

#9 kazagistar

    Pro Coder

  • New Members
  • PipPipPipPipPip
  • 364 posts

Posted 24 June 2012 - 04:16 AM

View Postonecaveman, on 24 June 2012 - 03:57 AM, said:

hi, i have typed in the colde in the turtelos 1.3

but when i run the program i get this error
For input string: "0local"

im new to luna, can you please help me out

im playing on a smp tekkit server..

thank you for your time

Did you copy the line numbers? Because that is what it looks like.

#10 onecaveman

    Clueless

  • New Members
  • 2 posts

Posted 24 June 2012 - 05:45 AM

View Postkazagistar, on 24 June 2012 - 04:16 AM, said:

View Postonecaveman, on 24 June 2012 - 03:57 AM, said:

hi, i have typed in the colde in the turtelos 1.3

but when i run the program i get this error
For input string: "0local"

im new to luna, can you please help me out

im playing on a smp tekkit server..

thank you for your time

Did you copy the line numbers? Because that is what it looks like.

no but i copy pasted it from the raw data.
"tap" or what it is called.. is not in the tutelosOS.
i set it up like this in the tutelOS



some of the raw data:


local shouldOutput = false
local width = 0
local length = 0

local function loadSettings()

file = io.open( "settings.txt", "r" )
while true do
line = file:read()
if line == nil then break end

if line == "true" then
shouldOutput = true

the difrent is that the program does not have the "tap" in it. well i can't make it work anyway

Edited by onecaveman, 24 June 2012 - 05:54 AM.


#11 KaoS

    Diabolical Coder

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,389 posts
  • LocationThat dark shadow under your bed...

Posted 26 June 2012 - 05:23 PM

I built a different one with buildcraft deployers, the turtle places a sapling, powers the deployer which uses bonemeal to grow the tree, the turtle then mines it out and repeats. it works very fast

#12 Amunak

    Clueless

  • New Members
  • 6 posts

Posted 26 June 2012 - 10:12 PM

First of all I must say that this is awesome. I have a few suggestions for improvements.

- when going over blocks and thinking "this under me is sapling" while going through the cycle, check if the block where the sapling should be really is a sapling - sometimes I run out of saplings and it then plants dirt or wood, so it would be great to have it cycle again and repair those mistakes from previous loops.

- add an option to always recreate the dirt blocks under saplings - when I make an automatic farm, some of the saplings stays on the one dirt block. That's a problem in tekkit where I use it to farm rubber trees. They drop only a few saplings and every waste is a disaster :P/>

Continue doing this awesomness, thanks!

#13 TrollZ0R

    Clueless

  • New Members
  • 4 posts

Posted 29 June 2012 - 07:27 PM

Can someone tell me how to connect the Computer with the Turtle?

#14 soloian

    Clueless

  • New Members
  • 1 posts

Posted 19 July 2012 - 10:42 AM

I'm having some problems with this on SMP it doesn't seem to want to break the trunk when it moves up to the side of it nor dose it replace sand with dirt like in the video :S

I downloaded the file from paste bin so I know im not missing something out of the code can some one help me out thanks


ok i got it working all i needed todo was face the turtle to the south.

but i do have one question how can i make it so on a redstone pulse it starts up? :S so i can make it so its hiden out of the way.

#15 BikerEleven

    Clueless

  • Members
  • 4 posts

Posted 20 July 2012 - 10:49 AM

View PostAmunak, on 26 June 2012 - 10:12 PM, said:

- when going over blocks and thinking "this under me is sapling" while going through the cycle, check if the block where the sapling should be really is a sapling - sometimes I run out of saplings and it then plants dirt or wood, so it would be great to have it cycle again and repair those mistakes from previous loops.

I have actualy tryed doing that with the compare function but I ran into consistency errors so I decided to just keep the current system.

View PostAmunak, on 26 June 2012 - 10:12 PM, said:

- add an option to always recreate the dirt blocks under saplings - when I make an automatic farm, some of the saplings stays on the one dirt block. That's a problem in tekkit where I use it to farm rubber trees. They drop only a few saplings and every waste is a disaster :)/>

This could be implimented as an option, i'm working on a few minor changes but at the moment im waiting for the computer craft update before releasing the next upgrade.

View Postsoloian, on 19 July 2012 - 10:42 AM, said:

I'm having some problems with this on SMP it doesn't seem to want to break the trunk when it moves up to the side of it nor dose it replace sand with dirt like in the video :S

I downloaded the file from paste bin so I know im not missing something out of the code can some one help me out thanks


ok i got it working all i needed todo was face the turtle to the south.

but i do have one question how can i make it so on a redstone pulse it starts up? :S so i can make it so its hiden out of the way.

I have no idea why it would require you to face the south it sounds like a mod glitch, and for the redstone pulse you just need to add this line to the event handler

if event == "redstone" and p1 == "<side of="" redstone="">" then harvest() end

#16 MrRain

    Clueless

  • New Members
  • 1 posts

Posted 25 July 2012 - 09:00 AM

I'm having a problem where the turtle isn't harvesting the tree at all.

#17 stabwoundz

    Clueless

  • New Members
  • 1 posts

Posted 03 August 2012 - 06:01 AM

do i have to copy the program to the turtle before trying to use rednet? i'm fairly new to computercraft so i'm not sure if this is necesary

#18 Anonomit

    Script Kiddie

  • Members
  • Pip
  • 67 posts

Posted 11 August 2012 - 10:29 AM

I've just posted an update to this program, addressing some of the issues or suggestions left in this topic.

Full credit is, of course, given to BikerEleven for the original code.

The updated version can be found here:
http://bit.ly/NhYPsp

I created a new topic because of all the detail in the post. I linked back to this topic so people can find this version if mine proves to have a bug or inconsistency error.

#19 nicon4454

    Clueless

  • New Members
  • 3 posts

Posted 29 August 2012 - 02:43 AM

i would also like to know how to connect the turtle to the computer with rednet i have three turtles set up and i would like to be able to make them go from the computer. also can you explain a bit more about the output redstone on cycle. is there a way to get the turtle to unload either let it drop in to the water or drop it in the chest?
Spoiler

i do have to say i really like this mod.

#20 Anonomit

    Script Kiddie

  • Members
  • Pip
  • 67 posts

Posted 23 September 2012 - 02:55 AM

View Postnicon4454, on 29 August 2012 - 02:43 AM, said:

i would also like to know how to connect the turtle to the computer with rednet i have three turtles set up and i would like to be able to make them go from the computer. also can you explain a bit more about the output redstone on cycle. is there a way to get the turtle to unload either let it drop in to the water or drop it in the chest?
Spoiler

i do have to say i really like this mod.

Hi nicon4454, to make the turtles start by rednet, first find a computer with a modem. Make sure the modem is open. While editting a program, or using the lua prompt, type in:
rednet.open( side )   --ie.   rednet.open( "right" )

Next, to make the turtles start simultaneously, type in:
rednet.broadcast( "startLoging" )

Again, make sure this is inside a program or the lua prompt. As long as your turtles are wireless, and are "ready to cycle", they should begin harvesting.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users