Item Id <-> Name
Hi,
you can extract item ids from item-links e.g. retrieved with GetItemLink(bag,slot). What I didn't find yet is a way to get the name from an object id - or am I just blind. Is there any way to achieve that? Thanks, Criscal |
That is one thing I hate, not seeing that GetItemName(ID) function. I have been having to store the name of the item because of this. But no, you're not going blind.
|
Those ID 's aren't a unique Identifier. Meaning it 's only a Template ID. There is no unique ID known/accessible which would ultimately identify an item. One could construct it with Enchantment + Template-ID + Level-Requirement + Quality but that 's bound to have a lot of duplicated and wrong entries for example for Legendary or Set-Equipment.
However: http://www.esoui.com/downloads/info4...izedItems.html Lua Code:
However that only works with Template-Names and returns all ID 's for it (for example "Greatsword" or unique Itemnames). I didn't implement a method to search for constructed names (the names you see in Tooltips and Itemlinks) yet. If you'd like that I could implement it in the next version to get the correct (LVL and Qualitybound) Base-ID. Weh sounds a bit confusing I know ... ESOHEAD for example holds mostly Template-Names: http://esohead.com/items# Feel free to have a look at the Source-Code of "Localized Items" to get to know it better - and/or use it as a dependency. Wouldn't recommend to include/copy it in your own addon as it holds data of over 16.000 templates that 's a) much data and b) bound to be outdated if one doesn't manage it from time to time (which I do) |
maybe you can get an items name via the tooltip control.
as you may have noticed, the item name gets translated if you click on a foreign item link in chat. so maybe, if you create a fake link with the item id and pass it so the tooltip control via SetLink(string aLink), you can access the item's real name. |
No - I - Seerah - and probably the whole ESOHEAD team have been there for countless hours already.
You can't get the Item-Data out of the Tooltips in any way (with the API). If you find a way feel free to post a tutorial (but I doubt it :(). |
oh. So the item:xxxxx part of the item link is not the item id for that item ? As in ALL Iron Ore will have say 803 as the number after item ( 803 is a guess from memory ). I know there is an instance ID which is retrievable with GetItemInstanceId(bagId1,slotIndex1) but I am sure this shows a different number to the item:xxx number and is different between the same named item. Initially I thought it was the source of the item ( node, dead body etc ) but there was no consistency there either. The only thing that does make sense in my mind is if item:xxxx is unique per same named item and instanceId is generated as an id for the item after looting, crafting etc.
Quote:
|
|
Thanks, just confirms my decision not to use that item:xxxx number as an identifier in my gatherer item data. I already have to use Locale based names for nodes and maps already so it's no biggy to keep the item names as locale based, as it currently is, as well.
|
Say you have a Keeper's Staff with an item id in the link of 6245. Your Keeper's Staff has a certain trait, giving it a suffix. So it is now called Keeper's Staff of Awesomeness. While questing, you pick up another Keeper's Staff of Awesomeness, but it has slightly different stats. It will still have the same item id in the link. (Though it will have a different instance id.) The next day, you pick up another Keeper's Staff, but this time, it is a Keeper's Staff of Sweetness. It, again, will still have the same item id of 6245 because it is still a Keeper's Staff.
|
Quote:
Problematic it is just with items that have level requirement (equipable items, potions, glyphs) as they can have different stats. |
Quote:
Maybe later if new API functionality gets added things will change but for now I guess I am stuck with this language limitation. Also, perhaps over time I will see a pattern in the languages imported into the database to eventually export all nodes, items and mapnames in the language requested. Only time will tell. |
I kinda got around the 'storing links in a certain language' issue by using profiles and the Cvar in the SV to store language specific links. It increases the storage requirements for people who swap locales a lot, but space isn't really too much of an issue, and since this is information that can be regenerated at any time, it's not too much hardship.
|
Quote:
The item link IS your item id. It just isn't a number. |
Quote:
|
Maybe traits do change the number then... But enchants don't. (And, actually, aren't enchants the one that add the suffixes anyway?)
|
Quote:
Traits are inherent in the template id, and the extra data means nothing regarding the traits, but definitely contains the style, level, and enchantments. There was a little discussion about that in this thread I started a while back. |
All times are GMT -6. The time now is 06:40 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI