This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[1.3] Way to get disk's numeric ID
Started by Hawk777, 09 March 2012 - 11:09 AMPosted 09 March 2012 - 12:09 PM
You can get a computer's ID with os.computerID(). It would be nice if the disk API had a similar function for getting a disk's ID.
Posted 09 March 2012 - 12:44 PM
I'd agree with this; but a function like getSerial() would probably fit better.
Posted 09 March 2012 - 01:40 PM
Disks should have labels….
Posted 09 March 2012 - 01:50 PM
but how would you assign them on SMP on the separate terminals?
Posted 09 March 2012 - 11:55 PM
Disks can be given labels, but the numeric ID differs from a label in that it’s (1) permanent, (2) unique, and (3) easy to deal with for programs running outside Minecraft, since it’s the directory name.
Posted 10 March 2012 - 10:24 AM
So when you use the ID for a keycardsystem, it would be impossible to make a copy of the keycard, and when you lose the it, there is no way to get it back :mellow:/>/>Disks can be given labels, but the numeric ID differs from a label in that it’s (1) permanent, (2) unique, and (3) easy to deal with for programs running outside Minecraft, since it’s the directory name.
This kinda destroys the possibility for
Posted 10 March 2012 - 10:29 AM
If you want the ability to make a copy of your keycard, don't use the numeric ID. Just because the function is available doesn't force anyone to use it. Personally, #3 is the big one: programs outside Minecraft can most easily find the disk by its numeric ID, so it would be nice if that ID could be discovered from inside Minecraft.
Posted 10 March 2012 - 10:54 AM
Having the option doesn't mean you should use it, as Hawk777 said, just keep using disk label for reocgnition. And besides, the right way to make a keycard is to have the system read the contents of the disk, which are harder to spoof, unlike a label :mellow:/>/>So when you use the ID for a keycardsystem, it would be impossible to make a copy of the keycard, and when you lose the it, there is no way to get it back ;)/>/>
This kinda destroys the possibility forhackerspeople who want to make reserve copies to make an exact copy of the keycard…
Posted 10 March 2012 - 04:30 PM
It'd be great for tracking copies of stuff/users logging with keycards, because right now you can only read the easy-to-spoof label.
Posted 10 March 2012 - 05:10 PM
+1, I often use a solitaire cypher of the name of the room I'm opening and then a random word that comes to mind as I look around my room. Gives you a good sequence of letters that are otherwise meaningless if someone opens the contents of the disk. You could theoretically store 2 legitimate files on the disk and then have the disk check for both files existing.the right way to make a keycard is to have the system read the contents of the disk, which are harder to spoof, unlike a label :mellow:/>/>
Posted 23 March 2012 - 01:23 PM
I would love a disk.getID(side) function, or as Advert mentioned a disk.getSerial(side) for the disks because of a security system I'm planning to implement that uses the disk ID/serial aswell as the contents of a file and uses both pieces of information to authenticate the user against the specific lock or interface.
I now it can be done with for instance labels, multiple files and other such solutions, but I really wanted that ID/serial.
I may end up using a totally different solution, in fact I just thought of another that I won't reveal just yet :(/>/>, but I still would like the option to use the disks actual ID/serial, for other purposes as well.
I now it can be done with for instance labels, multiple files and other such solutions, but I really wanted that ID/serial.
I may end up using a totally different solution, in fact I just thought of another that I won't reveal just yet :(/>/>, but I still would like the option to use the disks actual ID/serial, for other purposes as well.
Posted 24 March 2012 - 08:27 PM
Then you could make a security lock, make an "admin" disk and a normal one, and then using the admin one, check (and ban :(/>/> ) the IDs of the disks used!
Posted 24 March 2012 - 08:50 PM
Whoa, this just sparked an idea for a game: Capture the disk! :D/>/>Then you could make a security lock, make an "admin" disk and a normal one, and then using the admin one, check (and ban :(/>/> ) the IDs of the disks used!
Basically like capture the flag:
- You grab the other team's disk (or kill whoever has the disk and grab it then^^).
- You bring it back to your team's side and try to enter it into your team's disk drive (connected to a computer fairly counting, etc.) before anyone kills you.
If you have the time and feel like it. Which I don't at the moment. :)/>/>
So if anyone wants to go nuts with this idea and give it a try, I'd surely like to see the results.
But if you do, don't half-ass it just to be the first or something. Take your time, think up a good concept, make clean re-usable and readable code, test it thoroughly and make an example map, all set up and user-friendly, ready to go.
A well baked cake is much more satisfying than having a few ingredients hastily thrown into one's face. :)/>/>
Posted 27 March 2012 - 06:34 AM
That… is a brilliant idea! I love it! Would be really easy to build too.
Posted 27 March 2012 - 08:22 AM
Whoa, this just sparked an idea for a game: Capture the disk! :D/>/>Then you could make a security lock, make an "admin" disk and a normal one, and then using the admin one, check (and ban :o/>/> ) the IDs of the disks used!
Basically like capture the flag:This is already possible of course, even without reading disk ID's, but it's the last post that sparked the idea. Should also be pretty straightforward to implement.
- You grab the other team's disk (or kill whoever has the disk and grab it then^^).
- You bring it back to your team's side and try to enter it into your team's disk drive (connected to a computer fairly counting, etc.) before anyone kills you.
If you have the time and feel like it. Which I don't at the moment. :o/>/>
So if anyone wants to go nuts with this idea and give it a try, I'd surely like to see the results.
But if you do, don't half-ass it just to be the first or something. Take your time, think up a good concept, make clean re-usable and readable code, test it thoroughly and make an example map, all set up and user-friendly, ready to go.
A well baked cake is much more satisfying than having a few ingredients hastily thrown into one's face. :)/>/>
I have an idea already :)/>/>
I will try as soon as I get home from school
Posted 03 April 2012 - 08:22 PM
I built a capture the disk arena… There are 3 disks, but only one (random!) is the one that makes you win. It's small, but right now it's only a test. But i have a problem: idk how to move the SP world to MP… :)/>/>
Posted 03 April 2012 - 10:49 PM
Redworks has labeling.
Don't know about the mod alone.
BTW the disks have disk:1, disk:2, disk:3, etc.
It already should be easy to find out what they are.
Don't know about the mod alone.
BTW the disks have disk:1, disk:2, disk:3, etc.
It already should be easy to find out what they are.