ComputerCraft Program Documentation

I've written some awesome programs for my ComputerCraft Turtles, and wanted to share them with whoever might be interested! So if you are interested, you can download them here! They're provided as-is, I don't think I have any real significant comments in the code, but functionality, use and purpose is explained below for each program! Usually all you need to do is change some of the program's global variables near the top of each file to tweak it to your liking. I'll work on a more accessible and easier to use version of these programs at some point!

In the meantime, here is a brief summary of what each program does, and how to use it:

Program: Startup
Description
Variables
  1. programs: A string array of the list of program names to copy. Defaults are: "Tunneler", "TunnelBuilder", "RoomDigger", "LumberJackV3", "RailLayerV2", "SurfaceLayer", "f", "b", "u", "d", "l" & "r".

Program: f / b / u / d / l / r
Description
Arguments
  1. distance (Optional): The distance to move in the corresponding direction. Must be an integer value representing a distance in terms of blocks / metres. (Default: 1)
Variables
  1. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)
  2. removeObstacles: Determines whether or not the turtles should remove blocks it encounters while moving to its destination. (Default: false)

Program: RoomDigger
Description
Variables
  1. depth / width / height: The depth / width / height of the room to dig. (Default: 16x16x4)
  2. returnTurtle: Determines if the turtle should return to its initial starting location or not. (Default: true)
  3. removeObstacles: Determines if the turtle should remove any unexpected obstacles it encounters (ie. sand / gravel) while digging the room. (Default: true)
  4. roomDirection: Determines if the turtle should dig up or down. Options are directionUp (Default) / directionDown.

Program: SurfaceLayer
Description
Variables
  1. mode: Determines whether the turtle should move forward and right to determine the dimensions of the room based on the distance to the first block it collides with (dynamic), or if it should use the hard-coded values to specify the dimensions of the surface (static). Options are modeDynamic (Default) / modeStatic.
  2. surfaceType: Determines whether the turtle should place blocks above or below it. Options are surfaceFloor (Default) / surfaceCeiling.
  3. replaceBlocks: Determines if the turtle should replace blocks already in place on the corresponding surface or leave them. (Default: true)
  4. removeObstacles: Determines if the turtle should remove unexpected obstacles while placing its surface (ie. sand / gravel). (Default: true)
  5. returnTurtle: Determines if the turtle should return to its initial starting location or not. (Default: true)
  6. depth / width: The depth / width of the surface to lay (only used if in static mode). (Default: 0)
  7. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)
  8. currentSlot: The first slot to consume building materials from for laying the surface. It increments to the right and downwards to find more materials. (Default: 2)

Program: LumberJackV3
Description
Variables
  1. mode: Determines if the lumber bot is operating in normal or legacy redwood mode. It used to be used to cut down 2x2 redwood trees in Feed the Beast, should still work but I haven't tested it in some time. Options are modeNormal (Default) / modeRedwood.
  2. plantSaplings: Determines if the lumber bot should plant saplings in place of the trees it harvests or not, so that they can regrow. (Default: true)
  3. farmWidth / farmDepth: The number of trees making up the front / length of the tree farm. (Default: 8x8)
  4. maxHeight: The maximum height to cut upwards. This prevents the turtle from digging to the surface of the map if you have an underground tree farm! (Default: 12)
  5. useFarmOffset: Determines if the turtle should use the specified tree farm offsets to navigate to the tree farm or not. I don't think this works in redwood mode. (Default: false)
  6. farmOffsetWidth / farmOffsetDepth / farmOffsetHeight: The offset that the tree farm starts at relative to where the turtle starts / finishes at (ie. the front left corner in front of a tree). Currently hard-coded for my purposes, you will need to change this. (Default: -21, 3, 3)
  7. redwoodTreeSpacing: Determines the distance in blocks / metres between redwood trees. (Default: 10)
  8. normalTreeSpacing: The distance in blocks / metres between regular trees / saplings in a normal tree farm. (Default: 6)
  9. removeObstacles: Determines if unexpected obstacles should be removed while cutting down trees (ie. from endermen). (Default: false)
  10. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)

Program: Tunneler
Description
Variables
  1. length / height: The length / height of the tunnel to dig. (Default: 128x2)
  2. returnTurtle: Determines if the turtle should return to its initial starting location or not. (Default: true)
  3. torchSpacing: The distance in blocks / metres between torches. (Default: 8)
  4. torchMode: Determines which side of the tunnel torches should be placed on. Options: torchDisabled / torchRight (Default) / torchLeft / torchBothSides)
  5. removeObstacles: Determines if unexpected obstacles (ie. sand / gravel) should be removed or not. (Default: true)
  6. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)

Program: TunnelBuilder
Description: A program which is used for filling in holes in tunnels, works in conjunction with the Tunneler program. You must specify the length and height of the tunnel to be filled, as well as which surfaces to be filled in with the wall mode, ceiling and floor variables. Material slots are also customized using their corresponding variables. The turtle will also return to its initial position unless otherwise specified with the return turtle variable.
Variables
  1. length / height: The length / height of the tunnel to build. (Default: 16x2)
  2. wallMode: Determines which walls should be placed. Options: wallModeDisabled / wallModeRight / wallModeLeft / wallModeBoth (Default).
  3. floor / ceiling: Determines if the ceiling / floor should be placed or not. (Defaults: true / true))
  4. returnTurtle: Determines if the turtle should return to its initial starting location or not. (Default: true)
  5. removeObstacles: Determines if unexpected obstacles (ie. sand / gravel) should be removed or not. (Default: true)
  6. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)
  7. leftWallMaterialSlot / rightWallMaterialSlot: The slot containing the material to be used for the left / right wall. (Defaults: 2 / 3)
  8. floorMaterialSlot / ceilingMaterialSlot: The slot containing the material to be used for the floor / ceiling. (Defaults: 4 / 5)

Program: RailLayerV2
Description
Variables
  1. mode: Determines whether the turtle should move forward until it encounters a wall to determine the length of track to be placed (dynamic) or of it should use the length variable value instead (static). Options are modeDynamic (Default) / modeStatic.
  2. length: The length in blocks / metres of the minecart track to be laid. Only used in static mode. (Default: 256)
  3. boosterSpacing: The distance in blocks / metres between the center of each 3-long minecart booster. (Default: 32)
  4. fuelSlot: The slot designated to hold fuel (coal / charcoal / etc.) to power the turtle. (Default: 1)
  5. materialSlot: The slot designated to hold building materials for filling in empty space. (Default: 2)
  6. torchSlot: The slot designated to hold redstone torches for powering the powered rails. (Default: 3)
  7. poweredRailSlot: The slot designated to hold powered rails. (Default: 4)
  8. railSlot: The slot designated to hold regular minecart rails. Each slot after this is assumed to contain a sufficient amount of additional minecart rails. (Default: 5)
  9. turtleElevated: Determines if the turtle should automatically elevate itself up one block or not so that it can place the track below it. (Default: true)
  10. placeMaterialAroundTorches: Determines if the turtle should place blocks around the spot that would hold the redstone torch or not, to prevent water or lava from removing / destroying the torch. (Default: true)
  11. placeMaterialUnderRail: Determines if the turtle should fill in empty gaps where minecart rails would otherwise not be able to be placed while putting down track. (Default: true)
  12. removeObstacles: Determines if unexpected obstacles (ie. sand / gravel) should be removed or not while laying rails. (Default: true)
  13. returnTurtle: Determines if the turtle should return to its initial starting location or not. (Default: true)

Program: FrameQuarry
Description
Commands
  1. frame forward # / frame back #: Moves the frame forward / back the specified number of blocks / metres. NOTE: Do not move while the drill platform is extended.
  2. frame left # / frame right #: Moves the frame left / right the specified number of blocks / metres. NOTE: Do not move while the drill platform is extended.
  3. frame up # / frame down #: Moves the frame up the specified number of blocks / metres. NOTE: Do not move while the drill platform is extended.
  4. frame extend # / frame retract #: Extends / rectracts the drill platform the specified number of blocks / metres. NOTE: The platform does not automatically mine as it extends.
  5. frame mine: Activates the array of block breakers on the bottom of the drill platform.
Variables
  1. mode: The mode that the program is operating in. Options are modeLocal (Default) / modeRemote.
  2. yInitial: The current height (or y value) that the computer is at. Needs to be set & updated manually between sessions.
  3. bedrockLevel: The height (or y value) that bedrock starts at. (Default: 5)
  4. xOffset / yOffset / zOffset: The distance on the x / y / z axis of the computer from the front center of the frame.
  5. frameWidth: The width of the frame. (Default: 17)
  6. frameDepth: The depth of the frame. (Default: 17)
  7. frameHeight: The height of the frame (excluding drill platform). (Default: 10)
  8. wireForward: Wire colour for moving forwards. (Default: colors.red)
  9. wireBack: Wire colour for moving backwards. (Default: colors.orange)
  10. wireLeft: Wire colour for moving left. (Default: colors.yellow)
  11. wireRight: Wire colour for moving right. (Default: colors.lime)
  12. wireUp: Wire colour for moving up. (Default: colors.green)
  13. wireDown: Wire colour for moving down. (Default: colors.cyan)
  14. wireExtend: Wire colour for extending the drill platform. (Default: colors.lightBlue)
  15. wireRetract: Wire colour for retracting the drill platform. (Default: colors.blue)
  16. wireDeploy: Wire colour for deploying redstone tube frames for the extending drill platform. (Default: colors.purple)
  17. wireBreak: Wire colour for collecting redstone tube frames from the retracting drill platform. (Default: colours.magenta)
  18. wireMine: Wire colour for activating the block breakers to mine blocks. (Default: colors.pink)
  19. wireFurnace: Wire colour for the bluelectric furnaces. (Default: colors.brown
  20. moveTicks: Number of ticks it takes for the frame to move. (Default: 10)
  21. moveDelay: Number of ticks to wait between movement commands. (Default: 10)
  22. mineTicks: Number of ticks to wait for blocks to be mined. (Default: 4)
  23. cableSide: The side of the computer that the RedPower2 bundled cable is attached to. (Default: "top")