Thread Tools Display Modes
08/02/14, 12:19 AM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
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?
  Reply With Quote
08/02/14, 03:18 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
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))
  Reply With Quote
08/02/14, 04:22 AM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Thanks

Thanks You !!
  Reply With Quote
08/04/14, 02:35 AM   #4
Deome
 
Deome's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Thumbs up

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

Last edited by Deome : 08/04/14 at 02:36 AM. Reason: Code formatting
  Reply With Quote
08/04/14, 05:49 AM   #5
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Deome View Post
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
  Reply With Quote
08/04/14, 01:49 PM   #6
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
This is pretty much how I get to those names in my addon. Except for the strformat part.

Originally Posted by Garkin View Post
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))
  Reply With Quote
08/09/14, 07:56 AM   #7
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
thanks everyone for all the ideas.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » SI_ Get Crafting Skill Type Name

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off