ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Crafting Research Completed (https://www.esoui.com/forums/showthread.php?t=8149)

Lakashi 11/08/18 07:42 PM

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!

Rhynchelma 11/08/18 08:14 PM

I use AI Research Grid, with a hot key to display it. There are several similar.

Lakashi 11/09/18 08:21 AM

No, I meant in an addon, in the code.

ziggr 11/09/18 06:51 PM

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

Quote:

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

AssemblerManiac 11/10/18 09:01 AM

Trait knowledge
 
Quote:

Originally Posted by Lakashi (Post 36494)
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.


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

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