Thread Tools Display Modes
07/19/15, 02:00 AM   #1
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Dwemer Motifs

I have an item link to a motif.
I want to figure out if it is a dwemer motif and also which chapter it is.

Example for "Racial Motif 15, Chapter 2: Dwemer Belts"
Lua Code:
  1. local itemType = GetItemLinkItemType(itemLink)
  2. if itemType == ITEMTYPE_RACIAL_STYLE_MOTIF then
  3.   --It is a motif
  4.   if ? == ? then
  5.     --I am a dwemer motif
  6.     local chapter = ?
  7.   end
  8. end
Anyone know how to get the type of motif and chapter from the item link?
  Reply With Quote
07/19/15, 03:42 AM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Not sure there's an API to tell you. Only way I can think of is hard-code item ids: http://esoitem.uesp.net/viewlog.php?...l+motifs+15%22
  Reply With Quote
07/19/15, 06:19 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 578
Originally Posted by Weolo View Post
I have an item link to a motif.
I want to figure out if it is a dwemer motif and also which chapter it is.

Example for "Racial Motif 15, Chapter 2: Dwemer Belts"
Lua Code:
  1. local itemType = GetItemLinkItemType(itemLink)
  2. if itemType == ITEMTYPE_RACIAL_STYLE_MOTIF then
  3.   --It is a motif
  4.   if ? == ? then
  5.     --I am a dwemer motif
  6.     local chapter = ?
  7.   end
  8. end
Anyone know how to get the type of motif and chapter from the item link?
Each dwemer motif chapter has it's own itemId.
Lua Code:
  1. local itemType = GetItemLinkItemType(itemLink)
  2. if itemType == ITEMTYPE_RACIAL_STYLE_MOTIF then
  3.   --It is a motif
  4.   local itemId = select(4, ZO_LinkHandler_ParseLink(itemLink))
  5.   itemId = tonumber(itemId)
  6.  
  7.   if itemId>=57573 and itemId<57587 then
  8.     --I am a dwemer motif
  9.     local chapter = itemId - 57572
  10.   end
  11. end
^^ Untested. Just took a look to my itemLinks.
  Reply With Quote
07/19/15, 06:28 AM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,586
I wrote a list of motif book item ids before I found out that you can check if a motif is already known with IsItemLinkBookKnown.

Lua Code:
  1. 16424 -- 1: high elves
  2. 27245 -- 2: dark elves
  3. 16428 -- 3: wood elves
  4. 27244 -- 4: nords
  5. 16425 -- 5: bretons
  6. 16427 -- 6: redguard
  7. 44698 -- 7: khajiit
  8. 16426 -- 8: orcs
  9. 27246 -- 9: argonians
  10. 54868 -- 10: imperials
  11. 51638 -- 11: ancient elves
  12. 51565 -- 12: barbaric
  13. 51345 -- 13: primal
  14. 51688 -- 14: daedric
  15. 57572 -- 15: dwemer
  16. 57573 -- 15/1: dwemer axes
  17. 57574 -- 15/2: dwemer belts
  18. 57575 -- 15/3: dwemer boots
  19. 57576 -- 15/4: dwemer bows
  20. 57577 -- 15/5: dwemer chests
  21. 57578 -- 15/6: dwemer daggers
  22. 57579 -- 15/7: dwemer gloves
  23. 57580 -- 15/8: dwemer helmets
  24. 57581 -- 15/9: dwemer legs
  25. 57582 -- 15/10: dwemer maces
  26. 57583 -- 15/11: dwemer shields
  27. 57584 -- 15/12: dwemer shoulders
  28. 57585 -- 15/13: dwemer staves
  29. 57586 -- 15/14: dwemer swords
  Reply With Quote
07/19/15, 12:12 PM   #5
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
@merlight, @votan, @sirinsidiator Thanks for the replies.

@votan thanks for showing me a way to get the itemid from the link, your methods is tidier than the one I was messing with.

@sirinsidiator I have the itemids already but I will double check the ids I have match your list.
I was planning to use IsSmithingStyleKnown(styleItemIndex, patternIndex) but I will take a look at IsItemLinkBookKnown also.
  Reply With Quote
07/20/15, 05:59 AM   #6
Wandamey
Guest
Posts: n/a
here with the "achievement id, criterion index" of the dwemer achievement (unless we got extra limbers this shouldn't move)

["1144,1"] = "57573", --"Racial Motifs 15, Chapter 1: Dwemer Axes",
["1144,2"] = "57574", --"Racial Motifs 15, Chapter 2: Dwemer Belts",
["1144,3"] = "57575", --"Racial Motifs 15, Chapter 3: Dwemer Boots",
["1144,4"] = "57576", --"Racial Motifs 15, Chapter 4: Dwemer Bows",
["1144,5"] = "57577", --"Racial Motifs 15, Chapter 5: Dwemer Chests",
["1144,6"] = "57578", --"Racial Motifs 15, Chapter 6: Dwemer Daggers",
["1144,7"] = "57579", --"Racial Motifs 15, Chapter 7: Dwemer Gloves",
["1144,8"] = "57580", --"Racial Motifs 15, Chapter 8: Dwemer Helmets",
["1144,9"] = "57581", --"Racial Motifs 15, Chapter 9: Dwemer Legs",
["1144,10"] = "57582", --"Racial Motifs 15, Chapter 10: Dwemer Maces",
["1144,11"] = "57583", --"Racial Motifs 15, Chapter 11: Dwemer Shields",
["1144,12"] = "57584", --"Racial Motifs 15, Chapter 12: Dwemer Shoulders",
["1144,13"] = "57585", --"Racial Motifs 15, Chapter 13: Dwemer Staves",
["1144,14"] = "57586", --"Racial Motifs 15, Chapter 14: Dwemer Swords",

not sure if you can still use the dwemer style if you learn it at lvl 9 of the skill then downgrade your skills. So maybe (just maybe) you'd need both checks : is book known and skill lvl, if you wanna test if the style is available. which makes your idea IsSmithingStyleKnown(styleItemIndex, patternIndex) more reliable. (Except if you can't get the pattern info outside the crafting station :/)

Last edited by Wandamey : 07/20/15 at 07:48 AM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Dwemer Motifs


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