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

Computers should be able to use command blocks!

Started by billysback, 17 October 2012 - 04:47 PM
billysback #1
Posted 17 October 2012 - 06:47 PM
It's just a small idea for an extra API,
as Command Blocks are now (I think) in the game it would be amazing if the computer had an API which let it set, get and run the code in an adjacent command block (or have a command block extension which performs the same but is a peripheral on to the computer).

This would make for a lot more player interaction, like a warp system built entirley upon CC computers, or safes (inventorys) which could give/store items from your inventory.

the API functions would be something like:
Spoiler

setCode(code)
  -sets the code of the command block
getCode()
  -gets the current code in the command block
run()
  -runs the command block code, obviously you could just do this with redstone outputs but this might make it just a tiny bit easier :D/>/>

EDIT:
actually, there coming in the next update, I think? but this is still kinda valid…
ChunLing #2
Posted 17 October 2012 - 08:24 PM
Why bother? Computers can already activate command blocks using redstone outputs. And Command blocks would have to be placed (and set) in creative anyway.
billysback #3
Posted 17 October 2012 - 08:48 PM
Servers could create advanced teleport systems based using computers and command blocks, redstone input cannot change or get the current code of a command block…

thanks for reading the full post…
ChunLing #4
Posted 18 October 2012 - 12:35 AM
Allowing computers to change the current command code of a command block would be wildly OP. It would be so OP it wouldn't even count as OP anymore.
JJRcop #5
Posted 18 October 2012 - 12:48 AM
Command blocks out in the wide open without protection is wildly OP.
ChunLing #6
Posted 18 October 2012 - 05:14 AM
hahah, ninja'd. :P/>/>

Seriously though. The system/server operators will be able to set up groups of command blocks with all the commands they want available to general use, and then other people can use computers programmed to activate those command blocks by redstone outputs. Aside from giving everyone with a modicum of programming knowledge the ability to gain full access to operator commands, what exactly are you suggesting?
billysback #7
Posted 18 October 2012 - 07:46 AM
I'm suggesting that this be used in adventure maps, or game maps mainly, if you wanted you could obviously use it on servers, but as you pointed out, there would be flaws.

A computer could give a million and one new possibilities for map makers if they were able to interact with computers; It would be incredible…

Command blocks in them selves are "wildly OP" that's why they aren't in the proper game, I never suggested that command blocks be put in the real game for this suggestion…
Tiin57 #8
Posted 18 October 2012 - 09:30 AM
I think there's a peripheral that does this, called the Operator Panel.
ChunLing #9
Posted 18 October 2012 - 06:03 PM
Um…not sure what you mean.

Anyway, as I was saying, in creative mode you can already set up a computer (or turtle) that has redstone control of several command blocks. You put your player interface terminal somewhere the player can reach, and it sends wireless commands to the computer/turtle that activates the command blocks.

If you use a computer with wireless modem, it can activate up to five different blocks based on rednet input. For a turtle, it can access and activate any number of different command blocks, lets say 128 so that it doesn't have to move too far to activate them (and you can always use multiple computers responding to different commands). If what you want is for adventure world builders to be able to make a computer activate multiple command block commands, then hey, this is already possible. But when I tell you so you get all offended that I'm not taking your suggestion seriously.

And, pay attention to this point because you seem to not grasp it. Either the computers can change the command block's command while out of creative or it cannot. If it cannot, then you still need to have multiple command blocks to provide multiple commands for the player. If it can, then the player can find a computer near a command block and reprogram it to change the command block command. This is a simple boolean can or not can problem.
billysback #10
Posted 18 October 2012 - 06:16 PM
First of all, I'm not offended… I just want you to understand me :P/>/>

Second of all computers can't change command block commands, that the entire point of this thread, either what you are saying is have a huge array of Command Blocks containing all possible commands you could want (which is ridiculous) or that you set up a server system where a computer changes the command block code (?).

I am not simply suggesting that we add the ability to run the command blocks as I know this can be done through redstone inputs, the main suggestion is to have the ability to change the code of the command block; there for computers could have (for example) a table containing warp locations for an array of places all around the map. Then you type in a destination, (or set it up however you wish) and it will match the destination up with data stored with the warp locations and teleport you to the respective location by changing the command blocks code to -p tp x,y,z (or whatever the command block code is :)/>/>)

Or it would let players get equipment once and only once, or only every now and again (yes, this could be done with redstone but it would be much more labor-some, you could say the same about CC computers…).

I hope I have made myself clear, the main part of the suggestion was the setCode() section, which would set the code which the command block contains automatically by the computer, instead of the player having to change it themselves, so that it can do much more advanced things with the command blocks! you seem to have gotten the idea that the run() part of the code is the main feature…
Sammich Lord #11
Posted 18 October 2012 - 07:24 PM
Funny thing is that there was already a suggestion for this as soon as command blocks came out. Cloudy said that they plan on adding support when CC comes out for the Halloween update of Minecraft.
billysback #12
Posted 18 October 2012 - 07:39 PM
Cool, thanks!
Cloudy #13
Posted 18 October 2012 - 08:05 PM
Yeah - the way I see it someone needs to be op to place it, and they should ensure that it is surrounded by bedrock to prevent users from tampering with it anyway. As such I don't see any harm with allowing some default interaction with them - would be helpful for those wanting to create adventure maps etc.
ChunLing #14
Posted 18 October 2012 - 08:13 PM
Eh, I see it as being a limited gain. You have to ensure that the adventure player can't access the computer, or you have to use separate command blocks for the commands you want to use. The way I see it, a lot of the more obtuse functions of command blocks in adventure mode could be replaced by turtles, like dispensing items and stuff.
Cloudy #15
Posted 18 October 2012 - 08:20 PM
Eh, I see it as being a limited gain. You have to ensure that the adventure player can't access the computer, or you have to use separate command blocks for the commands you want to use. The way I see it, a lot of the more obtuse functions of command blocks in adventure mode could be replaced by turtles, like dispensing items and stuff.

You have to ensure that the player can't use the command block anyway - it makes it no different. Plus adventure mode means players can't break blocks anyway - so that should help keep the mechanism under wraps. I don't see the harm in offering people more control.
ChunLing #16
Posted 18 October 2012 - 08:37 PM
My point is that they already have that control…and that this just makes it easier to accidentally do something embarrassingly unbalanced (that wouldn't otherwise be possible). But it is true that a single rednet controlled computer and a single command block is easier to set up.

I guess that adventure map makers have been relying on the honor system to have players not cheat up until now.
billysback #17
Posted 18 October 2012 - 08:43 PM
It's like in all games, you have the ability to cheat or break the rules in almost all single player games (in this case adventure maps) but it offers no advantage, it ruins the game and spoils the fun. Unless, of course, you have already completed it and just want to mess around, in which case it's purpose has been fulfilled without cheating.

At the end of the day, the play COULD cheat but they would gain nothing, they would ruin their game and nobody Else's, so it is theirs…
Cranium #18
Posted 18 October 2012 - 10:06 PM
I think this is not a bad idea, just because what public server would add command blocks in such an unprotected fashion?
Great idea for adventure maps.
faubiguy #19
Posted 25 October 2012 - 10:32 PM
Now that MC 1.4.2 is out, is this going to be added in CC 1.47?
Cloudy #20
Posted 25 October 2012 - 10:36 PM
Maybe later - need to discuss with dan, and do some changes in the background.