Quantcast ESOUI - View Single Post - Crafting Writ Assistant - Need French and German... BUT welcome other Languages
View Single Post
09/13/17, 08:29 PM   #13
Dolgubon
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 272
Originally Posted by Argusus View Post
Thank you I really appreciate it!
Originally Posted by Argusus View Post

The GetCraftingSkillName(craftingSkillType) API call returns "Blacksmithing" , "Woodworking" etc, basically this isn't what I need for identifying what the "writ name" is , I use these values to populate my dropdown when you visit a crafting station so it auto selects your current writ.

As for you questions about my Use cases. the MASTER_WRIT_TEXT_INDICATORS are text that a master writ quest name would "Contain" so I can identify if this is a master writ of a particular type, the API only tells us this is a "crafting quest type" and Master Writ blacksmith quests appear the same as normal "Blacksmith writ" quests, also the text for in the case of English is "A Masterful Weapon" for both the "Blacksmith" master quest and the "Woodworking" master quest. This leads me to use the "MASTER_WRIT_WEAPON_TYPE_INDICATORS", in this case the word "Weapon" is present in both quests, when you have them both in your Journal. I look into the quest "steps" and the "conditions" to determine if this is a Blacksmithing or woodworker quest, by using the SI_CWA_DAGGER and SI_CWA_SWORD or SI_CWA_BOW to see if this is a Blacksmith or woodworking quest. this helps me determine the CraftingSkillName based on these details.

I was able to use your suggestion and switch my client to FR to get the word "Staff" from the quest details, it was Baton.

I'm primarily a developer for C#, SQL and other languages and I'm a new to LUA and addon development in general but its fun any suggestions or recommendations are welcome..


In that case, you should be fine using the table that I put there, as those are the things of the quest. Seems I overlooked it, but here's the English version of them, which should help you determine what is what.
[CRAFTING_TYPE_ALCHEMY] = "concoction",
[CRAFTING_TYPE_ENCHANTING] = "glyph",
[CRAFTING_TYPE_PROVISIONING] = "feast",
["plate"] = "plate",
["tailoring"] = "tailoring",
["leatherwear"] = "leatherwear",
["weapon"] = "weapon",
["shield"] = "shield",

As for differentiating Blacksmithing writs from the master writs: You can use GetJournalQuestRepeatType(i)==QUEST_REPEAT_DAILY. If it is true, it's a writ, otherwise it's a master writ.

Note that since you are comparing strings quite often, sometimes the German/French stuff needs a bit of 'massaging' or possibly you could shorten the string you are looking for. For example, longue, longué, longuen, etc. That particular example probably doesn't exist, but should give you the idea.

GetJournalQuestConditionInfo(questIndex, 1, condition number) -> returns _, current, max
If the current == max for all of the conditions, you automatically know you need to deliver the item. A bit longer to check than the string, but it'll also be more resistant to language changes.

Finally, another potential solution to differentiating Blacksmith Weapons/Woodworking Weapons: you have the weapon names, so you can use that to search the condition.
  Reply With Quote