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

(Video) Andy Logger Deluxe Felling Turtle! (CC 1.52 Compatible)

Started by Andrakon, 09 April 2013 - 07:47 PM
Andrakon #1
Posted 09 April 2013 - 09:47 PM
Paste this in to your Felling Turtle:
pastebin get HanjL7Mz logger
and type logger to start the program.

If you want your Felling Turtle to restart itself in the event of a server restart or it's chunk unloads paste this code too!
pastebin get nDgxjQas startup


Andy Logger Felling Turtle! - By Andrakon
Version 1.72

1.72 Bug fix
Version 1.71 introduced a bug where the turtle would thing it's slots and output chest were full when they were not. It is now fixed

1.71 Bug workaround
Now works with CC 1.52! Found a work around for a bug in computer craft 1.52 where dropping items from an empty slot drops items from the wrong slot! Also the work around makes dropping off items faster. This is done by checking to see if the slot is empty before trying to drop from it.

1.5 IMPORTANT NEW FEATURE!
Andy Logger can now be made to restart on its own, and if it restarts in the field it will finish chopping its tree and find its way home!
You can do this by renaming the logger program to "startup" or by getting my andy logger startup program with "pastebin get nDgxjQas startup"
  • All settings configurable with a GUI
  • Custom farm sizes, gaps between trees, gaps between turtle and first row, offset first row to the left or right
  • Will build the farm for you
  • Can recover from restarts in the field if startup script is installed or if named startup
  • Knows if fuel usage has been disabled or not automatically!
  • Makes its own charcoal with a furnace (optional)
  • Can be configured to use a Powered Furnace (optional)
  • Picks up saplings from a nearby chest (optional)
  • Drops off excess inventory to another nearby chest (optional)
  • Slots are configurable
  • Time between logging runs is configurable
  • Saves settings to a file
  • Automatically names your turtle, name can be changed within the menu
  • Keeps track of how many saplings are planted, trees felled, and charcoal made
  • Does not use a modem
  • Cuts 1x1 trees only, works great with Forestry bred trees!
  • Can handle farms up to 127 trees!
See it in action!
[media]http://www.youtube.com/watch?v=gFxDsF2Ao5o[/media]

See the code on Pastebin


Layout:


Todo: Rednet

Changelog:
Spoiler1.1: You can now tell it to start the first row to the left or right of the turtle and you can specify how many blocks! You could even do one row 50 blocks to the left or right and it will still find its way home. It now leaves and re-enters from the same block so you could keep the turtle in a house with a 1x1 hole in the wall. And it is backwards compatible with the logger's old config files.

1.2: Fixed a bug where if the user turned off the output chest option the logger program would crash.

1.3: Automatically checks to see if fuel is set to unlimited, does not crash if it is unlimited and the fuel option is not off.

1.4 MAJOR UPDATE!
No longer breaks any saplings when it checks them, no longer wasting saplings or resetting growth times.
This allows for nearly double farming speeds with Forestry trees compared to earlier versions!
NEW MENU ITEM: Powered Furnace! Allows you to replace the regular furnace with a powered one from any mod!
REMOVED MENU ITEM: Use Fuel! If you have fuel disabled for the server your turtle will automatically know!
Reduced times between logging runs by default, re-adjusted the automatic wait time calculation.
If you have an older version then just go into the "Farm Layout" Menu and then back to the main menu to recalculate the wait time

No longer tries to make fuel if the servers fuel setting is off and you didn't change the use furnace setting to off
Some misc. code clean up.

1.5 IMPORTANT NEW FEATURE!
Andy Logger can now be made to restart on its own, and if it restarts in the field it will finish chopping its tree and find its way home!
You can do this by renaming the logger program to "startup" or by getting my andy logger startup program with "pastebin get nDgxjQas startup"


1.6 Cleanup and Reliability Tweaks - UPGRADE HIGHLY RECOMMENDED for auto-restarting turtles!
Made automatic restarting of the turtle in the field vastly more reliable with dozens of minor tweaks. Turtle can usually detect if it ends up in the wrong position unexpectedly after a hard restart in the field and a failed return home. Code cleanup, organization, additional comments, and some optimization. Quit program menu option works properly with automatically restarting turtles now.

1.6.1 Minor update
Changed how the turtle checks for saplings. Tries to detect any block where the sapling is rather than trying to put a dirt block there. May speed things up.

1.6.2 Minor Update
Improved reliability with tree detection in some rare cases, minor upgrade to restart reliability, minor GUI tweak. If one or both of the first two logs of a tree are cut down by something other than the logger, or if the logger ever tried to cut down the first two logs of your trees only, the turtle can now detect if there are still parts of a tree there as long as the 3rd log is still intact. Short version: the logger shouldn't leave your trees hanging by mistake. Also logger checks for blocks in front of it and breaks them before it tries to move forward at all times now instead of just when it was expecting to find something, slightly increases restart reliability in cases where leaves are low hanging.


1.7 Capacity update and Bugfixes
Andy logger can now handle farm sizes of over 64 trees! The current max is 127. You will have to reload the turtle with dirt after the first run, and it will tell you how much it needs. Also it will need to have the same amount of saplings in it as the farms size + 1 after each logging run. Also fixed bugs where the turtle would break the furnace if it restarted while at the home position but facing the wrong direction, or if it was standing on top of the furnace. Commented out old logging code that was made redundant, will remove later. Fixed longstanding bug where the turtle would chop down only the first two logs of the tree, turns out that on some trees the leaves hang low, so on the first run the log slot filled with a sapling before the turtle reached the tree, messing up comparisons. Improved restart reliability again with low hanging leaves. Changed how a few things were done in sapling checking code to reduce unnecessary movements.

1.71 Bug workaround
Now works with CC 1.52! Found a work around for a bug in computer craft 1.52 where dropping items from an empty slot drops items from the wrong slot! Also the work around makes dropping off items faster. This is done by checking to see if the slot is empty before trying to drop from it.


1.72 Bug fix
Version 1.71 introduced a bug where the turtle would thing it's slots and output chest were full when they were not. It is now fixed
superaxander #2
Posted 10 April 2013 - 02:30 AM
Looks good!
unobtanium #3
Posted 10 April 2013 - 02:47 AM
LOL

Well done ^^
Tought about adding such a tree farm into my own tree farm program last days :D/>
superaxander #4
Posted 10 April 2013 - 02:48 AM
LOL
?
Engineer #5
Posted 10 April 2013 - 03:40 AM
This is awesome man. I thought this was your regular tree logger, turns out is the most editable one.

Great job!
Andrakon #6
Posted 10 April 2013 - 09:45 AM
Looks good!
LOL

Well done ^^
Tought about adding such a tree farm into my own tree farm program last days :D/>
This is awesome man. I thought this was your regular tree logger, turns out is the most editable one.

Great job!

Thanks a bunch! With over 1500 lines of code I tried to make it as editable and user friendly as I could! This is actually my first turtle program and I am happy to get feedback on it! I have spent nearly 2 weeks on it trying to make a quality product.
Locrin #7
Posted 11 April 2013 - 01:18 PM
It's not working right for me. it goes around and acts like it is placing dirt and saplings but it's not placing anything.
Andrakon #8
Posted 11 April 2013 - 10:35 PM
It's not working right for me. it goes around and acts like it is placing dirt and saplings but it's not placing anything.

You have to put the resources it asks for in the slots it asks for. If you put the wrong stuff in the wrong slots it won't work. Otherwise I would have no clue what could have caused that behavior. I've been running one for over a week and never had a problem.
Locrin #9
Posted 13 April 2013 - 05:19 AM
I've put everything in the right slots.
spyman68 #10
Posted 13 April 2013 - 05:54 AM
This doesn't work
Andrakon #11
Posted 13 April 2013 - 06:13 AM
Just loaded up a new turtle and did some testing. Found a bug where if you turned the output chest option off the turtle program would crash. Fixed it.
Also realized I had the default number for rowOffset set to 2 when it should have been set to zero.
Turtle program is now v 1.2!

Conclusion: Works Perfectly! :D/>
If you find a bug please tell me the error code and what options you had.
queezle #12
Posted 16 April 2013 - 05:26 AM
Hey, your Program looks awesome! But I got one litte (big?) problem! When I start my Turtle it runs around and trys to place the saplings and dirt. But it wont do it. Then it returns to its base and waits its sleep time and starts over all again without placing its dirt and saplings. No error no nothing. Just burning through all my fuel :-) Maybe you got an idea how to fix that issue?
Andrakon #13
Posted 16 April 2013 - 07:08 AM
Bug fix update
Changelog:
1.3: Automatically checks to see if fuel is set to unlimited, does not crash if it is unlimited and the fuel option is not off.
Andrakon #14
Posted 16 April 2013 - 07:11 AM
Hey, your Program looks awesome! But I got one litte (big?) problem! When I start my Turtle it runs around and trys to place the saplings and dirt. But it wont do it. Then it returns to its base and waits its sleep time and starts over all again without placing its dirt and saplings. No error no nothing. Just burning through all my fuel :-) Maybe you got an idea how to fix that issue?

I have never had that issue so I have no idea how it could happen. I would have to probably have a screenshot of its inventory before it set out to do things to troubleshoot with or something. Did you have everything in the right slots? Did you try breaking the turtle and placing it back down? Sometimes that fixes "Computercraft" glitches that are out of my control.

Also I have no idea if this program works in older versions of computercraft.
queezle #15
Posted 16 April 2013 - 08:27 AM
I think the server im playing on has some problems with the turtles. When I try in lua turtle.place() with a block in the first slot I get a false back. Looks like its not your error ;-)
Andrakon #16
Posted 16 April 2013 - 12:14 PM
I think the server im playing on has some problems with the turtles. When I try in lua turtle.place() with a block in the first slot I get a false back. Looks like its not your error ;-)

Ahh, great! Thank you for letting me know! Sorry that you may not be able to use the turtles right now though. Maybe when your server updates next time it will be better. :)/>
Andrakon #17
Posted 17 April 2013 - 03:29 AM
1.4 Major Update! I took a look at a video of a turtle made by Anonomit and realized they used a much better way to check for saplings! So now instead of the turtle comparing the sapling in its hand to the one on the ground (unreliable), it tries to place a dirt block there instead. If it can then there is no sapling there, so it checks for dirt below it first, then it plants a sapling. Thank you Anonomit for your accidental contribution lol!

With some testing I realized I could get the same ammount of wood in half the time with forestry trees since the logger no longer breaks forestry saplings as it does its logging. So I reduced the base wait between logging runs by 300 seconds and changed the wait time auto calculation to reduce the wait time by 5 seconds per tree instead of 10 seconds per tree.

While I was at it I made the turtle check to see if the server had the fuel off every time the program is run. And realized it would make charcoal if the fuel was off but the use furnace option was still on, so I fixed that too.

And besides some code clean up, I also fixed part of the GUI disappearing if you opened the menu.
queezle #18
Posted 17 April 2013 - 10:20 AM
Its running now and I love it. What happens when I logg off from the server and the chunk gets unloaded? Is it possible that the turtle remembers its state and just continues its work? Because at the moment it looks like I have to start the program every time I log on (or when I move too far away)
Andrakon #19
Posted 17 April 2013 - 03:17 PM
Its running now and I love it. What happens when I logg off from the server and the chunk gets unloaded? Is it possible that the turtle remembers its state and just continues its work? Because at the moment it looks like I have to start the program every time I log on (or when I move too far away)

If the chunk the turtle or computer is in gets unloaded it will stop running and reboot the next time it's chunk is loaded. There are a couple options. The best option is a chunk loader, if your running FTB there are several options, such as a world anchor, or a chickenchunks chunk loader. Another good option is a Misc Peripherals chunk loader upgrade, it also doubles as a modem! Most FTB versions also have Misc Peripherals installed. http://www.computercraft.info/forums2/index.php?/topic/4587-cc15mc147-miscperipherals-31/

However a chunk loader will not help if the server restarts. For this I wrote a small script that will make the turtle run the logger program when it reboots but it does have a small risk. If the turtle reboots while it is out logging it will assume it is at its starting position when it is rebooted. This could cause your turtle to build another farm in in the wrong place if it has bad luck! Most of the time the turtle will be sitting at home so you have probably a 10% chance of this happening.

USE WITH CAUTION!
This will start the logger program automatically if the turtle reboots.

pastebin get nDgxjQas startup
queezle #20
Posted 17 April 2013 - 08:25 PM
Yes, thats what I was looking for <3

I know that austinKK has such a funktion in his turtle-quarry too. I tried to look into his code ( http://pastebin.com/3mkeUzby , http://www.computerc...tle-ore-quarry/ ) and he writes his positions into a file and loads it from there when the turtle reboots. I havent done a lot of programming yet with the turtles, so im not sure if this is possible what I am thinking. But maybe, the turtle can remember where the base is (with coordinates) and writes it into a file. Then, everytime it reboots and the startup is done, it checks his actual possition (this is the part I'm not sure with ;-) ) and checks if it is his base. If not, navigate back to base and go back to his normal program. If it is already in base, well, nothing happens.
Just an idea and maybe you like it :-)

*edit* btw, Im asking for this because I dont want to use chunkloaders. On a multiplayer server it can produce a lot of lag if you have too much of them :-(
Andrakon #21
Posted 17 April 2013 - 10:13 PM
That is a great idea! But it may be a few days before I implement it. :)/>
unobtanium #22
Posted 18 April 2013 - 04:34 AM
Implementing an reload functions is difficulty to set up if your program is allready running and finished. I realized this with my own one and it is more tricky if the turtle just dont have to dig and make other things too.

Chunkloaders just produce a lot of lag if it is set on a large amount of chunks and if a lot of entities are in it.
Andrakon #23
Posted 19 April 2013 - 03:24 AM
Totally did it! Just the idea of it from your discription of it did the trick queezle! Thank you very much! :D/>

New in 1.5
Andy Logger now writes its local coordinates and facing in a file called "loggercords.dat". It writes every time it moves or turns. Fortunately this does not slow down the turtle any. So if the logger wakes up in the wrong position or facing it will finish chopping down its tree if it is in one and will find its way home. This goes along with a new startup program that if you download it, the turtle will automatically restart the logger program if it ever reboots due to chunk unloading or server restarts. The turtle will not resume its program from the middle but will put itself back in its starting position and start from the beginning. The turtle can also tell if it was broken wile out in the field and placed back to its starting position by hand. This way if you wanted to move it to another farm or something you do not need to delete loggercords.dat to reset its coordinates. The way it checks for this is, it looks in the first log slot, if it is empty then it assumes you broke the turtle and placed it back at its starting position. This assumes you do not put logs back into the turtle when you set it up. I never do.
queezle #24
Posted 19 April 2013 - 04:41 AM
You sir, are awesome <3 :)/>
Andrakon #25
Posted 19 April 2013 - 04:50 AM
Do not be alarmed if the turtle breaks the bottom block of some trees or saplings on its way back home. It will fix all that on its next pass.

You sir, are awesome <3 :)/>

Aww, thank you very much! :D/> I put a lot of work into my turtle so it works hard for you!
Andrakon #26
Posted 19 April 2013 - 08:14 PM
6 hours of code cleanup, optimization, organization, tweaks, and mostly additional comments later…
I FINALLY have this enormous monstrosity in a relatively readable and more importantly much more maintainable state!
Its at 1935 lines of code! :lol:/>

Anyway, I spent quite a long time implementing a much more reliable recovery from an unexpected unloading of the turtles chunks, and resulting reboot! This required several tweaks to the movement code and coordinate tracking system, as well as a small but apparently very important change in the logging section. The turtle now digs the logs out before trying to move into them, instead of failing to move into the log, and then digging them out. And it records the new coordinates and facings just before moving instead of just afterwards. This sounds simple enough but I lost a couple hours just trying to debug the coordinate code when my turtle decided to dig itself a hole and tunnel 600 blocks away while I wasn't looking, twice! XD I assure you it is fixed lol! I probably had it auto-reboot 50 times with me just trying to get it to mess up!
unobtanium #27
Posted 19 April 2013 - 08:22 PM
I know this feeling to have something epic done, but nobody accually sees it :D/>
I really have to get into this stuff myself to improve the persistent of my program. Unless CC has no automatic session permission it is a huge feature to have a reboot one :D/>
WELL DONE!
SuicidalSTDz #28
Posted 19 April 2013 - 08:39 PM
This has evolved greatly since I last laid eyes upon it. I am astonished by the amount of dedication you show in your work. Good job
Andrakon #29
Posted 19 April 2013 - 09:04 PM
Thank you very much Unobtanium and SuicidalSTDz! :D/> It was a labor of love <3 And fun!

If you want to look around in the code or borrow some feel free to do so! Most of the persistence related code is near the top in the Coordinate Handling Section. (line 114)
And the all important writing of the coordinates is in the movement section. (line 1093)

To be honest my basic persistence isn't too complicated. I keep track of x,y,z, and facing (1,2,3,or 4), and write them in their own file as close to the movement command as possible, but making sure the path is clear before moving the turtle. If the turtle reboots, it checks to see if the coordinates on file are 0,0,0,1. If not then it finishes chopping its tree if it detects one and finds its way home with what ever coordinates it has on file. Once it is back home and in the right direction it checks to see if it has its furnace or chests beside it. If not then it turns the program off and will not start it back up unless someone breaks it and places it again, even if it gets rebooted several times. If someone broke it while it was out logging it can usually tell, and will reset its coordinates when it gets placed back down again. Before moving the save coordinate commands to before the moving code it would sometimes be a block off. But by ensuring its path is clear before it tries to move, and putting the save coordinate command just before the move command, I can't even get it to screw up now if I try! XD
Andrakon #30
Posted 19 April 2013 - 09:08 PM
Actually there is one small bug I probably can't fix dealing with how it checks to see if someone broke it or not. If it reboots before it has picked up any logs it will assume it is at its home base when it reboots. I could use a "Have I been broken since I last ran?" turtle command if one existed LOL!
unobtanium #31
Posted 20 April 2013 - 01:18 AM
If the turtle gets "destroyed" and you place it again, it wont has the programs you downloaded over pastebin anymore. For saving the program even if the turtle gets destroyed, you have to put it in the turtle folder in CC/rom and so on. Then every (!) turtle has this program as a persistent program. But i still think that the variables are gone.
Did you tested this allready or do you just assuming? :D/>
SuicidalSTDz #32
Posted 20 April 2013 - 01:28 AM
Check if the turtle has a label, if not then set one. Then store all variables in a file every time it moves.
unobtanium #33
Posted 20 April 2013 - 02:29 AM
So a label gives the turtle a own folder to save the variables in it?
SuicidalSTDz #34
Posted 20 April 2013 - 08:53 AM
A label will allow the user to break the turtle, it keeps the programs and files as well. A file can contain variables no matter what. We just want to make sure we set a label before making a new file.
unobtanium #35
Posted 20 April 2013 - 09:14 AM
Wow. I didnt knew that O_o
Thanks dude :D/>
SuicidalSTDz #36
Posted 20 April 2013 - 09:55 AM
defaultLabel = "default"
if not os.getComputerLabel() then
 os.setComputerLabel(default)
end

This checks if the computer/turtle is labeled. If not, it labels it with a default label.
Andrakon #37
Posted 22 April 2013 - 02:44 AM
1.6.1 Minor update: Changed how the turtle checks for saplings. Tries to detect any block where the sapling is rather than trying to put a dirt block there. May speed things up.
unobtanium #38
Posted 22 April 2013 - 04:52 AM
Do all saplings act like a block? Even those out of other mods?
SuicidalSTDz #39
Posted 22 April 2013 - 05:11 AM
Yes, they surely are not an entity. They just have a smaller hit-box than other blocks. The mushrooms and flowers are also blocks with smaller hit-boxes.
unobtanium #40
Posted 22 April 2013 - 05:20 AM
What happens if the turtle thinks that there is a saplings but instead it is a wood block?
Andrakon #41
Posted 22 April 2013 - 05:44 AM
Under normal circumstances this will not happen. The turtle moves to the tree, checks to see if there is a tree in front of it, and if not then looks for a sapling. So if a tree grew it chops it down completely and replants a sapling in the process. This could get messed up with player intervention though. If a player chops down the second block of a tree then the turtle will forever skip by the tree thinking there is a sapling there… Though it would be easy for me to fix that. Note to self: fix that. XD
Andrakon #42
Posted 22 April 2013 - 06:17 AM
1.6.2 Minor Update
Improved reliability with tree detection in some rare cases. If one or both of the first two logs of a tree are cut down by something other than the logger, or if the logger ever tried to cut down the first two logs of your trees only, the turtle can now detect if there are still parts of a tree there as long as the 3rd log is still intact. Short version: the logger shouldn't leave your trees hanging by mistake.

Really this is normally a rare thing that shouldn't happen on its own, but sometimes the logger would cut down just the bottom two logs and ignore the rest of the tree as if the block detection failed. Also now that the sapling checking code now cuts down trees, the tree chopping code is redundant. May as well leave it in there for now encase one of them fails.
Andrakon #43
Posted 22 April 2013 - 04:52 PM
1.7 Capacity update and Bugfixes
Andy logger can now handle farm sizes of over 64 trees! The current max is 127. You will have to reload the turtle with dirt after the first run, and it will tell you how much it needs. Also it will need to have the same amount of saplings in it as the farms size + 1 after each logging run. Also fixed bugs where the turtle would break the furnace if it restarted while at the home position but facing the wrong direction, or if it was standing on top of the furnace. Commented out old logging code that was made redundant, will remove later. Fixed longstanding bug where the turtle would chop down only the first two logs of the tree, turns out that on some trees the leaves hang low, so on the first run the log slot filled with a sapling before the turtle reached the tree, messing up comparisons. Improved restart reliability again with low hanging leaves. Changed how a few things were done in sapling checking code to reduce unnecessary movements.
unobtanium #44
Posted 22 April 2013 - 07:59 PM
I had the same problem with the turlte.detectUp() because there might be leafs (leafes?) above and the turtle would think that there is a tree unfinished. What did you have dont with it now?
Fix getting saplings into the wood slot: If you select the sapling slot it will put the saplings in it and the wood blocks in the next (empty) inventory slot. If you are having dirt in slot 1 and saplings in 2 and wood goes into 3-16, you just have to select slot 2 and the turtle will fill up 3-16 with wood. This just requires at least one spapling in slot 2 otherwise wood goes in it :D/>
Andrakon #45
Posted 23 April 2013 - 03:01 AM
The turtle still uses turtle.compareUp() when looking for logs. It turns out the bug was not fixed in 1.6.2 Minor Update because the true bug was the sapling getting in the log slot messing up comparisons. I had to test with spruce to find that. 1.6.2 I thought the bug was fixed because I made the turtle look for a log even if it had not initially detected a tree.
unobtanium #46
Posted 23 April 2013 - 06:31 AM
Never mind^^ I am having the problem that i cant use turtle.compare() because the fir wood blocks are four different ones, but just one gets dropped. These four blocks create a nice inner tree without single wood blocks like the jungle tree has. This is why i have to dig trough some leafs as well, and these can drop saplings, so i needed them out of my way and not in the wood slots.
Keep posting on this thread! I really want it to become a "hot" thread, because this program is really well done and awesome ^^
SWGCryand #47
Posted 03 May 2013 - 08:14 PM
For whatever reason, I can't get the turtle to replant saplings? I have a felling turtle with a ruby axe attached. Here's a screen shot of my lil friend named "Bill2"
SWGCryand #48
Posted 03 May 2013 - 11:40 PM
Any help? D:
Andrakon #49
Posted 04 May 2013 - 05:11 PM
Usually that has to do with server permissions, the server isn't quite set up right. I have not ran into the problem myself so I am unsure of how to fix it myself.
Angry_AGAIN #50
Posted 06 May 2013 - 10:17 AM
Great work really - works fine
But i got a annoying problem with it.
Everytime i set "dropoff chest" true it drops his whole inventory - Saplings, Charcole, Dirt.
Andrakon #51
Posted 06 May 2013 - 11:34 AM
That's just weird, I would suggest restarting minecraft, or if your on a server, restart the server. I have never had that problem. Question though, any idea what version of Computer craft you are using? Maybe they changed something in a new version.

EDIT:
I did some research and it is a bug in computercraft version 1.52 and is already fixed in the next release… whenever that is. I wrote the program in version 1.5 but new bugs came up in 1.52 that broke it slightly. Im sure it will work in version 1.53 :)/>
Here is a relevant thread:
http://www.computercraft.info/forums2/index.php?/topic/11793-issue-that-i-cant-figure-out-with-drop/
Andrakon #52
Posted 06 May 2013 - 11:57 AM
Updated to version 1.71!

Now works with CC 1.52! Found a work around for a bug in computer craft 1.52 where dropping items from an empty slot drops items from the wrong slot! Also the work around makes droping off items faster. This is done by checking to see if the slot is empty before trying to drop from it.

Basically I added "if turtle.getItemCount(cnt) > 0 then" in there somewhere before the drop command.
RedRyder #53
Posted 07 May 2013 - 01:08 AM
Ok. Heres my problem- I setup a tree farm succesfully, but when the turtle goes back out the second time to cut trees and plant saplings, It simply just cuts through the block, and goes right along. Doesnt try to plant a sapling, and doesnt try to actually cut the whole tree down. It just moves along that plane for the whole entire farm. I used a mining turtle, since it can break everything, but Im not sure if thats the problem or if it is something else.

I did this on Feed The Beast
Andrakon #54
Posted 07 May 2013 - 01:57 PM
Make sure there is a log of the type of tree you are chopping down in the second slot. Sometimes if something else gets in that slot the logger won't chop the whole tree. If this isn't the problem then it is likely some sort of Computer craft bug where it does not successfully compare the log in its hand to the tree, I recommend breaking the turtle and setting it up again. And restarting the client or server. Also make sure you have the newest version of my logging program, I have done a lot to fix this problem in recent versions. :)/>
LazyNub #55
Posted 08 May 2013 - 12:57 PM
Ack, logger broke for me today.
ftb ultimate 1.4.7

Says the output chest is full..

I pulled the old version out of my saves files and posted it to pastebin as a temp fix for those in my situation.

Andy Logger 1.7

pastebin get HJPFUHjN logger
Andrakon #56
Posted 08 May 2013 - 11:08 PM
Ahh thanks a bunch LazyNub! I am glad you found this bug! Also a backup of the previous version is a nice thing to have.

I was a lazy nub and didn't bother to test the last version to see if it worked properly. :P/>
It is now fixed, there was a problem in the code that checked for free space. All I had to do was move it out of an "if" statement that it should not have been in.

Now version 1.72! :D/>
LazyNub #57
Posted 10 May 2013 - 01:49 PM
Awesome!

Thank you for the quick fix!

Now back to having my turtles build my empire of logs!
LazyNub #58
Posted 13 May 2013 - 07:46 PM
I thought some here may benefit from this program.

It builds a smallish tree farm (4x4) for you. With Andy Logger and this builder program

I can have a new 16 tree farm up and running within 8 mins flat.

https://www.youtube.com/watch?v=zpeWqMqDUmg&amp;feature=youtu.be

pastebin get TLtNV36k buildfarm

Thanks again Andrakon for the great log farm!
aliem #59
Posted 15 May 2013 - 05:51 PM
I have a little list of changes to the code (mainly optimizations)
the huge and hugly nested ifs can be reduced to one:

 function refillSaplings() 


if		  cnt ~= logSlot
    and cnt ~= fuelSlot1
    and cnt ~= fuelSlot2
    and cnt ~= saplingSlot1
    and cnt ~= saplingSlot2
    and cnt ~= dirtSlot then
  turtle.transferTo(cnt, 64)
end

 if checkfuelSlot2 < turtle.getItemCount(fuelSlot2) 
is not exactly useful, unless there is a glitch with turtle.suck() or drop()

Currently there seem to be a bug (or a new behaviour) in CC v1.52, calling turtle.transferTo() will select the next filled slot (charcoal for example) and move it around. Here a simple fix:


if not turtle.compareTo(saplingSlot1)
  and turtle.getItemCount(saplingSlot2) > 0 then
for cnt=1, 16 do
  if    cnt ~= logSlot
    and cnt ~= fuelSlot1
    and cnt ~= fuelSlot2
    and cnt ~= saplingSlot1
    and cnt ~= saplingSlot2
    and cnt ~= dirtSlot then
   turtle.transferTo(cnt, 64)
   if turtle.getItemCount(saplingSlot2) == 0 then
    break
   end
  end
end
end

I've briefly tested it, so … it will need more testing
Flipz #60
Posted 28 May 2013 - 05:44 PM
I love this program, but I have one minor nitpick: if used with an Iron Furnace (from IndustrialCraft 2), each coal or charcoal fuel can power up to 10 operations in the furnace instead of 8 for a vanilla furnace, meaning the current fuel creation program wastes 20% of the potential of each charcoal it uses. I tried to edit the program to accommodate this change, but when I changed the code in the charcoal production section, ComputerCraft was unable to save the changes and I ended up having to re-download the existing code. Is there any chance an option to configure how many logs per charcoal can be added, rather than assuming the 8 logs to 1 charcoal ratio?
SyberSmoke #61
Posted 12 June 2013 - 03:17 PM
I like this logger program. It is a good counter point to Ultimate Wood Chopper because it can handle most strait trees. One thing though I would like a better way to swap tree types. Or to may be have a tree type rotation.

Swapping could be as simple as a command that resets the tree info so placing a new sapling into slot ten would result in that type being used and the other being stored. While rotation would be interesting if you could use slot 10-## and have say three or four types of sapling and every few runs it will plant the next one in the rotation.

Other wise excellent.
SyberSmoke #62
Posted 12 June 2013 - 06:06 PM
Bug Report:
Program: Andy Logger
FTB Pack: New Worlds
Issue: Andy Logger does not cut down Spruce Trees

When Using Spruce trees, Andy Logger will cut through them instead of chopping down the tree in it's normal pattern of through, down, plant, then chop up.
LazyNub #63
Posted 13 June 2013 - 06:23 AM
Nearly everytime this has happened to me it's because the log in slot 2 or 3 was not of the same type as the tree I was wishing to chop down.

Easiest way to change tree types I have found is to remove old wood and saps from turtle place new saps and a piece of new wood in turtle. Let it run once and then go through and kill all old planted saplings so they are replanted.
SyberSmoke #64
Posted 14 June 2013 - 04:20 PM
Yeah after a while I figured that one out. It is kind of why I suggested a command allowing the program to swap trees. :-)
Arbitrary #65
Posted 14 June 2013 - 10:37 PM
I'm having a lot of fun with this program. Thanks!
Xenic #66
Posted 16 June 2013 - 04:51 PM
I am basically having an issue where it is only cutting 1 log from each tree its the log a block above where the sappling would typically go
Steven McWayne #67
Posted 22 June 2013 - 02:56 PM
This mostly happens somehow if it has 64 saplings in a sapling slot or even 128 in both. Happens not as much then in earlier versions though.
mistresselara #68
Posted 24 July 2013 - 05:58 AM
I've been running this lovely little program for a while now, at some point with a 8x8 farm. I have it now on FTB Unleashed and just went from 4x4 to 5x5 and on the first pass over the layout it stopped with this error:
logger:132: bad argument #1: value expected

Any help?
jameseck #69
Posted 03 August 2013 - 04:03 AM
Hi there,

Love the program, but I'm experiencing a weird bug.

I believe it happens when the server is restarted.

Basically, the turtle seems to get confused about which direction the tree farm is in and creates another farm at 90 degrees to the right of where it should be.

I'm using this on a Big Dig 1.3.9 server which is running minecraft 1.5.2.

Has anyone else experienced this?
saladin1980 #70
Posted 07 August 2013 - 11:46 PM
Also this is a great system for the 1x1 trees just want to say if you do use it for rubber wood tree (sapling id 626) make sure you don't use furnace and use another means to power turtle:( as I found out hard way that it does not make charcoal in furnace:) BUT otherwise this system is great I use it in conjuction with other tree farm program .. just the best .. rednet would be great option to control it or have status sent back to a main computer would be amazing not controlling so much as just status sent to it.. :)/>
Kattalassien #71
Posted 16 August 2013 - 08:48 PM
Hey, my turtle isn't automatically making charcoal since the new update I tried it on a test world as well.
agentx4371 #72
Posted 17 August 2013 - 07:58 AM
for some reason when i type it in the turtle it comes up no such program
rowas #73
Posted 20 August 2013 - 12:11 AM
Okay, so I'm having an issue. I fueled the turtle as required with two chests on both sides and a furnace on top, put in the required dirt and saplings. But that's when the turtle checks for fuel and says it needs "4.2 fuel before it can go logging". Makes no sense.
I put in the fuel in the slots it asks for but nothing happens. I picked it up and tried again. Same thing. I downloaded a fresh copy, same thing.

Why is this happening? Does anyone else have this issue?
Phoenix #74
Posted 20 August 2013 - 03:41 AM
That's pretty cool…
splitfiretj #75
Posted 02 September 2013 - 12:21 PM
My turtle just won't make charcoal. It's a 4 x 4 spruce tree farm and it collects the wood fine, the saplings are getting sucked to the sapling furnace fine, it chops down the tree's fine, furnace is set to true in the menu and there is a furnace above it. please help :(/>
Klypto #76
Posted 03 September 2013 - 11:17 AM
I also had issues using a standard furnace as it wouldn't put fuel in the furnace. The turtle simply wouldn't make charcoal (but I do believe it did take some that I manually made out).

It seems to work fine with an electrical furnace powered by solar though.
zanskrila #77
Posted 04 September 2013 - 10:36 AM
Ran this program a couple of times and it almost never failed (unless i messed something up)!
splitfiretj #78
Posted 05 September 2013 - 08:52 PM
I was just looking through the code and referencing the api and found this
Before Minecraft 1.5/ComputerCraft 1.51, dropUp would load the bottom (fuel) slot for furnaces, since the hopper-related changes, fuel is loaded into the sides, and the output slot is available on the bottom (using turtle.suckUp)

I assume that this means the turtle will need to drop fuel for the furnace on the side of the furnace. I will be testing some fixes tonight and will keep the post updated if I have a fix.
kreezxil #79
Posted 06 September 2013 - 01:53 PM
Will this program cut down super massive trees like the kinds you find Natura, Biomes O'Plenty and Twilight Forest? I thinking of the redwood or general sherman trees in particular.
daman4567 #80
Posted 11 September 2013 - 08:43 AM
the program doesnt seem to make charcoal correctly with a regular furnace
edit: because the fuel slot and output slot sides switched with the addition of hoppers, the turtle sucks out the fuel before the charcoal is made.
SuperZorro #81
Posted 13 September 2013 - 07:01 AM
the program doesnt seem to make charcoal correctly with a regular furnace
edit: because the fuel slot and output slot sides switched with the addition of hoppers, the turtle sucks out the fuel before the charcoal is made.

I've been noticing this as well. Was wondering what was going on… Does it work in the iron or electric furnace?
daman4567 #82
Posted 13 September 2013 - 07:32 AM
the program doesnt seem to make charcoal correctly with a regular furnace
edit: because the fuel slot and output slot sides switched with the addition of hoppers, the turtle sucks out the fuel before the charcoal is made.

I've been noticing this as well. Was wondering what was going on… Does it work in the iron or electric furnace?

it might, depending on if the writers of the mods they are in have changed their input and output sides to work with hoppers.
daman4567 #83
Posted 20 September 2013 - 02:36 PM
it gets stuck on trying to remember, when it's really just frozen
DrakeAedus #84
Posted 04 October 2013 - 08:21 PM
– 05 Oct 2013 by DrakeAedus
– Minor modification made to furnaceCheck() and makeCharcoal() to support
– the new furnace sided inventory for fuel input and item removal

http://pastebin.com/mz6i3mk4

– Had to fix the movements around the furnace when there were not enough logs to cook into charcoal.
Edited on 05 October 2013 - 07:17 AM
TheEvilSocks #85
Posted 05 October 2013 - 06:18 PM
Not sure if this has been stated before, but the turtle does not fuel the furnace. Am I doing something wrong or is it not implemented (yet)?
Sorcelator #86
Posted 05 October 2013 - 10:09 PM
So I've been playing around with Andy Logger for a day or so, and I wanted to configure my turtle so that it charged via EU with a Solar Panel. However, it seems that the logger does not want to leave even if it has more fuel then the required amount. It seems to check for the amount of charcoal in the fuel slot instead of read its actual fuel level. I checked the code, and that doesn't appear to be true.

Could I be mistaken? I shouldn't have to change any of the code to get it to work with the charge station correct?

EDIT
It looks like it actually does only check the amount of charcoal in the inventory. That seems odd to me. I'll see if I can modify this to check the actual fuel level instead of how much coal it has.

DOUBLE EDIT
So I found the offending code and traced it back to where it runs. If you want to make the same change that I did you should find this in the code

parallel.waitForAny(fuel, wakeUp) -- don't leave without fuel

and this


  parallel.waitForAny(someFuel, wakeUp) -- make sure you have enough too!
  if gotosettings == true then
   settings()
  end

and replace it with this

if turtle.getFuelLevel() < minFuel then
parallel.waitForAny(fuel, wakeUp) -- don't leave without fuel
end

and this


if turtle.getFuelLevel() < minFuel then
  parallel.waitForAny(someFuel, wakeUp) -- make sure you have enough too!
  if gotosettings == true then
   settings()
  end
end

respectively

also look for all instances of the fuel() function and put the same If condition around it except that it should be == 0. This will stop the turtle from failing to finish its run even though it has enough fuel to do so.

if turtle.getFuelLevel() == 0
fuel()
end

Now, before it runs the complicated methods for checking if it has fuel and if it needs fuel, it checks if it even has enough fuel to do its job. If it does, it skips the whole refuel process and just moves on its way.
HeffeD #87
Posted 08 October 2013 - 07:18 PM
Not sure if this has been stated before, but the turtle does not fuel the furnace. Am I doing something wrong or is it not implemented (yet)?

You're not doing anything wrong. This script was written before hoppers were added to the game. When hoppers were added, the sides that you need to insert items into furnaces have changed, so the turtle no longer interfaces with the furnace properly in this script.

Although I haven't tried his changes, the user DrakeAedus has edited the script to allow for the changes.
http://www.computercraft.info/forums2/index.php?/topic/11990-video-andy-logger-deluxe-felling-turtle-cc-152-compatible/page__view__findpost__p__147863
raf5591 #88
Posted 04 February 2014 - 04:34 PM
Hey Clue!
So I've been using AndyLogger for a while now, and all the sudden i'm getting this shenanigans.
The logger plants them first time around, but when it goes to harvest, it just cuts out the 2nd block and keeps on running. Any insight?

Here's a Picture of the issue in question:
http://imgur.com/6xst0Uv
Zeek21 #89
Posted 09 March 2014 - 03:50 AM
Hey Raf5591 are there different types of wood used in the farm or only one? From the looks of it. you managed to confuse it by having different types of wood. if i remember correctly there should only be one type of wood which should be in slot 2 right next to the saplings.
Rexey #90
Posted 15 May 2014 - 05:37 AM
a bonemeal option?
andersand #91
Posted 18 January 2015 - 10:21 PM
Great work!

This logger program still works perfectly with version 1.7.10 of minecraft.

On a side note, if you for some reason can't find ice to propel your saplings to a hopper->chest->buildcraft pipe, you can just create a steep enough slope towards the middle under the tree farm like so:




Where the row outlined in pink in the bottom is a "hopper pipe". I have hidden the buildcraft pipes under there, it comes up below the chest. Using stairs or not for the slopes I think is optional, however I added stairs to the two rows adjacent to the hopper pipe as that worked well. The small house is where I access the room below the hoppers.

For those new to buildcraft your video may be a bit brief (in regards to the fully automated part) but I guess part of the fun comes from figuring some parts out yourself :-)
xMineor #92
Posted 27 August 2016 - 09:13 PM
someone plz help!
the turtel dig only one block of the tree and move on to the next tree and do the samething
im not god at programing so can someone that is help me?