ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Get craft material level (https://www.esoui.com/forums/showthread.php?t=9131)

gdfou 05/03/20 09:41 AM

Get craft material level
 
Hello,

I am trying to get the level of craft material (from 4 to CP150).
For exemple:
- Rubedite Ingot is CP150-CP160
- Kresh Fiber is CP10 - CP30

How can I do this ?

Thanks

Dolgubon 05/03/20 10:27 AM

Are you at the relevant crafting station? Or is this anywhere? When you're at a station you have some extra functions you can use.

sirinsidiator 05/03/20 10:35 AM

The game offers no built in way to do this easily. You'd have to create a lookup table or something.

Scootworks 05/03/20 11:10 AM

you could use LibItemLink to get your correct level and item level by using:
Lua Code:
  1. LIB_ITEM_LINK:BuildItemLink(itemId, itemQuality, itemLevel, itemChampionPoints, itemStyle, isCrafted, enchantId, enchantQuality, linkStyle)

gdfou 05/03/20 11:24 AM

Great thanks !
Ii will try what you tell me

Baertram 05/03/20 11:41 AM

Quote:

Originally Posted by Scootworks (Post 41049)
you could use LibItemLink to get your correct level and item level by using:
Lua Code:
  1. LIB_ITEM_LINK:BuildItemLink(itemId, itemQuality, itemLevel, itemChampionPoints, itemStyle, isCrafted, enchantId, enchantQuality, linkStyle)

This won't "get" you the level but you are setting them yourself as you create an itemlink?

If you want to know what crafting material got what level you need to hardcode it, like the addon "Crafting Material Level Display" does, unfortunately.
Or you need the itemlinks of all these crafting materials and try if GetItemLinkRequiredLevel("itemlink of the crafting material") returns something valid (in the past it didn't and just returned 0 in some cases or other values).

votan 05/03/20 01:33 PM

The function GetItemCraftingInfo return rankRequirement. The rank 1-10 defines the levels. The relation must be hard-coded.


All times are GMT -6. The time now is 03:32 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI