Jump to content




Tree Turtle - Initial Release v1.02 [Session Support!]


6 replies to this topic

#1 Cain

  • Members
  • 12 posts

Posted 21 June 2013 - 02:08 PM

Hi everyone, I decided to write my own tree turtle script as the "Ultimate Wood Chopper" was turning out to be a little buggy on my server for some strange reason, anyway.

This script comes with two scripts, one called "treeFarm" and one called "startup".

Use the "treeFarm" script initially to build the base and then you can run startup, be sure the correct items are in there however.

Scripts:

If you want to automate the install, use this:
http://pastebin.com/4JpDFRaz
pastebin get 4JpDFRaz initial

Just type initial and it will automatically download, and if you already have the script, update for you.

http://pastebin.com/HEpZc2vf
pastebin get HEpZc2vf treeFarm

http://pastebin.com/mhS0Qzzr
pastebin get mhS0Qzzr startup

For the "treeFarm" script, some items must be placed initially into the turtle for it to build with the right resources.
Posted Image


Once the base has been built, you will have 3 chests beside the turtle.

On the left is where the wood goes, on the right is where the saplings go and on the top is where the bonemeal goes, the turtle DOES NOT need Bonemeal to function however you will get wood much faster.

Good luck everyone, and tell me any bugs you come across.

This is my first real script aswell, with a little bit of help from kyle0440.

Oh, forgot to mention, it places a lever than you can use to turn on/off the turtle script.

Changelog
v1.01 - Changed turtle.forward() to turtle.detect() to see if there is a tree there.
v1.02 - Aded basic session support, will return to original place if it crashed when it was placing bonemeal.

#2 SWGCryand

  • Members
  • 11 posts

Posted 21 June 2013 - 03:46 PM

View PostCain, on 21 June 2013 - 02:08 PM, said:

Hi everyone, I decided to write my own tree turtle script as the "Ultimate Wood Chopper" was turning out to be a little buggy on my server for some strange reason, anyway.

This script comes with two scripts, one called "treeFarm" and one called "startup".

Use the "treeFarm" script initially to build the base and then you can run startup, be sure the correct items are in there however.

Scripts:
http://pastebin.com/HEpZc2vf
pastebin get HEpZc2vf treeFarm

http://pastebin.com/mhS0Qzzr
pastebin get mhS0Qzzr startup

For the "treeFarm" script, some items must be placed initially into the turtle for it to build with the right resources.
Posted Image


Once the base has been built, you will have 3 chests beside the turtle.

On the left is where the wood goes, on the right is where the saplings go and on the top is where the bonemeal goes, the turtle DOES NOT need Bonemeal to function however you will get wood much faster.

Good luck everyone, and tell me any bugs you come across.

This is my first real script aswell, with a little bit of help from kyle0440.

Oh, forgot to mention, it places a lever than you can use to turn on/off the turtle script.

What saplings are required? Where do we put fuel (What slot?) does it have to have a block under it? Do we need bone meal? We need some more information man :)

#3 aaa

  • Members
  • 53 posts

Posted 21 June 2013 - 05:07 PM

The point of tree farm is to automatically chop wood, and wood is fuel. You sould try or wait for Cain's response, but I guess it automatically refuels (you got to put fuel just the first time)

Edited by aaa, 21 June 2013 - 05:08 PM.


#4 Cain

  • Members
  • 12 posts

Posted 21 June 2013 - 08:25 PM

View PostSWGCryand, on 21 June 2013 - 03:46 PM, said:

View PostCain, on 21 June 2013 - 02:08 PM, said:

Hi everyone, I decided to write my own tree turtle script as the "Ultimate Wood Chopper" was turning out to be a little buggy on my server for some strange reason, anyway.

This script comes with two scripts, one called "treeFarm" and one called "startup".

Use the "treeFarm" script initially to build the base and then you can run startup, be sure the correct items are in there however.

Scripts:
http://pastebin.com/HEpZc2vf
pastebin get HEpZc2vf treeFarm

http://pastebin.com/mhS0Qzzr
pastebin get mhS0Qzzr startup

For the "treeFarm" script, some items must be placed initially into the turtle for it to build with the right resources.
Posted Image


Once the base has been built, you will have 3 chests beside the turtle.

On the left is where the wood goes, on the right is where the saplings go and on the top is where the bonemeal goes, the turtle DOES NOT need Bonemeal to function however you will get wood much faster.

Good luck everyone, and tell me any bugs you come across.

This is my first real script aswell, with a little bit of help from kyle0440.

Oh, forgot to mention, it places a lever than you can use to turn on/off the turtle script.

What saplings are required? Where do we put fuel (What slot?) does it have to have a block under it? Do we need bone meal? We need some more information man :)

Hi, I have tested this only with fir saplings.
You have to put them fuel in initially yourself for the turtle to start working correctly.

(eg: put coal in slot 1, refuel)

It does not require a block under it, and it will stop building the base if there is initially one below it to avoid dupe bases.

Bonemeal is not a requirement.

View Postaaa, on 21 June 2013 - 05:07 PM, said:

The point of tree farm is to automatically chop wood, and wood is fuel. You sould try or wait for Cain's response, but I guess it automatically refuels (you got to put fuel just the first time)

The turtle fuels itself from the wood it chops, but needs some initially for it to start. :)

#5 Cain

  • Members
  • 12 posts

Posted 22 June 2013 - 01:01 PM

Clearly this script is a fail as I haven't gotten any responses, oh well.

#6 Niseg

  • Members
  • 33 posts

Posted 23 June 2013 - 09:14 AM

View PostCain, on 21 June 2013 - 02:08 PM, said:

Hi everyone, I decided to write my own tree turtle script as the "Ultimate Wood Chopper" was turning out to be a little buggy on my server for some strange reason, anyway.


I think Unobtainium fixed his session persistence in UWC but I haven't tested it . I wrote a similar script to his (without the collection setup ) and had the same problems with session persistence and I went all the way to turn the whole script into a state machine. The problem is always using counters and saving them to file. File saves in Computer craft are instant while server saves are not . This causes the script to think it's more ahead than it actually is. Detecting the environment /inventory is always the best option. Unobtainium fixed his script by cutting the bottom first and then cut the tree until it hits an empty block and then cut down the tree until it hits an empty blocks . Without counters UWC should be much more reliable.

After a quick look in your script I found a problem in line 89 where you have an infinite recursion until the tree grows . You can also replace the turtle.forward() with a turtle.detect() and a while loop. I'm still not sure about the tree cutting mechanics and what happens when the server reset.

#7 Cain

  • Members
  • 12 posts

Posted 23 June 2013 - 02:46 PM

View PostNiseg, on 23 June 2013 - 09:14 AM, said:

View PostCain, on 21 June 2013 - 02:08 PM, said:

Hi everyone, I decided to write my own tree turtle script as the "Ultimate Wood Chopper" was turning out to be a little buggy on my server for some strange reason, anyway.


I think Unobtainium fixed his session persistence in UWC but I haven't tested it . I wrote a similar script to his (without the collection setup ) and had the same problems with session persistence and I went all the way to turn the whole script into a state machine. The problem is always using counters and saving them to file. File saves in Computer craft are instant while server saves are not . This causes the script to think it's more ahead than it actually is. Detecting the environment /inventory is always the best option. Unobtainium fixed his script by cutting the bottom first and then cut the tree until it hits an empty block and then cut down the tree until it hits an empty blocks . Without counters UWC should be much more reliable.

After a quick look in your script I found a problem in line 89 where you have an infinite recursion until the tree grows . You can also replace the turtle.forward() with a turtle.detect() and a while loop. I'm still not sure about the tree cutting mechanics and what happens when the server reset.

That problem is not a bug, it's a feature. Also I updated the script to v1.01 to change forward to detect. :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users