Thread: Item Control
View Single Post
  #2  
Unread 04-05-2013, 07:29 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 341
Loot messages contain an examination tooltip entry in the form:
<ExamineItemInstance:ItemInfo:LONGANDUGLYITEMIDCOD E>[Item Name]<\ExamineItemInstance>
where LONGANDUGLYITEMCODE is an encoded item id. I haven't bothered figuring out what part of the code is the actual item, and it may be that the "generic" item ID is not in the code, only the unique instance ID since if you examine several of the codes you will see that the code changes from the examine tooltip generated by dragging an item from the loot window, the tooltip from the loot message, the tooltip from dragging from your backpack or dragging from an equipped slot. Even dragging the same exact item from two different bag slots will generate a different code so it would take quite a few samples and a lot of time to try to figure out how to decode it. It should be eaiser to decode the loot versions since they don't appear to be dependant on the slot in which the item is placed, just the unique item/stack ID. FWIW, the stack quantity is also included in the code since the same stack in the same bag slot will generate a different examination iteminfo for different quantities.

If you convert the characters to Unicode hex codes and ignore the upper byte it becomes a bit easier to see the data they represent. For instance, the first 5 codes appear to represent a number "0100 0100 0100 0100 0136" would be hex 0000000036. The next 5 codes seem to always be the same, "0100 0100 0100 0178 019C" or hex 000000789c. After that comes the encoded iteminfo.

I'm not sure why Turbine chose to use such a cryptic code but it may have something to do with fear that people would misrepresent items in links in chat when advertising/selling items. Of course, that's a pretty silly reason for this since anyone doing that could be easily caught and banned using the server chat logs. It is more likely that they included all of the info they did so that the item can be more easily represented and encoded it to limit the size of the data sent to the server and back when the client resolves the tooltip - the client probably caches the tooltip info since it definately takes longer to display the tooltip the first time, especially for things like identified LIs.

If I find some time I may go back to playing with the IDs as it is an interesting puzzle but I've got more than enough things already vying for attention. Oh look! A shiny... *wanders off in pursuit of yet another distraction*

Last edited by Garan : 04-05-2013 at 10:16 AM.
Reply With Quote