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

Need Help making a Base Control Terminal

Started by graywolf69, 25 July 2014 - 04:52 PM
graywolf69 #1
Posted 25 July 2014 - 06:52 PM
Ok, I am COMPLETELY new to computer craft, aside from I have watched a couple lets plays using this mod and know that this is possible. What I want to do is a pretty simple concept: for example, I have mods like ICBM, MFFS (modular forcefields), applied energistics, wireless redstone, and a whole bunch of useful stuff on the server I play on with my friend. I had an idea to make a computer terminal in some kind of war planning room/bunker that can basically control my whole base: I can launch a rocket by typing in "Launch Silo A" or something, turn on/off my base power by typing "PowerOffBase", turn my force field on/off, ext. All from 1 terminal. If anyone has the time and knowledge to explain how I can make these commands and more, I would be very thankful. Also, would it be helpful for me to install project:red to be able to use bundled cable? Im just using standard minecraft redstone and wireless redstone at the moment. Thanks for the help!

EDIT: Also I want to make it so this is all on a floppy disk, which i can eject at any time just in case, also I want to add passwords to certain commands (for example after running "Launch Silo A" it outputs "Enter Password" and when you enter the password it either runs the command or outputs, "Wrong Password" and gives you another opportunity.
Edited on 25 July 2014 - 06:14 PM
hilburn #2
Posted 25 July 2014 - 09:00 PM
Where to begin… actually where to begin is easy, this page http://computercraft.info/wiki/Category:APIs contains all of the commands you can use in CC, it is important, if you are serious about learning to code you will probably have the whole thing memorised pretty soon
Most of this is actually pretty easy to accomplish if you set it up right, for example MFFS just needs a redstone signal to activate correct? you could therefore do it one of 2 ways, either give it a dedicated computer that sits next to it, listening for a command to turn it on (using either a wired or wireless modem to listen, wired = more secure, need a physical connection, wireless = insecure unless you implement encryption, limited range, no need for an actual cable) or you could output the redstone signal from the computer and transmit that to the MFFS unit using either wireless redstone or a physical connection. I personally recommend using modems as you can send signals on more than 6 different channels which will be useful if you are trying to control an entire base worth of systems.
I have no experience with ICBM so can't advise you how you would go around setting that up. If it just requires a redstone signal to fire then see above, if it's more complex, then it will be more complex :)/>
Project Red bundled cable (or any bundled cable) isn't supported in the latest version of CC so probably not worth installing it if that's all you're going to use it for, however I love the redstone logic and red alloy wire aspects of it so I think everyone should use it.
Password protecting stuff is pretty standard, your best bet is to look in the tutorials section, there are a bunch that cover secure passwords, mostly under "Door Lock" style programs where you key in a password to gain entry.
Popping the program on a floppy disk is doable, but not particularly necessary, you could always just hold down Ctrl+T if you want to end the program

So in summation if I were you, the way I would go about it is:
1. Get familiar with the APIs, notably: Fs (dealing with files), OS (run programs and event capture), Redstone (interfacing with redstone), Rednet (network signals), Tables (really bloody useful), Term (control what is displayed on the terminal)
2. Learn how to send secure signals over RedNet from a Master computer (your terminal) to a Slave computer (the one that will actually do something when it receives a signal)
3. Learn how to set up secure passwords (hashing APIs are available which allow you to store your password securely, ie even if someone sees the file it is saved in they won't know what the password is)
4. Write it
graywolf69 #3
Posted 25 July 2014 - 09:55 PM
Thanks for this, it helps A LOT!!! Btw yes, both ICBM and MFFS use just a redstone signal to power a field/launch a rocket. In addition I added extra peripherals which adds bundled cable that does connect to Project: Red wires, and also I added project red. Thank you so much!
Edited by
Neywiny #4
Posted 28 July 2014 - 02:52 AM
and just in case you're still reading this topic, I'd use openperipherals and the terminal glasses, which might be better for your needs. It would essentially allow you to be in the nether or something derping around and be like, "oh wow! my power is draining quickly! better turn on emergency power gen!" and type into chat $$EmergPower or something like that (needs the $$), and then test on the computer what message is sent, and bam, you got emergency power. You can even, like I have, put some bar graphs and block icons displayed on screen that will tell you current base power % and some AE system stuff like if its full or the bytes or types used, which is really useful. need any help and lemme know
graywolf69 #5
Posted 29 July 2014 - 02:06 PM
cool! Power isn't a prob for me really, I use mekanism wind turbines which are generating 24/7, but I might look into the mod anyway…