Quantcast Crafting Research Completed - ESOUI
Thread Tools Display Modes
11/08/18, 07:42 PM   #1
Lakashi
 
Lakashi's Avatar
Join Date: Oct 2017
Posts: 4
Crafting Research Completed

Is there an easy way to check if all traits have been researched for a crafting skill? If not, is there a hard way? =P Thanks!
  Reply With Quote
11/08/18, 08:14 PM   #2
Rhynchelma
Premium Member
Premium Member
Join Date: Mar 2014
Posts: 37
I use AI Research Grid, with a hot key to display it. There are several similar.
  Reply With Quote
11/09/18, 08:21 AM   #3
Lakashi
 
Lakashi's Avatar
Join Date: Oct 2017
Posts: 4
No, I meant in an addon, in the code.
  Reply With Quote
11/09/18, 06:51 PM   #4
ziggr
 
ziggr's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 23
GetSmithingResearchLineTraitInfo()

Call GetSmithingResearchLineTraitInfo(craftingType, researchLine, traitIndex) is probably the API you seek.

GetSmithingResearchLineTraitInfo(number TradeskillType craftingSkillType, number researchLineIndex, number traitIndex)
Returns: number ItemTraitType traitType, string traitDescription, boolean known
Iterate traitIndex 1..9 for each trait, and count the "knowns". That's how many traits the current char has completed research for that specific item.

researchLine is an index into the gear items you can craft at a station, 1..14 for blacksmithing (7 weapons, 7 heavy armor). 1..15 for clothing (8 light including jerkin, 7 medium), 6 for wood, 2 for jewelry.

craftingType is CRAFTING_TYPE_whatever.

I count trait knowledge in WritWorthy_Smithing.lua Parser:ToKnowList(), if you care to wade through pages and pages of not-really-relevant code to get to an example of GetSmithingResearchLineTraitInfo()

--Z
  Reply With Quote
11/10/18, 09:01 AM   #5
AssemblerManiac
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 50
Lightbulb Trait knowledge

Originally Posted by Lakashi View Post
No, I meant in an addon, in the code.
You can download AI Research Grid and see how the code in there works. There is no single function that can tell you if all the traits are known for a given item (sword, shield, legs, etc.).

Look for PopulateTraitDataForCraft in AIResearchGrid.lua. It has all the function calls necessary to determine if a trait is know for an item, as well as how much time might be left on research for a trait.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Crafting Research Completed

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