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

[MiscPeripherals] Finding ME-Bridge UUID, from item name, and the Reverse.

Started by oxinabox, 10 September 2013 - 02:58 AM
oxinabox #1
Posted 10 September 2013 - 04:58 AM
Title: [MiscPeripherals] Finding ME-Bridge UUID, from item name, and the Reverse.

I have created a API, that turns Names into ME-Bridge UUIDs
It does this by looking them up from a file contrining list of ID:Metadata -> Name
but because each user is going o have different mods installed, a static list can't be made.
So to generate this file I have created a mod (for 1.5.2) IdDumper:
http://oxinabox.ucc..../ItemDumper.zip,
Details can be found on that on StackExchange
When you log into a world,
This mod will create a IdDump.txt in your current working directory. you need to move it, (possibly via pastebin) into your CC computer's directory.
I don't suggest leaving the mod running, it is a pretty rough hack i through together, (I'm fairly sure it won't corrupt your world or anything, just will keep on dumping the id data each time you start the game.)



The IdDump.txt file for FTB unleashed can be found: http://pastebin.com/i1pS6p3H
The IdConv Lua API can be found: http://pastebin.com/daea0MDP

Example of use:

os.loadAPI(IdConvApi)
local converter = IdConvApi.IdConv.create("ItemDump.txt")
local meBridge=peripheral.wrap("left")
local items = meBridge.listItems()
--Prints out the current contents of ME system
for uuid, qty in pairs(items) do
if uuid~=nil then
  local idData = converter:getFullID(uuid)
  local id = idData.id
  local meta = idData.meta

  local itemData = converter:getDataFor(id,meta)
  print(qty .."x  " .. itemData.name)

end
end

Note that it using some hand made OO stuff, so that the IdConv object has methods that are referred to with :
and static methods (like .create) referred to with .


A more complete example of use can be found in my SVN,
but that is not ready for release.
That is a system that uses the OpenPeripherals smart helmet (or chat), to have a remote management of your AE,
including the transfer of stuff into a EnderChest, which you can get out of a EnderPouch.
But it is not yet intuitive enough for general release

—–
Off Topic.
It is pretty annoying not being able to "contribute" by creating topics,
until you have "benefited" by creating posts like "Thanks this is a great script."
I get why, with the whole spam flood thing, There is a good argument against this on StackExchange, though not directly applicable.


————–
EDIT:
There is a bug in the mod to dump ids.
It does not dump the ID's for any items that do not show up in the Creative Mod, item search.
This includes, for example: Forge MultiPart blocks.
Bubba #2
Posted 10 September 2013 - 06:35 AM
It is pretty annoying not being able to "contribute" by creating topics,
until you have "benefited" by creating posts like "Thanks this is a great script."
I get why, with the whole spam flood thing, There is a good argument against this on StackExchange, though not directly applicable.

I can understand your frustration. Nobody particularly likes having the system in place - we admins have to keep up with the constant flow of questions/new topics. That being said, we don't have a system such as stackexchange that would allow us to use reputation to limit spammers. For one, I have no idea if IP board is capable of it. For another, this forum makes only infrequent use of voting posts up, and typically it's not representative of constructive posts but rather something that people find amusing. It's annoying, yes. However making three constructive posts is really not that difficult. For example, you seem to be a capable programmer - perhaps consider answering a few questions in Ask a Pro :)/>/>
Azelphur #3
Posted 13 September 2013 - 08:38 PM
Haha, I actually found your client side item dumping plugin when you posted it on stackoverflow a little while ago, I used it to get an item dump and do exactly this. Here's a screenshot of what I've been using the item dump for :D/>



so yea, thanks for that. :)/>
oxinabox #4
Posted 13 September 2013 - 11:59 PM
Here's a screenshot of what I've been using the item dump for :D/>
Nice. Are you logging what is in there or, what is added?
(what are the time stamps?)

I am tempted to make a video showing off my system for it.
But it needs a few updates before I can video it, so the system can explain itself.
(I have no microphone, and a vague fear of my voice being recorded)
Maybe this afternoon.
Azelphur #5
Posted 18 September 2013 - 01:25 PM
Here's a screenshot of what I've been using the item dump for :D/>
Nice. Are you logging what is in there or, what is added?
(what are the time stamps?)

I am tempted to make a video showing off my system for it.
But it needs a few updates before I can video it, so the system can explain itself.
(I have no microphone, and a vague fear of my voice being recorded)
Maybe this afternoon.

I'm logging what's added and removed.
The time stamps are mostly cosmetic, they are the minecraft time of day :P/>