ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   SI_ Get Crafting Skill Type Name (https://www.esoui.com/forums/showthread.php?t=2043)

circonian 08/02/14 12:19 AM

SI_ Get Crafting Skill Type Name
 
Is there an SI_ to get crafting skill type names? I want to do something like this:
(Note: This is just an example, it does not work. I made up SI_CRAFTINGSKILLTYPE)
Lua Code:
  1. d("CraftingSkillType: "..GetString("SI_CRAFTINGSKILLTYPE", CRAFTING_TYPE_BLACKSMITHING))
Also is there a list of those SI_ somewhere besides the wiki or using zgoo?
I've seen other posts where people use SI_'s that dont show up on the wiki or under ["SI_"] when using zgoo like: SI_ITEMTRAITTYPE Where do you guys find these at?

Garkin 08/02/14 03:18 AM

Names of crafting skills are not defined in EsoStrings, so you will have to use:

Lua Code:
  1. local skillType, skillIndex = GetCraftingSkillLineIndices(CRAFTING_TYPE_BLACKSMITHING)
  2. local name, rank = GetSkillLineInfo(skillType, skillIndex)
  3. d(zo_strformat("CraftingSkillType: <<1>>", name))

circonian 08/02/14 04:22 AM

Thanks
 
Thanks You !!

Deome 08/04/14 02:35 AM

I use moc() to get the name. Might help.

I.e.:

lua Code:
  1. elseif mouseOverControl:GetOwningWindow():GetName() == "ZO_SmithingTopLevel" then local Skill = mouseOverControl:GetOwningWindow():GetChild(1).name:GetText()
  2. if Skill == "BLACKSMITHING" then
  3. Skill = CRAFTING_TYPE_BLACKSMITHING
  4. elseif Skill == "CLOTHING" then
  5. Skill = CRAFTING_TYPE_CLOTHIER
  6. elseif Skill == "WOODWORKING" then
  7. Skill = CRAFTING_TYPE_WOODWORKING

merlight 08/04/14 05:49 AM

Quote:

Originally Posted by Deome (Post 11109)
I use moc() to get the name. Might help.

I.e.:

lua Code:
  1. elseif mouseOverControl:GetOwningWindow():GetName() == "ZO_SmithingTopLevel" then local Skill = mouseOverControl:GetOwningWindow():GetChild(1).name:GetText()
  2. if Skill == "BLACKSMITHING" then
  3. Skill = CRAFTING_TYPE_BLACKSMITHING
  4. elseif Skill == "CLOTHING" then
  5. Skill = CRAFTING_TYPE_CLOTHIER
  6. elseif Skill == "WOODWORKING" then
  7. Skill = CRAFTING_TYPE_WOODWORKING

OP wanted to get (localized) name from CRAFTING_TYPE constant.
If your code is supposed to tell you which crafting station you're at, you could find GetCraftingInteractionType() useful ;)

Xrystal 08/04/14 01:49 PM

This is pretty much how I get to those names in my addon. Except for the strformat part.

Quote:

Originally Posted by Garkin (Post 11008)
Names of crafting skills are not defined in EsoStrings, so you will have to use:

Lua Code:
  1. local skillType, skillIndex = GetCraftingSkillLineIndices(CRAFTING_TYPE_BLACKSMITHING)
  2. local name, rank = GetSkillLineInfo(skillType, skillIndex)
  3. d(zo_strformat("CraftingSkillType: <<1>>", name))


circonian 08/09/14 07:56 AM

thanks everyone for all the ideas.


All times are GMT -6. The time now is 12:20 PM.

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