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

[1.4] edit item's nbt data

Started by PixelToast, 29 May 2012 - 09:16 PM
PixelToast #1
Posted 29 May 2012 - 11:16 PM
it would be cool to be able to edit an items data directly like changing its id and damage value and being able to create keys and stuff so you could mass produce a super crop with ic2 without having to use nbt edit
and if you want it to be legit you could have it be limited to edit its own key like having its own floppy with rom
because using any item as a floppy is kind of cheating i think you have to craft the item with something or use a encoder of some sort
PixelToast #2
Posted 30 May 2012 - 08:14 PM
anyone?
Xfel #3
Posted 30 May 2012 - 08:43 PM
Really, if you want to cheat items, use NEI or such. I don't think there is any need for computer-controlled cheating.
Cloudy #4
Posted 30 May 2012 - 08:48 PM
I think this is not in the scope of vanilla CC - if someone wants to do it, they should make a peripheral.
immibis #5
Posted 30 May 2012 - 10:41 PM
You think there should be computer-writable portable ROM?




It's called a floppy.
PixelToast #6
Posted 31 May 2012 - 12:34 AM
you people dont get what i said do you?
every item editable has its own storage using raw nbt data
the "rom" on it would be the id, damage value, etc
example program:
itemid=nbt.open("right")
itemID=nbt.get("/rom/id","byte")
if itemID==264 then
	print("its a diamond!")
	if nbt.isEditable() then nbt.set("/description","string","shiny") end
else
	print("its not a diamond. :)/>/>")
end
editing would be nice because you could encode any item with a password and you and your friends dont have to memorize passwords
and this ISNT LIKE A FLOPPY you are simply editing values, not physical files
it would also make it easier to read and write variables from storage because you dont have to mess around with io, just using a single command
MysticT #7
Posted 31 May 2012 - 12:55 AM
I agree with cloudy, this shouldn't be included in CC, you can make a peripheral for this. I suppose it's possible, but it would make griefing/cheating easier, since you can take an item and change what you want, possibly converting it into another one or setting tool's damage value to 0, etc.
PixelToast #8
Posted 31 May 2012 - 01:18 AM
I agree with cloudy, this shouldn't be included in CC, you can make a peripheral for this. I suppose it's possible, but it would make griefing/cheating easier, since you can take an item and change what you want, possibly converting it into another one or setting tool's damage value to 0, etc.
read my posts again, slowly this time
i said the damage values sould be on a virtual ROM instead on survival
MysticT #9
Posted 31 May 2012 - 01:35 AM
Ok, but again, make a peripheral for that. I don't think it will be added in vanilla CC.
PixelToast #10
Posted 31 May 2012 - 02:13 AM
why? detecting an items damage and id through the disk drive is a good idea
MysticT #11
Posted 31 May 2012 - 02:21 AM
I don't think so, disk drives are for reading disks (duh), so you shouldn't be able to read every item you put inside (that's why the light on the drive turns red when you place some invalid item). And geting item ids has been suggested before, and it won't happen.
PixelToast #12
Posted 31 May 2012 - 02:31 AM
i was thinking that you craft the item with a magnetic film or something to make it readable
MysticT #13
Posted 31 May 2012 - 02:48 AM
Read my post again, slowly this time.
Geting item ids was already suggeted, it's not gonna happen, so I don't think this will be added.
PixelToast #14
Posted 31 May 2012 - 02:54 AM
theres still the idea of having values stored to items for using items as keys :)/>/> or some sort of item tagging like having seperate ids for items with this magnetic film stuff
Xtansia #15
Posted 31 May 2012 - 05:38 AM
It wouldn't be feasible to be able to do this to every item without editing base classes,
But you could make a magnetic card and magnetic card reader type peripheral,
PixelToast #16
Posted 31 May 2012 - 05:56 PM
you dont need to edit base classes to change an items nbt data, i was messing around with ic2 and made it so the cropnaliser would accept any id, not just a seed and it actually read and written to a stick and the philosophers stone lol, i didnt edit the crop to accept any id so i couldnt plant it :C
and a magnetic card would be obvious and you could find and copy one easily, i wanted a way to make any item a key for opening a door and i dont mean two of the same item ids will be able to open it i mean just the item that you crafted it with
Sebra #17
Posted 31 May 2012 - 07:25 PM
Use floppy as a keycard. No need to make other.
PixelToast #18
Posted 31 May 2012 - 07:45 PM
Use floppy as a keycard. No need to make other.
floppy is as obious as a key card, read my post
Sebra #19
Posted 31 May 2012 - 07:52 PM
Be more creative. Make a door, which opens when you drop a diamond in the right hole.
Or remember there is no security in MC.
PixelToast #20
Posted 31 May 2012 - 08:14 PM
:)/>/>
read my posts the item you craft with the magnetic film either has its own memory or has its own id like disks and it isnt stored in physical folders
Dirkus7 #21
Posted 05 June 2012 - 08:46 PM
:)/>/>
read my posts the item you craft with the magnetic film either has its own memory or has its own id like disks and it isnt stored in physical folders
So you want something like floppy's, but you don't want them to have physical folders? Can you put files on them? I don't think so because the files need to be somewhere on your physical computer, or they can't be stored.
PixelToast #22
Posted 05 June 2012 - 09:56 PM
:)/>/>
read my posts the item you craft with the magnetic film either has its own memory or has its own id like disks and it isnt stored in physical folders
So you want something like floppy's, but you don't want them to have physical folders? Can you put files on them? I don't think so because the files need to be somewhere on your physical computer, or they can't be stored.

NBT data