Quantcast
Download
(152 Kb)
Download
Updated: 05/05/19 03:37 PM
Pictures
File Info
Compatibility:
Elsweyr (5.0.5)
Wrathstone (4.3)
Updated:05/05/19 03:37 PM
Created:10/26/18 04:58 PM
Monthly downloads:984
Total downloads:11,330
Favorites:12
MD5:
LibCraftText  Popular! (More than 5000 hits)
Version: 5.0.1
by: ziggr [More]
Are you an add-on developer who compares quest names against a list of strings to figure out which quest is a daily crafting writ? Master writ?

This is a library of localized strings for crafting quest recognition, and parser code that uses those strings to convert "Craft Normal Ancestor Silk Shoes" into { item=SHOES, material=ANCESTOR_SILK }

Example dump of tables from parsing some daily crafting writ quests, in EN English, DE German, and JA Japanese:


Lua Code:
  1. LibCraftText.DailyQuestNameToCraftingType("Enchanter Writ")
  2. ---> returns CRAFTING_TYPE_ENCHANTING
  3.  
  4. LibCraftText.ParseDailyCondition(CRAFTING_TYPE_ENCHANTING
  5.             , "Craft Superb Glyph of Health with Ta: 0/1")
  6. ---> returns table:
  7. {
  8.     essence = { name="Oko",    item_id=45831, ... }
  9.     potency = { name="Rejera", item_id=64509, ... }
  10.     aspect  = { name="Ta",     item_id=45850, ... }
  11. }
  12.  
  13. LibCraftText.ParseDailyCondition(CRAFTING_TYPE_CLOTHIER
  14.             , "Craft Normal Ancestor Silk Shoes: 0/1")
  15. ---> returns table:
  16. {
  17.     item     = { name="shoes",         mat_set_id=mat_lgt, pattern_index=3, ... }
  18.     material = { name="Ancestor Silk", mat_set_id=mat_lgt, level_index=10, ... }
  19. }
  20.  
  21. LibCraftText.ParseDailyCondition(CRAFTING_TYPE_ALCHEMY
  22.             , "Acquire Mudcrab Chitin: 3/3")
  23. ---> returns table:
  24. {
  25.     item    = { name = "Mudcrab Chitin", item_id=77591, ... }
  26. }
  27.  
  28. -- and if your ESO UI is set to DE German or some other supported
  29. -- language, then the name strings change, but the numbers don't:
  30.  
  31. LibCraftText.ParseDailyCondition(CRAFTING_TYPE_ALCHEMY
  32.             , "Besorgt etwas Schlammkrabbenchitin: 3/3")
  33. ---> returns table:
  34. {
  35.     item    = { name = "Schlammkrabbenchitin", item_id=77591, ... }
  36. }

GitHub repo at https://github.com/ziggr/ESO-LibCraftText.

Languages Supported
5.0.1 2019-05-05
  • Version and API bump.
  • ## IsLibrary: true so that Elsweyr can identify this as a library.

4.2.5 2018-11-25
  • Example2 code for daily writ quests
  • Example3 code for master writ quests
  • I finally caved in and added for EachCondition(quest_index) utility code for iterating over quest conditions. If I had to write that loop a dozen times, other folks probably will, too.
  • Also added ParseQuest(quest_index) to use that iterator on a quest and return a list of its parsed conditions.

4.2.4 2018-11-12
  • Example1 code
  • Full parse of all daily crafting conditions, returning results from
  • Giant tables of crafting items and materials.

4.2.3 2018-10-27
  • ES Spanish
  • RU Russian
  • JA Japanese
  • All daily and master crafting writ names translated.
  • Still missing Rolis dialog, will deal with later if/when I can get a
    guild hall's tables to actually work on PTS.

4.2.2 2018-10-27
  • DE German and FR French strings added for daily and master writ
    quest names.
  • Lots of behind-the-scenes automation to help collect translations from
    ESO client and use them to generate translation files. See GitHub repo
    for details.

4.2.1 2018-10-26
  • Initial release, en-english strings
Optional Files (0)


Archived Files (5)
File Name
Version
Size
Uploader
Date
4.2.5
152kB
ziggr
11/25/18 07:47 PM
4.2.4
92kB
ziggr
11/12/18 05:18 PM
4.2.3
10kB
ziggr
10/28/18 12:07 AM
4.2.2
5kB
ziggr
10/27/18 10:16 PM
4.2.1
4kB
ziggr
10/26/18 04:58 PM


Post A Reply Comment Options
Unread 05/05/19, 08:29 PM  
ziggr
 
ziggr's Avatar
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 214
Uploads: 9
Originally Posted by Dolgubon
Hey, I'm actually no longer (mostly) using lookup tables for daily writs. Instead, I'm using DoesItemLinkFulfillJournalQuestCondition and doing some loops. So that's an option too.
Clever. A short list of <100 or even <1000 possible matching itemLinks would be far more reliable than regexes and string matching. And perhaps more importantly, immune to the kind of bugs we see in the FR translation where the quest text asks for Spider Silk when it requires Kresh, or fails to specify Oak.

I don't actually use LibCraftText within WritWorthy for writ parsing, or anything, really. I do use LibCraftText for some private add-ons to drive daily writs and Rolis.
Report comment to moderator  
Reply With Quote
Unread 05/05/19, 08:00 PM  
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view AddOns

Forum posts: 343
File comments: 645
Uploads: 16
Hey, I'm actually no longer (mostly) using lookup tables for daily writs. Instead, I'm using DoesItemLinkFulfillJournalQuestCondition and doing some loops. So that's an option too.
Report comment to moderator  
Reply With Quote
Unread 10/28/18, 03:19 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2493
File comments: 2777
Uploads: 57
Thanks Ziggr. This will make addon development for the writ stuff easier to support all the given languages!
I hope the devs will find it if they start a project
Report comment to moderator  
Reply With Quote
Unread 10/28/18, 12:16 AM  
ziggr
 
ziggr's Avatar
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 214
Uploads: 9
6 languages supported

EN DE FR ES RU JA

All official and unofficial translations now supported. I've got the daily and master crafting quest titles for the above six languages.

IT Italian: the translation project hasn't gotten to crafting writs yet, neither daily nor master, so the language file for that is a placeholder for now, filled with EN English strings.

If any translation changes out from under me and breaks this library, let me know and I'll update the library.


Still haven't gotten to Rolis dialog yet. Maybe tomorrow. Maybe not. Depends on how ornery the crafting tables are on PTS.

--Z

PS: the GitHub repo has all the fancy-schmancy automation that I use to scrape translations from the current ESO client and merge them into a database that I use to generate all the language files. Here's the database file.
Lua Code:
  1. LANG_DB = {
  2.   [ 1] = {
  3.              key = "$DAILY_AL"
  4.          ,   en  = "Alchemist Writ"
  5.          ,   de  = "Alchemistenschrieb"
  6.          ,   fr  = "Commande d'alchimie"
  7.          ,   es  = "Encargo de alquimia"
  8.          ,   ru  = "Заказ алхимику"
  9.          ,   ja  = "錬金術師の依頼"
  10.          }
  11. , [ 2] = {
  12.              key = "$DAILY_BS"
  13.          ,   en  = "Blacksmith Writ"
  14.          ,   de  = "Schmiedeschrieb"
  15.          ,   fr  = "Commande de forge"
  16.          ,   es  = "Encargo de herrerķa"
  17.          ,   ru  = "Заказ кузнецу"
  18.          ,   ja  = "鍛冶師の依頼"
  19.          }
  20. ...
  21. , [23] = {
  22.              key = "$MASTER_WEAPON"
  23.          ,   en  = "A Masterful Weapon"
  24.          ,   de  = "Eine meisterhafte Waffe"
  25.          ,   fr  = "Une arme magistrale"
  26.          ,   es  = "Un arma magistral"
  27.          ,   ru  = "Искусное оружие"
  28.          ,   ja  = "優れた武器"
  29.          }
  30. ...
Report comment to moderator  
Reply With Quote
Unread 10/26/18, 10:27 PM  
ziggr
 
ziggr's Avatar
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 214
Uploads: 9
Re: Nice lib!

Originally Posted by Phinix
This is a really good idea, kudos.
What will ultimately be required for this to be relevant however is contacting the authors/maintainers of each community language pack (Spanish, Italian, Russian, Japanese) and convincing them to adopt this library as the standard for translating these select writ strings within their mods...
Kudos from Phinix? I'll be insufferably chuffed for days. Thanks!

Good idea about the community language packs. I'll wait until there's a bigger motivation than "Some of Zig's add-ons use it" before pestering them. But I'm adding it as a todo so that I don't forget about it if/when this library gains traction.
Report comment to moderator  
Reply With Quote
Unread 10/26/18, 06:14 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 1070
Uploads: 29
Nice lib!

This is a really good idea, kudos.

ESO has only three 'official' language modes: English, French, and German. Any other client language relies on 3rd party language pack addons. These translations are created by the community and subject to change, and in some cases there might be multiple different language packs (Japanese for example) to choose from. If an addon looking to track writs doesn't see exactly the right text in the quest name or status, which could be likely with custom translations, then the entire writ tracking functionality of that addon will not work when using that language pack.

Having a library to standardize the text strings used by writ quests to indicate requirements or completion status within each of these community language pack addons would greatly ease the work of other addon authors having to download each custom language pack in turn and find the string (if any) assigned to these values manually (and each time the language packs are updated in perpetuity).

What will ultimately be required for this to be relevant however is contacting the authors/maintainers of each community language pack (Spanish, Italian, Russian, Japanese) and convincing them to adopt this library as the standard for translating these select writ strings within their mods, providing any corrections as needed. That way any addon tracking writ quests could simply and reliably do so in any supported language with minimal additional and repeated upkeep work otherwise required to ensure text string matching didn't break over time and language addon updates.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: