Thread Tools Display Modes
09/26/15, 08:54 PM   #1
scinutz
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 2
Need Help with achievement id for Glass and Xivkyn

Thanks for reading..

I am trying to update the Ai Research Grid to cover Glass and Xivkyn motifs. As with Dwemer, it was using 1144 for the Achievement ID code.

["1144,1"] = "57573", --"Racial Motifs 15, Chapter 1: Dwemer Axes",
["1144,2"] = "57574", --"Racial Motifs 15, Chapter 2: Dwemer Belts",

Was an Example Wandamey gave on another Post for Dwemer... Currently, I am trying to figure out the "achievement id, criterion index" for the command GetAchievementCriterion(). So far, I can't seem to find any information towards the ID number..

Please help if you can...

Thanks
  Reply With Quote
09/26/15, 11:27 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Use

Lua Code:
  1. IsSmithingStyleKnown(integer styleItemIndex, integer patternIndex)

ex:

Lua Code:
  1. d(IsSmithingStyleKnown(ITEMSTYLE_AREA_XIVKYN, ITEM_STYLE_CHAPTER_GLOVES))

instead ?

You can also check my dump and the snippet I used for extraction
http://www.esoui.com/forums/showpost...4&postcount=27
  Reply With Quote
09/27/15, 04:40 AM   #3
Wandamey
Guest
Posts: n/a
the pattern indexes can repeat for different items depending on the station, not sure about that function being useable outside of a crafting station.

achievements id
1319 for Glass
1181 for Xivkyn

Got all tables in Do I Keep It
but i made up the format you wont find such a thing as "achievement id, criterion index" (or indexes = 0) in the wild.

##GetAchievementNumCriteria(integer achievementId) Returns: integer numCriteria
##GetAchievementCriterion(integer achievementId, integer criterionIndex) Returns: string description, integer numCompleted, integer numRequired

with the Id you get the number of criteria for the achievement, and then you can loop to get the description and the completed infos for the criteria (indexes of criteria are 1,2,3,4... etc. no surprise here, they would change though if a weapon type were added for example, but not between 2 big updates, achievement IDs that are.. well, IDs, they'll never change)
then you would need the book IDs too (or parse the achievements desc --done that, wont advise it because translations are not consistant) and i'd send you back to the previous Do I Keep It link.


to get achievement IDs, either dump all achievements (see Ayantir file) meaning you loop across all possible values, or use zgoo (or here) and /zgoo mouse the line you need in your achievement journal. (hold your mouse pointer on it while pressing enter for the instruction, or use also click4info, it had a keybind for zgoo mouse, way easier to use and it would allow you to test functions in game too.

Last edited by Wandamey : 09/27/15 at 05:34 AM.
  Reply With Quote
09/27/15, 04:58 AM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Ayantir View Post
Use

Lua Code:
  1. IsSmithingStyleKnown(integer styleItemIndex, integer patternIndex)

ex:

Lua Code:
  1. d(IsSmithingStyleKnown(ITEMSTYLE_AREA_XIVKYN, ITEM_STYLE_CHAPTER_GLOVES))

instead ?

You can also check my dump and the snippet I used for extraction
http://www.esoui.com/forums/showpost...4&postcount=27
Does this really work?

I was trying to use this function in Update 4 when Dwemer motif was introduced, but I couldn't get it working correctly. Maybe there are some changes, but at the time I have tested it, it was working just for "old" motifs (motifs which doesn't have chapters). That was the reason why for example AI Research Grid uses achievement for Dwemer motif instead of this function.

Last edited by Garkin : 09/27/15 at 05:00 AM.
  Reply With Quote
09/27/15, 05:12 AM   #5
Wandamey
Guest
Posts: n/a
pattern Index 1 will be the Robe at the clothier station or the hatchet at the smithy. I doubt it works.

maybe ther is a way from the book links though (like the recipes?)

Last edited by Wandamey : 09/27/15 at 05:17 AM.
  Reply With Quote
09/27/15, 05:27 AM   #6
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
You need to get the itemlink as parameter for the book. (IsItemLinkBookKnown)

and yes my exemple is not good. The way ZOS use it is a bit complicated :/
  Reply With Quote
09/27/15, 05:32 AM   #7
Wandamey
Guest
Posts: n/a
well you need the id of books to compare the achievements too (if you want to keep your hair while making it work in 3 languages)

but i fear the books functions may be used for lorebooks, not sure about motif books having something easy to access. (but it was my first addon when i worked on this, I probably missed a lot of easier ways to do things, still do...)
  Reply With Quote
09/27/15, 07:27 AM   #8
scinutz
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 2
Thanks all

Thanks to all who responded, with your help, I was able to complete the Update of the AI Research Grid to include in the Glass and Xivkyn Motifs....

I uploaded the files, and are now available for download. Link at bottom of message.

Thanks again

http://www.esoui.com/downloads/filei...p?id=1202#info
  Reply With Quote
09/30/15, 05:43 AM   #9
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
The short version of how i made this in CraftStore to save style knowledge in saved variable:

Code:
local DWEMER, XIVKYN, GLASS, AKAVIRI, YOKUDAN, MERCENARY = 1,2,3,4,5,6
local styles = {
	[DWEMER] = 57572,
	[XIVKYN] = 57834,
	[GLASS] = 64669,
	[AKAVIRI] = 57590,
	[YOKUDAN] = 57605,
	[MERCENARY] = 64714,
}
local function IsStyleKnown(cat,id)
	local txt, known = GetAchievementCriterion(cat,id)
	if known == 1 then return true end
	return false
end
for x = 1,14 do
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[DWEMER] + x] = IsStyleKnown(1144,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[XIVKYN] + x] = IsStyleKnown(1181,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[GLASS] + x] = IsStyleKnown(1319,x)
end

Last edited by @AlphaLemming : 09/30/15 at 09:03 AM.
  Reply With Quote
09/30/15, 07:01 AM   #10
Wandamey
Guest
Posts: n/a
Originally Posted by @AlphaLemming View Post
The short version of how i made this in CraftStore to save style knowledge in saved variable:

Code:
local DWEMER, XIVKYN, GLASS, AKAVIRI, YOKUDAN, MERCENARY = 1,2,3,4,5,6
local styles = {
	[DWEMER] = 57572,
	[XIVKYN] = 57834,
	[GLASS] = 64669,
	[AKAVIRI] = 57590,
	[YOKUDAN] = 57605,
	[MERCENARY] = 64714,
}
local function IsStyleKnown(cat,id)
	local txt, known = GetAchievementCriterion(cat,id)
	if known == 1 then return true end
	return false
end
for x = 1,14 do
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[DWEMER] + x] = IsStyleKnown(1144,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[XIVKYN] + x] = IsStyleKnown(1181,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[GLASS] + x] = IsStyleKnown(1319,x)
end

is that thumb down really necessary? *
what about complete/crown style books, do you check if all chapters are known each time?

* what i mean here is that achievement criteria indexed are matching with book order for now allowing you to just register the core one, but if some new weapon type were added (wich will happen at some point...) and old achievements were updated consequently (can't sweart his one would happen though), then the criteria indexes would be reordered alphabetiacally (English order), and the next chapter would have an ID in discontinuity with the others, screwing up all of your books results and you would need a table with individual records of your books. So yes i rather "waste " a few bits of lua memory and have just that to update next time.

Last edited by Wandamey : 09/30/15 at 08:05 AM.
  Reply With Quote
09/30/15, 08:01 AM   #11
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
Thumb down??? ... oO you mean that post symbol ... that was an accident, not wanted and not removable after posting. Sorry.

Complete/Crown books i do not check ... there is no indicator on how many missed chapters a player want to see this book marked as needed - so i decided to show all chapters in my overview and if you have a complete book, you can decide for yourself, if you want to use it ... even if only one chapter is missing.

This works fine and is ready for all styles incoming, but i'am open to better suggestions.

Last edited by @AlphaLemming : 09/30/15 at 08:04 AM.
  Reply With Quote
09/30/15, 08:09 AM   #12
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by @AlphaLemming View Post
Thumb down??? ... oO you mean that post symbol ... that was an accident, not wanted and not removable after posting. Sorry.
Click "Edit" -> "Go Advanced" -> change post icon.
  Reply With Quote
09/30/15, 08:30 AM   #13
Wandamey
Guest
Posts: n/a
Originally Posted by @AlphaLemming View Post
Thumb down??? ... oO you mean that post symbol ... that was an accident, not wanted and not removable after posting. Sorry.

Complete/Crown books i do not check ... there is no indicator on how many missed chapters a player want to see this book marked as needed - so i decided to show all chapters in my overview and if you have a complete book, you can decide for yourself, if you want to use it ... even if only one chapter is missing.

This works fine and is ready for all styles incoming, but i'am open to better suggestions.

seeing how writs weren't updated or even just fixed last DLC I wouldn't bother trying to prevent future retroactive updates anymore either. but that's how i made it before IC so i kept the deployed table.
and from what i've datamined on PTS, i'd say your way is safe for a long time. Yet if something went wrong, just remember that indexes are never written in stone, unlike IDs.
  Reply With Quote
09/30/15, 02:14 PM   #14
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
@Wandermey: The IsItemLinkBookKnown method is what I use in AGS to filter motifs. They are listed in the lore library, so this works the same as with recipes.
Lua Code:
  1. function KnownMotifFilter:FilterPageResult(index, icon, name, quality, stackCount, sellerName, timeRemaining, purchasePrice)
  2.     local itemLink = GetTradingHouseSearchResultItemLink(index, LINK_STYLE_BRACKETS)
  3.     local isKnown = IsItemLinkBookKnown(itemLink)
  4.     return (self.showUnknown and not isKnown) or (self.showKnown and isKnown)
  5. end
  Reply With Quote
09/30/15, 03:43 PM   #15
Wandamey
Guest
Posts: n/a
hehe nice, not sure why i didn't try that. though it's easier to loop in the achievements to register all for account wide data at startup rather than faking all the itemlinks from ids i imagine.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Need Help with achievement id for Glass and Xivkyn

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