View Single Post
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