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

Novice with big goals...

Started by flamingblue8z, 02 May 2012 - 04:59 AM
flamingblue8z #1
Posted 02 May 2012 - 06:59 AM
A short backstory….

I've had VERY limited, very basic knowledge in the past using Java (via Android programming), as well as C# (Windows Phone programming), but never went beyond the very basics. The primary reason was because if I wanted to do something with a smartphone, chances were it either wasn't possible or was already done. So I got lazy and never went further. When I stumbled on CC I was excited, since I'd never heard of Lua, but figured it'd be a great place to start getting more advanced, since a lot of the basics learned through Lua will apply to other programming languages.

Now, I've successfully learned (or brushed-up) a bit using Casper's in-game tutorial, and have made a little password-locked door for my personal server's "Machine Shop", which is where I have my IC2 "factory" of sorts, and sell items to my 3 other friends who play on my server with me. One thing we previously did was use a chest full of signs to leave notes when one of us wasn't on the server. When I stumbled upon NitrogenFingers' email server & client, I couldn't pass up trying it out. It turned out to be a FANTASTIC solution for us. Unfortunately, I'm hitting the common limitation with CC on servers: the wireless modem just doesn't go very far.

So I've looked into skynetapi, and have downloaded code from all over this forum related to a ton of projects I so desperately want to do. The big problem I'm experiencing is my lack of advanced programming knowledge, which really comes back to an underlying problem with ADD. I can't seem to wrap my head around some things when I've still got a machine shop to run on the server. So i'm trying to dabble with the programs when I'm the sole person on the server. However, I'm still not getting the results I'm looking for. Those results are as follows…

I'd like to be able to implement NitrogenFingers' email client & server using skynet api calls. The problem is, wading through code has proved to give me a headache. So many functions I don't understand, so much to learn that I just can't cram all into my head… I'll admit, I've felt like I'm just being lazy by not trying harder. The other thing I'm dying to implement is the ability to control turtles remotely. Yes, I know this has been done, and I have used a few different applications to tinker with a turtle I have stationed on my roof, next to a BuildCraft obsidian pipe, which feeds into the receiving end of a teleport pipe system, that goes through a diamond filter, then separating objects for maceration & smelting. Fortunately I have BuildCraft & IndustrialCraft concepts under my belt. RedPower was my recent addition with ComputerCraft, so I haven't even touched it yet, though I know it has a lot of the same concepts of the other primary mods I use. But when it comes to the turtle, I want one thing I saw on YouTube, the ability to control the turtle directly, with a display of what is around the turtle. The video is on YouTube, trailing URL is /watch?v=vow9tQmaE0k. I saw that the code (which I did get copies of) isn't compatible with the most recent version of ComputerCraft, which is a shame, but hopefully I can cherry pick the parts I want, fix whatever isn't working, and implement THAT program, with something like the "Remote Turtle" program that Wolvan has posted (essentially the same, but I'm not sure how many controls are similar between the two). I also want to be able to enter an auto-mine mode, where I can give it coordinates, perhaps a depth, and a width, where it could fly off and mine on its own, but also have a display of where it is in relation to my base, along with an auto-dropoff provision, where it'd come back to my obsidian pipe to drop off when it's full.

A lot of the programming Cookiebal has made available with object avoidance and waypoints is stunning (I ran it with a proof-of-concept on the server, doing a run back and forth between my shop & one of my friends' houses). But again, these are all separate programs. I'd like to try and get this all working together, and it may just be over my head as a true noob. Doesn't mean I'm not willing to try, I just need some guidance in understanding what each of these functions in the more advanced applications are doing, and how I can swap out something like rednet's calls, with skynet's api, in order to use repeaters. Ultimately, I'd love to be able to deploy a wireless turtle, carrying a chunkloader block, and have it fly to a set distance, go up into the sky, and place the chunkloader with it, so that it can remain as a repeater. Then have that program be able to be run again, to place further ones, in whichever direction I need them, so that I can remain in contact with my wireless mining turtles while they're off mining somewhere 200+ blocks from where my shop is.

Of course, all of this is quite lofty goals for someone who has only been using ComputerCraft for 3 days. But since there are so many things I'd love to automate and have remote control of, it's a no-brainer to learn programming this way. The only problem is finding out where I'm going, what I'm doing. Because my friends on my server can't even figure out how to "/client/mailclient" just to get their email clients running to check/send email on their computers. So I can't expect them to help me… So I'm asking the CC community, if I point out which pieces of code I'm trying to adapt for my use, can anyone explain where I'd need to make changes to do whatever it is I need to? I realize a lot of these questions may have similars that have been asked before, but the answers in each of the couple dozen threads I've read don't even try to help someone really grasp what is going on behind the scenes.

Thanks in advance,
Matt
Luanub #2
Posted 02 May 2012 - 07:40 AM
If you are using the most current version of CC, and perhaps even down a version there is an option in the config file to increase your modem range which will eliminate the need to put in repeaters unless that's something you really want to do.

With that being said the answer to your question is yes if you got some code your having issues with post it in the ask a pro section and you're likely to get help.

This is one of the best communities that I have ever had the privilege of being part of. Everyone is really friendly, knowledgeable and helpful.
flamingblue8z #3
Posted 02 May 2012 - 08:00 AM
Yes, I have noticed this community has been great! Reminds me of the early days of XDA-developers for Windows Mobile phones & Android.

In reference to the config file, I did see that option, and had bumped it up to 1024 since that seemed like a logical option, anyone wandering that far off is just looking for a stronghold, not trying to set up base. I'm guessing that setting didn't take, though, because it never did work for my one friend who was ~70 or so blocks from my mail server. Fortunately for now, I relocated the server to a place buried in the ground in the mid-point of our little "town". I did read somewhere that perhaps the version of Forge I was using (3.x.x.99) was part of the reason it wasn't taking my settings. I noticed CC-get refused to work, as did pastebin. So I literally just finished updating my Forge on all 4 clients & server to the .103 version of Forge. Maybe the 1024 would work now. That does take SkyNetAPI out of the equation (though that really is a great idea). However, I still would like to know how to work on a turtle remote-control application. I will sit down and dig through the code here after some trials with the new Forge, and see what I can come up with for which parts are really above my head. It really comes down to "How do I implement X in place of, or to compliment Y?". I hate to bug the pros unless absolutely necessary, but since my server is going to be vacant for the next 12 - 16 hours, maybe now is as good of a time as ever to dive in.

Thanks again!
Luanub #4
Posted 02 May 2012 - 08:11 AM
I would take a look at Liraal's magicturtle located here.. http://www.computercraft.info/forums2/index.php?/topic/202-turtlecraftosliraals-stuff-keycard-lock-magicturtle-api-v-1252/

It's pretty robust and has had allot of work put into it. Might give you some idea's on what you need to do to accomplish your goal.

Also check out the GPS program/apis that are available in CC, they will help to some extent with the x/y coordinates when moving the turtles.

I'll be online for a few more hours working on my project if you have any questions. I just finished my own turtle movement API with GPS functions a couple of days ago.
flamingblue8z #5
Posted 02 May 2012 - 10:17 AM
I was going to ask about the GPS api, and if any of the turtle programs available have used the GPS api at all.

I appreciate the guidance to Magic Turtle, fortunately that keycard lock also looks like a lot of fun in practice to use, plus it builds on the simple passcode lock I programmed in last night on my door. The magic turtle API is fairly extensive, so I'm sure I can use that in combination with the other possible programs I'm going to look at making. I will get in touch if I do get stumped on something. Thank you, yet again, for the help. I can't show my appreciation enough.