diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt
index f8dc1b0..06b3c60 100644
--- a/Doc/Changelog.txt
+++ b/Doc/Changelog.txt
@@ -1,3 +1,6 @@
+2018-08-05 version 53
+ Added missing skillquests
+
2018-08-15 version 52-beta-01
Now have HistOfflineBeta.lua.
Additional DLC data.
diff --git a/HistOffline.lua b/HistOffline.lua
index 1476138..5cff283 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -16,7 +16,7 @@ local dname, key, count, ccount, colour, bgcolour
--force_lang = "fr" -- or "de" or "fr" for debugging
-- ========================
-version= "52"
+version= "53"
require( "iuplua" )
require( "iupluacontrols" )
iup.SetGlobal("UTF8MODE","YES")
@@ -854,10 +854,11 @@ end
-- Create SkillQuest Achievements Box==========================
- me.SQ_box= iup.matrix {numcol=4, numcol_visible=4, numlin=5, widthdef=110}
+ me.SQ_box= iup.matrix {numcol=5, numcol_visible=5, numlin=5, widthdef=110}
for i=1, 4 do -- Load headings
me.SQ_box:setcell(0,i, Area_names[i].long)
end
+ me.SQ_box:setcell(0,5, Area_names[4].long) -- Common
me.SQ_box:setcell(0,0, L.Zone)
me.SQ_box:setcell(1,0, "1")
me.SQ_box:setcell(2,0, "2")
@@ -875,7 +876,7 @@ end
-- Need to keep track of multiple achievements for SQ in Zones. Index them by zone LineColumn.
- for C=1, 4 do
+ for C=1, 5 do
ccount = 0 -- per column
for L = 1, 5 do
key = tostring(L) .. tostring(C) -- make name key
diff --git a/HistOfflineBeta.lua b/HistOfflineBeta.lua
index 501824b..6a91888 100644
--- a/HistOfflineBeta.lua
+++ b/HistOfflineBeta.lua
@@ -16,7 +16,7 @@ local dname, key, count, ccount, colour, bgcolour
--force_lang = "fr" -- or "de" or "fr" for debugging
-- ========================
-version= "52-Beta-01"
+version= "52-Beta-02"
require( "iuplua" )
require( "iupluacontrols" )
require( "iupluamatrixex" )
@@ -856,10 +856,11 @@ end
-- Create SkillQuest Achievements Box==========================
- me.SQ_box= iup.matrix {numcol=4, numcol_visible=4, numlin=5, widthdef=110}
+ me.SQ_box= iup.matrix {numcol=5, numcol_visible=5, numlin=5, widthdef=110}
for i=1, 4 do -- Load headings
me.SQ_box:setcell(0,i, Area_names[i].long)
end
+ me.SQ_box:setcell(0,5, Area_names[4].long) -- Common
me.SQ_box:setcell(0,0, L.Zone)
me.SQ_box:setcell(1,0, "1")
me.SQ_box:setcell(2,0, "2")
@@ -877,7 +878,7 @@ end
-- Need to keep track of multiple achievements for SQ in Zones. Index them by zone LineColumn.
- for C=1, 4 do
+ for C=1, 5 do
ccount = 0 -- per column
for L = 1, 5 do
key = tostring(L) .. tostring(C) -- make name key
@@ -1015,13 +1016,14 @@ end
me.DLC2_tabs = iup.flattabs{} -- we add our tabs to here for display. (list of vboxes)
-
+ local wrap_size = math.floor(250/3.7)
+ -- print ("wrap_size: " .. wrap_size)
for i,dlc in ipairs (DLC_Order) do
me.DLC2[dlc] = {}
me.DLC2[dlc].box = iup.matrix {READONLY="YES", numcol=4, numcol_visible=4, numlin=#DLC_Dat2[dlc].line, widthdef=110}
iup.SetAttribute(me.DLC2[dlc].box,"WIDTH1", 50)
- iup.SetAttribute(me.DLC2[dlc].box,"WIDTH3", 350)
+ iup.SetAttribute(me.DLC2[dlc].box,"WIDTH3", 250) --Size is about 1/4 of character
iup.SetAttribute(me.DLC2[dlc].box,"ALIGNMENT1", "ACENTER")
iup.SetAttribute(me.DLC2[dlc].box,"ALIGNMENT2", "ALEFT")
iup.SetAttribute(me.DLC2[dlc].box,"ALIGNMENT3", "ALEFT")
@@ -1038,14 +1040,12 @@ end
me.DLC2[dlc].box:setcell(line, 1, tostring(id))
me.DLC2[dlc].box:setcell(line, 2, Ach_Detail[id].name)
- local ll = string.gsub(Ach_Detail[id].description,"%.%s","\n")
-
- -- me.DLC2[dlc].box:setcell(line, 3, Ach_Detail[id].description)
- me.DLC2[dlc].box:setcell(line, 3, ll)
- if (string.find(Ach_Detail[id].description,"%.%s")) then
- iup.SetAttribute(me.DLC2[dlc].box,"FITTOTEXT", "L".. tostring(line))
- -- print("Updateing line: .. " ..Ach_Detail[id].description )
- end
+ local split = split_w(Ach_Detail[id].description) -- Split into array of words
+ local flow = flow_w(split, wrap_size)
+ -- print(join_s(flow))
+ -- print("")
+ me.DLC2[dlc].box:setcell(line, 3, join_s(flow))
+ iup.SetAttribute(me.DLC2[dlc].box,"FITTOTEXT", "L".. tostring(line))
local bgcolour1 = "BGCOLOR" .. tostring(line) .. ":1" --Detail and Description Columns
diff --git a/data/Quest.lua b/data/Quest.lua
index dc68e82..e0b7dc7 100644
--- a/data/Quest.lua
+++ b/data/Quest.lua
@@ -85,10 +85,56 @@ SQ_dat = {
[614] = {L=1, C=4, ["link1"] = "http://www.uesp.net/wiki/Online:The_Final_Assault"},
[612] = {L=1, C=4, ["link1"] = "http://www.uesp.net/wiki/Online:Light_from_the_Darkness"},
-
-[1870] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Naryu%27s_Confidant"}, --"Naryu's Confidant"
-[1869] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Rising_Sun"}, -- Rising Sun
-[1852] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Champion_of_Vivec"}, --Champion of Vivec
--- [614] = {L=2, C=4, ["link1"] = "http://www.uesp.net/wiki/Online:The_Final_Assault"},
--- [612] = {L=2, C=4, ["link1"] = "http://www.uesp.net/wiki/Online:Light_from_the_Darkness"},
+-- TG
+[1360] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Always_Travel_Separately"}, --Cleaning House "Always Travel Separately", "Complete quest \"Cleaning House\" in Hew's Bane.",
+[1370] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Iron_Wheel_Infiltration"}, --The Long Game "Iron Wheel Infiltration", "Complete quest \"The Long Game\" in Hew's Bane.",
+[1361] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Never,_Ever_Steal_From_the_Guild"}, -- "Never, Ever Steal From the Guild", "Complete quest \"A Flawless Plan\" in Hew's Bane.",
+[1362] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Wedding_Crashers"}, --"Wedding Crashers", "Complete quest \"Forever Hold Your Peace\" in Hew's Bane.",
+[1363] = {L=2, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Broken_Wheel"}, -- "Broken Wheel", "Complete quest \"Prison Break\" in Hew's Bane.",
+
+
+--Brotherhood
+[1436] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Dark_Initiate"}, -- Signed in Blood "Dark Initiate", "Complete the \"Signed in Blood\" Dark Brotherhood quest in the Gold Coast.",
+[1438] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Sermonizer_Subduer"}, -- A Lesson in Silence "Sermonizer Subduer","Complete the \"A Lesson in Silence\" Dark Brotherhood quest in the Gold Coast.",
+[1439] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Brethren_Benefactor"}, -- Questions of Faith "Brethren Benefactor", "Complete the \"Questions of Faith\" Dark Brotherhood quest in the Gold Coast.",
+[1440] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Assassin_(achievement)"}, -- A Special Request"Assassin", "Complete the \"A Special Request\" Dark Brotherhood quest in the Gold Coast.",
+[1441] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Dark_Discovery"}, -- Dark Revelations "Dark Discovery", "Complete the \"Dark Revelations\" Dark Brotherhood quest in the Gold Coast.",
+[1442] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Dark_Investigator"}, -- A Ghost from the Past "Dark Investigator","Complete the \"A Ghost from the Past\" Dark Brotherhood quest in the Gold Coast.",
+[1443] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Wrath_of_Sithis"}, -- The Wrath of Sithis "Wrath of Sithis", "Complete \"The Wrath of Sithis\" Dark Brotherhood quest in the Gold Coast.",
+[1444] = {L=3, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Silencer"}, -- "Silencer", Filling the Void "Complete the \"Filling the Void\" Dark Brotherhood quest in the Gold Coast.",
+
+
+-- IC
+[1175] = {L=4, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:The_Sublime_Brazier"}, --"The Sublime Protector",
+
+--Vvardenfell
+[1870] = {L=5, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Naryu%27s_Confidant"}, --"Naryu's Confidant" Family Reunion http://en.uesp.net/wiki/Online:Family_Reunion
+[1869] = {L=5, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Rising_Sun"}, -- The Heart of a Telvanni http://en.uesp.net/wiki/Online:The_Heart_of_a_Telvanni
+[1852] = {L=5, C=4, ["link1"] = "http://en.uesp.net/wiki/Online:Champion_of_Vivec"}, --Champion of Vivec
+
+
+--next Column
+-- Orsinium
+[1325] = {L=1, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:A_King-Sized_Problem"}, -- A King-Sized Problem "Orc King's Councilor","Complete quest \"A King-Sized Problem\" in Wrothgar.",
+[1326] = {L=1, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:The_Anger_of_a_King"}, -- The Anger of a King "Orc King's Marshal","Complete quest \"The Anger of a King\" in Wrothgar.",
+[1327] = {L=1, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Blood_on_a_King%27s_Hands"}, --Blood on a King's Hands "Orc King's Conqueror", "Complete quest \"Blood on a King's Hands\" in Wrothgar.",
+
+--Clockwork
+[2050] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:To_The_Clockwork_City"}, --To The Clockwork City "Land of Gears and Cogs","Complete the \"To the Clockwork City\" quest.",
+[2058] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:In_Search_of_a_Sponsor"}, -- In Search of a Sponsor "Clockwork Citizen","Complete the \"In Search of a Sponsor\" quest.",
+[2059] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:The_Strangeness_of_Seht"}, -- The Strangeness of Seht "Smoke and Mirrors","Complete the \"The Strangeness of Seht\" quest.",
+[2060] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Deepening_Shadows"}, -- Deepening Shadows "Middle-Man", "Complete the \"Deepening Shadows\" quest.",
+[2061] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Lost_in_the_Gloam"}, -- Lost in the Gloam "Birds of a Feather","Complete the \"Lost in the Gloam\" quest.",
+[2062] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Unto_the_Dark"}, -- Unto the Dark "Shadow Boxing", "Complete the \"Unto the Dark\" quest.",
+[2063] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Where_Shadows_Lie"}, --Where Shadows Lie The Real Sotha Sil" "Complete the \"Where Shadows Lie\" quest.",
+[2064] = {L=2, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:The_Light_of_Knowledge"}, -- The Light of Knowledge "The Burden of Knowledge", "Complete the \"The Light of Knowledge\" quest.",
+
+--Summerset
+[2203] = {L=3, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Buried_Memories"}, -- Buried Memories "Mind Games", "Complete the \"Buried Memories\" quest.",
+[2206] = {L=3, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:Lost_in_Translation"}, -- Lost in Translation "Unreliable Narrator", "Complete the \"Lost in Translation\" quest.",
+[2208] = {L=3, C=5, ["link1"] = "http://en.uesp.net/wiki/Online:The_Crystal_Tower"}, -- The Crystal Tower What Must Be Done", "Complete the \"The Crystal Tower\" quest.",
+--[[
+
+
+--]]
}
diff --git a/data/Strings.lua b/data/Strings.lua
index 7f4fed8..692def7 100644
--- a/data/Strings.lua
+++ b/data/Strings.lua
@@ -1,6 +1,5 @@
--Functions relating to Strings
-
-- take a string and break by spaces to an array
split_w = function (astring) -- String sentence
if (astring == nil) then
@@ -13,40 +12,18 @@ split_w = function (astring) -- String sentence
table.insert(words,w)
end
return words --array of the words
-end
-split_s = function(astring)
- local sentences = {}
- local sofar = ""
- local words = split_w(astring)
- if #words < 2 then return(words) end
-
- for i,s in ipairs(words) do
- if (sofar == "") then --no leading blank
- sofar = tostring(s)
- else
- sofar = sofar .." " .. tostring(s)
- end
-
-
- if (i == #words) then
- -- add last word unconditionally and return
- table.insert(sentences,sofar)
- return sentences
- end
-
- if string.find(s,"%.") then
- table.insert(sentences,sofar)
- sofar = ""
- end
- end
- print("Should never get here")
-end
+end
+
+
+--[[
test = "In Veteran White-Gold Tower, become completely engulfed in flame by the Planar Inhibitor's Heat Stroke attack before it completes its Daedric Catastrophe attack. Then stay alive until the Planar Inhibitor is defeated."
---split = split_w(test)
---print("returned a table of " .. #split .. " words.")
+split = split_w(test)
+print("Split_w returned a table of " .. #split .. " words.")
+
+--print(dump(split))
+--]]
-
-flow_s = function( words_t, max_length )
+flow_w = function( words_t, max_length )
--[[ given an array of words { [1]="TENTENTEN0", [2] = "FOUR", [3]="THREE"}
return an array of array of words so that the length is not greater than max_length
with max_length 10
@@ -55,20 +32,21 @@ with max_length 10
}
--]]
if words_t == nil then
- print("words_t is nil")
+ print("words_t is nil in flow_s")
return nil
end
if type(max_length) ~= "number" then
- print("max_length is not a number")
+ print("max_length is not a number in flow_s")
+ print("max_length is type " .. type(max_length) .. " in flow_s")
return nil
end
- result = {}
- line_t = {}
- line_len = 0
+ local result = {}
+ local line_t = {}
+ local line_len = 0
for i, word in ipairs (words_t) do
-- print (word)
if (string.len(word) + line_len) > max_length then
@@ -88,25 +66,35 @@ with max_length 10
end
- join_s = function (words_tt)
---given an array of array of words (output from flow_s) Produce a string with \n
- if words_t == nil then
+join_s = function (words_tt)
+--given an array of array of words (output from flow_w) Produce a string with \n
+ if words_tt == nil then
print("parameter nil in join_s")
return nil
end
- local result = ""
- for _,words_t in ipairs (words_tt) do
+ local result = ""
- for _,word in ipairs (words_t) do
+ for i,words_t in ipairs (words_tt) do
+ for _,word in ipairs (words_t) do
+ result = result .. " " .. word
+ end
+ if ( i ~= #words_tt) then
+ result = result .."\n" -- Don't add Trailing \n on last line.
end
-
end
+ return result
+end
+
+--[[
-
-end
-
-print(join_w(split_w(test)))
-
+test = "In Veteran White-Gold Tower, become completely engulfed in flame by the Planar Inhibitor's Heat Stroke attack before it completes its Daedric Catastrophe attack. Then stay alive until the Planar Inhibitor is defeated."
+split_words = split_w(test)
+--print("Split_w returned a table of " .. #split .. " words.")
+flow_words = flow_w(split_words, 60)
+flow_string = join_s(flow_words)
+--print(dump(split))
+print(flow_string)
+--]]
diff --git a/data/de/de.lua b/data/de/de.lua
index 375edcc..fc34627 100644
--- a/data/de/de.lua
+++ b/data/de/de.lua
@@ -278,8 +278,10 @@ Locations = {
["24"] = "Diebesgilde",
["34"] = "Dark Brotherhood",
["44"] = "VVardenfell",
- ["54"] = "Stadt der Uhrwerke",
- ["64"] = "Sommersend",
+ --Other
+ ["15"] = "Orsinium",
+ ["25"] = "Stadt der Uhrwerke",
+ ["35"] = "Sommersend",
}
DLC_Location_names = {
diff --git a/data/en/en.lua b/data/en/en.lua
index aaf91a4..eb4ff61 100644
--- a/data/en/en.lua
+++ b/data/en/en.lua
@@ -260,7 +260,7 @@ Trials_Names["VH"] = {
["61"] = "Craglorn Trials Conqueror",
}
-Locations = { -- Used for WB
+Locations = { -- Used for WB and SQ
--EP
["11"] = "Stonefalls",
["21"] = "Deshaan",
@@ -283,9 +283,15 @@ Locations = { -- Used for WB
["14"] = "Coldharbour",
["24"] = "Thieves Guild",
["34"] = "Dark Brotherhood",
- ["44"] = "VVardenfell",
- ["54"] = "Clockwork City",
- ["64"] = "Summerset",
+ ["44"] = "Imperial City",
+ ["54"] = "VVardenfell",
+ --Other
+ ["15"] = "Orsinium",
+ ["25"] = "Clockwork City",
+ ["35"] = "Summerset",
+--Other
+
+
}
DLC_Location_names = {
diff --git a/data/fr/fr.lua b/data/fr/fr.lua
index 671ef9b..f8506c1 100644
--- a/data/fr/fr.lua
+++ b/data/fr/fr.lua
@@ -279,8 +279,10 @@ Locations = {
["24"] = "Thieves Guild",
["34"] = "Dark Brotherhood",
["44"] = "VVardenfell",
- ["54"] = "Cité mécanique",
- ["64"] = "Summerset",
+--other
+ ["15"] = "Orsinium",
+ ["25"] = "Cité mécanique",
+ ["35"] = "Summerset",
}
DLC_Location_names = {
diff --git a/data/ids.lua b/data/ids.lua
index 099f251..b0ce309 100644
--- a/data/ids.lua
+++ b/data/ids.lua
@@ -175,9 +175,40 @@ hist.IDs = {
[1504] = true,
-- SQ
[512] = true,
+[2050] = true,
[516] = true,
[517] = true,
[518] = true,
+[2058] = true,
+[2059] = true,
+[2060] = true,
+[2061] = true,
+[2062] = true,
+[2063] = true,
+[2064] = true,
+[145] = true,
+[146] = true,
+[147] = true,
+[1175] = true,
+[536] = true,
+[537] = true,
+[154] = true,
+[155] = true,
+[28] = true,
+[30] = true,
+[31] = true,
+[1440] = true,
+[1441] = true,
+[1442] = true,
+[1443] = true,
+[1444] = true,
+[1325] = true,
+[1326] = true,
+[1327] = true,
+[950] = true,
+[184] = true,
+[185] = true,
+[1852] = true,
[201] = true,
[204] = true,
[589] = true,
@@ -185,43 +216,40 @@ hist.IDs = {
[335] = true,
[336] = true,
[209] = true,
-[146] = true,
-[147] = true,
+[1362] = true,
+[1363] = true,
[597] = true,
[598] = true,
[599] = true,
-[536] = true,
-[537] = true,
-[154] = true,
-[155] = true,
-[28] = true,
+[1370] = true,
[605] = true,
-[30] = true,
-[31] = true,
+[606] = true,
+[607] = true,
[612] = true,
[613] = true,
[614] = true,
+[2208] = true,
[360] = true,
[361] = true,
[362] = true,
[363] = true,
[364] = true,
[365] = true,
-[145] = true,
+[2206] = true,
+[2203] = true,
[1869] = true,
[1870] = true,
+[1439] = true,
+[1438] = true,
+[1436] = true,
+[1361] = true,
+[1360] = true,
[538] = true,
[99999999] = true,
[283] = true,
[284] = true,
[156] = true,
-[950] = true,
[337] = true,
-[184] = true,
-[185] = true,
-[607] = true,
-[606] = true,
-[1852] = true,
[591] = true,
[510] = true,
[511] = true,
@@ -374,24 +402,16 @@ hist.IDs = {
-- DLC2 Thieves Guild
[1377] = true,
[1371] = true,
-[1362] = true,
[1376] = true,
-[1361] = true,
[1378] = true,
-[1370] = true,
[1365] = true,
[1394] = true,
[1354] = true,
[1404] = true,
-[1363] = true,
[1349] = true,
[1402] = true,
-[1360] = true,
[1375] = true,
-- DLC2 Dark Brotherhood
-[1443] = true,
-[1444] = true,
-[1438] = true,
[1437] = true,
[1454] = true,
[1410] = true,
@@ -404,23 +424,15 @@ hist.IDs = {
[1451] = true,
[1435] = true,
[1425] = true,
-[1442] = true,
-[1436] = true,
-[1441] = true,
-[1439] = true,
[1457] = true,
[1450] = true,
[1434] = true,
-[1440] = true,
-- DLC2 Orsinium
[1324] = true,
[1257] = true,
[1331] = true,
[1237] = true,
[1235] = true,
-[1326] = true,
-[1325] = true,
-[1327] = true,
[1247] = true,
[1240] = true,
[1238] = true,
@@ -437,7 +449,6 @@ hist.IDs = {
[1261] = true,
[1182] = true,
[1276] = true,
-[1175] = true,
[1109] = true,
[1185] = true,
[1306] = true,
@@ -537,17 +548,9 @@ hist.IDs = {
-- DLC2 Clockwork City
[2074] = true,
[2048] = true,
-[2063] = true,
-[2064] = true,
-[2059] = true,
-[2062] = true,
[1958] = true,
-[2060] = true,
-[2050] = true,
[2049] = true,
[2047] = true,
-[2058] = true,
-[2061] = true,
-- DLC2 Morrowind
[1806] = true,
[1849] = true,
@@ -572,9 +575,7 @@ hist.IDs = {
[1835] = true,
-- DLC2 Summerset
[2235] = true,
-[2208] = true,
[2221] = true,
-[2206] = true,
[2213] = true,
[2243] = true,
[2135] = true,
@@ -598,7 +599,6 @@ hist.IDs = {
[2253] = true,
[2257] = true,
[2202] = true,
-[2203] = true,
[2211] = true,
[2181] = true,
[2096] = true,
diff --git a/history.lua b/history.lua
index 963ae5f..f6c595f 100644
--- a/history.lua
+++ b/history.lua
@@ -1,6 +1,6 @@
hist = {
name = "history",
- version = "38",
+ version = "53",
initialised = false,
SV={},
L={},
@@ -40,7 +40,6 @@ table.insert(hist.me.log,{["TimeStamp"]=GetTimeStamp(),
end
local Keep_Achievement = function (id) -- is this an achievement we want to save?
-
if hist.IDs[id] then
return true
else
@@ -77,18 +76,9 @@ end
end
local function Achievement(_, name, points, id, link)
- local description
- local category_id = GetCategoryInfoFromAchievementId(id)
- local category_name =GetAchievementCategoryInfo(category_id)
- _,description,_,_,_,_,_= GetAchievementInfo(id)
if Keep_Achievement(id) then
hist.me.ach[id] = {}
- hist.me.ach[id].Category_ID = category_id
- hist.me.ach[id].Category = category_name
hist.me.ach[id].time = GetTimeStamp()
- hist.me.ach[id].points = points
- hist.me.ach[id].name = zo_strformat(name)
- hist.me.ach[id].description = zo_strformat(description)
hist.me.ach[id].link = link
if hist.debug then
@@ -111,30 +101,31 @@ function load_history()
local reject = 0
local flag = 0
for i = 1,3000 do
- name,description,points,_,completed,adate,atime= GetAchievementInfo(i)
+ if Keep_Achievement(i) then
+ name,description,points,_,completed,adate,atime= GetAchievementInfo(i)
if completed then
- local category_id = GetCategoryInfoFromAchievementId(i) -- nil if bad
- if category_id ~= nil and Keep_Achievement(i) then
if hist.me.ach[i] == nil then
hist.me.ach[i] = {}
- hist.me.ach[i].Category_ID = category_id
- hist.me.ach[i].Category = GetAchievementCategoryInfo(category_id)
hist.me.ach[i].time = (luatz_esodate(adate .. " " .. atime)+ hist.tz_offset)
- hist.me.ach[i].points = points
- hist.me.ach[i].name = zo_strformat(name)
- hist.me.ach[i].description = zo_strformat(description)
hist.me.ach[i].link = GetAchievementLink(i)
count = count + 1
+ else
+ -- Remove these as obsolete these
+ hist.me.ach[i].points = nil
+ hist.me.ach[i].name = nil
+ hist.me.ach[i].description = nil
+ hist.me.ach[i].Category_ID = nil
+ hist.me.ach[i].Category = nil
end
- else
- reject = reject +1
- end
+ else -- not completed
+ reject = reject +1
end
- end
- log("Added " .. tostring(count) .. " historic achievements.")
- if hist.debug then
+ end --Keep
+ end --for
+ log("Added " .. tostring(count) .. " historic achievements.")
+ if hist.debug then
d("Added " .. count .. " achievements.")
- d("Rejected " .. reject .. " achievements.")
+ d("Rejected " .. reject .. " achievements as not completed")
end
end
@@ -158,7 +149,7 @@ local function fix() -- fix links etc for any old data
end
end
local msg
- msg = obsolete .. " obsolete achievments removed."
+ msg = obsolete .. " obsolete achievements removed."
log (msg)
if hist.debug then
d(msg)
@@ -429,7 +420,8 @@ if (hist.name ~= addOnName) then return end
log("hist.SV.log created")
end
- if debug then
+ if hist.debug then
+ log("debug is on")
log("now: " .. now)
log("hist.datestr: " .. hist.datestr)
log("hist.timestr: " .. hist.timestr)
@@ -504,7 +496,7 @@ if (hist.name ~= addOnName) then return end
--- hist.SV.version -- Used by ZOS System, dont touch
if hist.SV.data[hist.playerID] == nil then
- if debug then
+ if hist.debug then
log("No data found for PlayerID")
end
-- Ok playerID may be nil, but we might still have data under player name
@@ -533,9 +525,6 @@ if (hist.name ~= addOnName) then return end
hist.me.level = hist.me.base_level + hist.me.veteran_level
hist.me.world = GetWorldName()
-
-
-
if hist.me.levels == nil then
hist.me.levels = {}
end