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

nO_OnE's Treefarm w/ refueling from warfar

Started by Phyrax, 30 December 2012 - 09:15 PM
Phyrax #1
Posted 30 December 2012 - 10:15 PM
To begin, I want to give credit where it's due. The bulk of the code, actually roughly 90% was provided by nO_OnE (link) I borrowed code from warfar's (link) tree program for refueling.

I have been on a search for a good tree farm program that didn't require bone meal, and worked as expected, to my surprise, I found none. I did however find one I liked especially because it used Rednet, but the logging was spotty, and for some reason every time I sent the turtle on a run, he only cut down one block and kept moving in sequence… idk why. So I found this one by nO_OnE and loved it, though found myself frustrated when I kept running out of fuel and the turtle just died, thus forcing me to break it and re-place it and refueling it prior.

So… I figured I would borrow some code from warfar's Tree Farming program, which requires bonemeal, and adapt it to nO_OnE's code. I also made it to where slot #3 is now the default fuel slot, so you can put your burnable fuels in there to start. I had originally attempted to calculate fuel costs, but found myself too lazy to do so, and in-turn just added a minimum fuel variable. The turtle checks the minimum fuel against current fuel level before every run.

I'm sure someone can get the fuel calculation down to a science, but I have no idea how, it's too late for me atm.

*Changelog *
  • Changed key binds
  • F = Refuel Q = Quit
  • Slot #3 now holds default fuel and will not "drop"
  • Added minFuel to config file (last line)
  • Added default 60s wait time (stop wasting fuel…)
Install from Pastebin
pastebin get j52uTKKK tree

Link to Pastebin (Install yourself)
http://pastebin.com/....php?i=j52uTKKK

I'm not going over how to install it manually sorry.

Setup Video (Cuz I'm lazy)
[media]http://www.youtube.com/watch?v=rMNxgKc2xh4&feature=youtu.be[/media]

You can force terminate the program via Ctrl+T and edit the farmer.cfg directly to change default sleep time and minimum fuel level. Currently that's the ONLY way to edit minimum fuel level.

TODO:
  • Interactive Setup Menu
  • Add fueling station
  • Cleanup UI
nO_OnE #2
Posted 01 January 2013 - 06:47 AM
My original Topic: [link]
kenzishi #3
Posted 05 January 2013 - 02:15 AM
don't know if this problem is happening for anyone else but when i run this it will not go up the rest of the tree tryed in detect mode and compare it will delete the one block of wood move forward delete dirt place dirt place sapling then move on to the next tree instead of going up the tree trunk why is this? i have not edit'ed the code at all. note i am using a moded pack and it is a rubber tree from ic2 mod soo if that is why it is not detecting the correct item above and just moving on is there a simple fix to make it break x amount up anyways cause these trees always grow 1x1x? tall never having random logs spawning the the canopy.
kenzishi #4
Posted 06 January 2013 - 02:55 AM
nO_One's original works fine though aside from a small bug that i think is just cause of cc where when the server reboots if my turtle is in mid harvest and not on his counting cycle he will bug and rever into a reg turtle and lose his name fuel and progams…
Someguy123 #5
Posted 06 January 2013 - 04:14 AM
This seems to work pretty well, I'd love if there were an option for automatic bonemealing, as long as it's not forced, it'd help me out and allow it to be even more automated.
I've set it up and it's happily cutting away at some birch trees on my world without issues.
EDIT: Okay, it's starting to have the same problem as kenzishi:
don't know if this problem is happening for anyone else but when i run this it will not go up the rest of the tree tryed in detect mode and compare it will delete the one block of wood move forward delete dirt place dirt place sapling then move on to the next tree instead of going up the tree trunk why is this? i have not edit'ed the code at all. note i am using a moded pack and it is a rubber tree from ic2 mod soo if that is why it is not detecting the correct item above and just moving on is there a simple fix to make it break x amount up anyways cause these trees always grow 1x1x? tall never having random logs spawning the the canopy.

No idea why this is happening either, It was working before, but now it's doing that, even after deleting the config and re-downloading the program…
Kravyn #6
Posted 12 January 2013 - 08:29 PM
use a feller turtle instead of just a normal turtle
ThunderZ8olt #7
Posted 19 January 2013 - 05:49 PM
Having the same problem and I am using a feller turtle
Andrakon #8
Posted 26 February 2013 - 02:49 PM
I was having trouble with the felling turtle running the tree program. It would run out of fuel and never try to refuel itself. It would also not update it's fuel screen. However I fixed these issues.

Full Fixed program code
http://pastebin.com/ZfUtkR1y

to install from pastebing


pastebin get ZfUtkR1y tree

The turtle will now check for fuel and update the screen before every tree! Also the turtle waits 300 seconds before cutting down your tree farm each time.
Enjoy!