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

Project Orion (Builder w/Automated Refilling & SmartDig) v0.02a

Started by sjones321, 25 March 2012 - 01:15 PM
sjones321 #1
Posted 25 March 2012 - 03:15 PM
Ok so I am releasing the first alpha version of Project Orion, made by myself and EVmaker. The primary reason for this release, is to get you guys the alpha version of our building program. This program as of now will build a house of any(as long as the turtle can enter the chunks) dimension with little to no interaction with you past setup. This most importantly includes the ability to return to a refill location when its running low on materials and trigger either Redpower or Buildcraft systems to refill its inventory. Therein it will return to work on its designated project, continuing to refill as necessary.

That said Project Orion does more than just that. Included as of version .01a is movement code with goto(location) functionality all of which is needed to run the building program. Our movement code is largely “inspired” by a mixture of Cookiebal's and Liraal's early movement code though it has been modified a great deal to suite our needs and truly at this point remains only as an inspiration. If you are a coder your self you are welcome to substitute your own movement and goto functionality or that of someone else in your personal code as long as the turtle remains cable of going to a specific refill location.

Key Features (for now)

1. Build function with automatic refilling station.
2. Movement api that maintains a smart position (still slightly buggy in situations)
3. Smart dig function using the same movement code to drop its inventory at a specified point and return to digging.
4. Other api functions you are welcome to explore on your own that I will work on documenting for you guys.


Video of it refilling.



Planned Features
Spoiler
  • Add in rednet functions and ability to wirelessly refill from a remote location.
  • Add in lighting options to the build and dig programs.
  • Add in flooring construction for build function to allow easy building of suspended buildings.
  • Add option to dig a room from bottom left instead of top left.
  • Add dig stairs function.
  • Improve goto collision detection to work in more difficult situations.
  • Improve building program to be able to work with a more intricate design.


Downloads
Orion Api v0.01a
http://pastebin.com/TukxbtBk

https://dl-web.dropb....txt?w=336495c7
Orionp Program v0.01a
http://pastebin.com/bB6NUMcK

https://dl-web.dropb....txt?w=b7c83f10

Installation
Spoiler

1. This mod requires Computercraft 1.31

2. Download the Orion Api and put it in the api folder(or turtle sub folder if you just want this on turtles) in your Computercraft directory.

3. Optionally download the Orionp program and put it in the programs section of the Computercraft directory. This program supplies a bunch of movement commands including an easy startup for the build programs


Usage
SpoilerSince this was converted from my personal api there are several quirks about it that might confuse you. Firstly when inputting coordinates we use an x,y,z system instead of minecraft x,z,y. Its essentially still the same we just felt that y makes more sense as north south and z makes more sense as up and down. So to be clear x is east/west, y is north/south, and z is up/down. Secondly we also changed our facing numbers a bit as it didn't make sense to us why Minecraft did theirs clockwise from the south, so ours is clockwise from the north at 2, east at 1, south at 0, and west at 3. Sorry if that throws you for a loop but as I said before you are welcome to change it to use your own movement code.

Build Function
SpoilerNow down to actually using the system. First on startup of computer you need to set its current coordinates using orionp setpos x y z f facing is optional as if you have it facing north it will default to that. Next you need to setup the location of where it will refill or drop off. For now these use the same permanent variable of “droplocation”. This is done with orionp setdrop x y z. A note on that is its best to have it be up in the air for dropping stuff off. Now you can place the turtle in the lower left of where you want it to build and type orionp build. This will bring up a series of prompts asking for height, length and width. Bear in mind this is the outer walls not the inside dimensions. Also note that the build program will clear out everything in its way dealing with trees or hills in the way, but be careful of stuff you want kept. Bear in mind that as of now if you want to use the build program without movement code at all you are welcome to but if it gets to 10 items or less in its inventory it will likely error out.

I hightly recommend using a Redpower setup for your refilling station though Buildcraft works if you would like.

Redpower
SpoilerScreenshot
Spoiler




Setup is fairly simple place a chest with a filter/transposer (filter works best) with a tube going off it. Then connect a timer to the filter/transposer and the timer to a xor gate to constantly supply redstone signal to the timer except when the turtle sends a signal to the xor gate. A note for this is that the turtle will emit redstone signal out all of its sides including top and bottom while it has space left to be refilled. So this setup can be modified as you wish as long as the basics are there.


Buildcraft
Spoiler

Screenshot
Spoiler




Setup if anything is more simple. Simply put a chest down with a wooden pipe and engine on the pipe. Then have turtle land next to some redstone to be able to power the engine while its empty. A note on this is that there is likely to be some spill over as there will likely still be materials in the pipes after the turtle is full. This will get dropped on the ground and is one of the reasons I highly recommend the latest version of Redpower for this instead.



Smartdig Function
SpoilerThis function was actually one of my first and deals with digging. It can be used to dig a tunnel, dig a room really anything you can think of with different dimensions. It also includes drop off functionality. If the turtle gets full it will automatically try and go back to a drop off location and empty its inventory. As with the build function to do this you need to setpos x y z f and setdrop x y z it will attempt to then return to its digging operation. Bear in this is the most buggy part of the operation as the goto collision detection is disrupted by complex locations and if you stand in the way at all it will throw it off. This function is called with orionp smartdig depth length width.


License
SpoilerCopyright © 2012 Stephen Jones a.k.a sjones321 [sjones321@gmail.com]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-Visible credit is given to the original author.
-The software is distributed in a non-profit way.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credit goes to tomass1996 for the use of two of his stringutil functions. And to Cookiebal for inspiration from his movement code and permanent variable code. And to Liraal for the inspiration for our present movement code and most importantly Dan200 for his wonderful mod.
Wolvan #2
Posted 25 March 2012 - 03:35 PM
Just add the code of your api into the program and replace all functions [your API-Name].function1() with function1. Best is using notepad++'s replace function. Just type in search
[Your_API_Name].
and in replace Nothing
sjones321 #3
Posted 25 March 2012 - 05:39 PM
Just add the code of your api into the program and replace all functions [your API-Name].function1() with function1. Best is using notepad++'s replace function. Just type in search
[Your_API_Name].
and in replace Nothing

the problem with that is the api is pretty big covering alot more than turtle functions so yeah thats basically it but have to be more selective. but generally yes.
Wolvan #4
Posted 25 March 2012 - 08:26 PM
It doesn't really make a difference if you add the whole API or just a selected part, does it?
sjones321 #5
Posted 26 March 2012 - 12:33 AM
It doesn't really make a difference if you add the whole API or just a selected part, does it?
just in the time it takes me.
hamish1001 #6
Posted 26 March 2012 - 04:32 AM
does this work?
HTxL #7
Posted 26 March 2012 - 05:18 AM
does this work?

Do you see a code?
hamish1001 #8
Posted 26 March 2012 - 07:54 AM
no hahaha :o/>/>
sjones321 #9
Posted 27 March 2012 - 01:13 AM
it does work, should have code up later today or tomorrow, sorry been busy lately. good to see people are interested.
Wolvan #10
Posted 27 March 2012 - 05:25 PM
And can you create Pics or Vids for this?
sjones321 #11
Posted 27 March 2012 - 06:03 PM
sure I can work on making a video for it no problem.
Lasere123456 #12
Posted 29 July 2012 - 12:21 PM
ok… so how do i get it to start?
Bushido #13
Posted 23 September 2012 - 07:04 AM
I have the program in the right folder but it wont start! I want to use this so bad!
Bushido #14
Posted 04 October 2012 - 08:40 PM
Wanting to buy and update?
ikon106 #15
Posted 09 October 2012 - 08:11 PM
Could you post a mirror of the program? Neither of those sites work in Turkey.
ikon106 #16
Posted 12 December 2012 - 12:40 AM
I don't know if this is still maintained, but if it is.. How do you download an api from pastebin? is it possible to do within' a computer? if not how would you do it so it isn't called orion.txt?
Toby #17
Posted 20 April 2013 - 05:33 AM
It's have some issues
- can't go up when there is a block at the top, even flow of water or lava - it stops
- doesn't select the first inventory slot after drop items - it stops when overflow space in the ninth slot
Cranium #18
Posted 20 April 2013 - 07:58 AM
This is an old topic. Please refrain from reviving such topics from the grave, considering it is no longer updated.