Today, 01:51 PM | #1 |
|
![]() Hello,
Is there an other way to get a gear item level (armor/weapon/Jewelry) other than GetItemLink(bagId, slotIndex) and retrieve the SubType? I'd like to get the crafting rank from armor/weapon/Jewelry no matter if looted or crafted, so I've made a table (00 are placeholders till I get the SubType) : Code:
data.itemLevelToRankAndQuality = { -- level 1 to 14, rank 1 { level = {00, 00, 00, 00, 00}, rank = 1, quality = 1 }, -- White (Normal) { level = {00, 00, 00, 00, 00}, rank = 1, quality = 2 }, -- Green (Fine) { level = {00, 00, 00, 00, 00}, rank = 1, quality = 3 }, -- Blue (Superior) { level = {00, 00, 00, 00, 00}, rank = 1, quality = 4 }, -- Purple (Epic) { level = {00, 00, 00, 00, 00}, rank = 1, quality = 5 }, -- Gold (Legendary) -- level 16 to 24, rank 2 { level = {00, 00, 00, 00, 00}, rank = 2, quality = 1 }, -- White { level = {00, 00, 00, 00, 00}, rank = 2, quality = 2 }, -- Green { level = {00, 00, 00, 00, 00}, rank = 2, quality = 3 }, -- Blue { level = {00, 00, 00, 00, 00}, rank = 2, quality = 4 }, -- Purple { level = {00, 00, 00, 00, 00}, rank = 2, quality = 5 }, -- Gold -- level 26 to 34, rank 3 { level = {29, 00, 00, 00, 00}, rank = 3, quality = 1 }, -- White { level = {32, 00, 00, 00, 00}, rank = 3, quality = 2 }, -- Green { level = {35, 00, 00, 00, 00}, rank = 3, quality = 3 }, -- Blue { level = {00, 00, 00, 00, 00}, rank = 3, quality = 4 }, -- Purple { level = {00, 00, 00, 00, 00}, rank = 3, quality = 5 }, -- Gold -- level 36 to 44, rank 4 { level = {00, 00, 00, 00, 00}, rank = 4, quality = 1 }, -- White { level = {00, 00, 00, 00, 00}, rank = 4, quality = 2 }, -- Green { level = {00, 00, 00, 00, 00}, rank = 4, quality = 3 }, -- Blue { level = {00, 00, 00, 00, 00}, rank = 4, quality = 4 }, -- Purple { level = {00, 00, 00, 00, 00}, rank = 4, quality = 5 }, -- Gold -- level 46 to 54, rank 5 { level = {00, 00, 00, 00, 00}, rank = 5, quality = 1 }, -- White { level = {00, 00, 00, 00, 00}, rank = 5, quality = 2 }, -- Green { level = {00, 00, 00, 00, 00}, rank = 5, quality = 3 }, -- Blue { level = {00, 00, 00, 00, 00}, rank = 5, quality = 4 }, -- Purple { level = {00, 00, 00, 00, 00}, rank = 5, quality = 5 }, -- Gold -- CP 10 to 30, rank 6 { level = {00, 00, 00}, rank = 6, quality = 1 }, -- White { level = {00, 00, 00}, rank = 6, quality = 2 }, -- Green { level = {00, 00, 00}, rank = 6, quality = 3 }, -- Blue { level = {00, 00, 00}, rank = 6, quality = 4 }, -- Purple { level = {00, 00, 00}, rank = 6, quality = 5 }, -- Gold -- CP 40 to 60, rank 7 { level = {00, 00, 00}, rank = 7, quality = 1 }, -- White { level = {00, 00, 00}, rank = 7, quality = 2 }, -- Green { level = {00, 00, 00}, rank = 7, quality = 3 }, -- Blue { level = {00, 00, 00}, rank = 7, quality = 4 }, -- Purple { level = {00, 00, 00}, rank = 7, quality = 5 }, -- Gold -- CP 70 to 80, rank 8 { level = {00, 00}, rank = 8, quality = 1 }, -- White { level = {00, 00}, rank = 8, quality = 2 }, -- Green { level = {00, 00}, rank = 8, quality = 3 }, -- Blue { level = {00, 00}, rank = 8, quality = 4 }, -- Purple { level = {00, 00}, rank = 8, quality = 5 }, -- Gold -- CP 90 to 140, rank 9 { level = {00, 00, 00, 00, 00, 70}, rank = 9, quality = 1 }, -- White { level = {00, 00, 00, 00, 00, 76}, rank = 9, quality = 2 }, -- Green { level = {00, 00, 00, 00, 00, 79}, rank = 9, quality = 3 }, -- Blue { level = {00, 00, 00, 00, 00, 00}, rank = 9, quality = 4 }, -- Purple { level = {00, 00, 00, 00, 00, 00}, rank = 9, quality = 5 }, -- Gold -- CP 150 to 160, rank 10 { level = {74, 75}, rank = 10, quality = 1 }, -- White { level = {00, 78}, rank = 10, quality = 2 }, -- Green { level = {00, 81}, rank = 10, quality = 3 }, -- Blue { level = {00, 83}, rank = 10, quality = 4 }, -- Purple { level = {00, 86}, rank = 10, quality = 5 }, -- Gold } ![]() Last edited by Saint-Ange : Today at 01:52 PM. Reason: typo |
![]() |
Today, 02:26 PM | #2 |
It's not clear what information you have. Where is this item and why can you not use GetItemLink? There's multiple ways and reasons to get the level and quality, and various reasons why a table or similar might be required, but you haven't given enough information for us to say what to use.
|
|
![]() |
Today, 02:49 PM | #3 | |
|
|
|
![]() |
Today, 03:10 PM | #4 |
The crafting rank is nothing that's in the itemlink directly as it is level dependent afaik
So what you need would be a lookup table for GetItemLinkRequiredLevel(itemLink) and hardcode the needed crafting ranks. Like smithing "iron" rank 1 = item levels 1 to 14 and so on Unless vanilla UI code shows you how ZOs does it to show the level text "1 to 14" at the crafting tables UI? Did you search that control and how it's text is build in vanilla code? ZO_SmithingTopLevelCreationPanelMaterialListSelectedLabel https://github.com/esoui/esoui/blob/...hared.lua#L305 Looks like the rank texts is in data.patternName, so check how it get's there and maybe it's using some API. I think it's this line: https://github.com/esoui/esoui/blob/...hared.lua#L876 Code:
local patternName, baseName, _, numMaterials, numTraitsRequired, numTraitsKnown, resultingItemFilterType = GetSmithingPatternInfo(patternIndex) But the quality is in the itenlink so no need to hardcode anything for that, unless your addon would need that somehow... Last edited by Baertram : Today at 03:17 PM. |
|
![]() |
Today, 03:52 PM | #5 | |
|
![]() Also I have checked your links but I haven't got the level yet, it's all giberish to me :° |
|
![]() |
ESOUI » Developer Discussions » General Authoring Discussion » Getting the gear item level |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
![]() |
![]() |
![]() |
|
|