EideticData.lua: function LoreBooks_GetEideticDataForCollection(collectionIndex) local eideticInZone = {} local _, _, _, totalBooks = GetLoreCollectionInfo(2, collectionIndex) for bookIndex = 1, totalBooks do if EideticValidEntry(collectionIndex, bookIndex) then local eideticData = LoreBooks_GetEideticData(2, collectionIndex, bookIndex) if eideticData then local found = false if eideticData.e then for _, bookData in ipairs(eideticData.e) do bookData.c = collectionIndex -- Add collectionIndex bookData.b = bookIndex -- Add bookIndex bookData.q = eideticData.q -- Add quest info bookData.qm = eideticData.qm -- Add quest map info bookData.qt = eideticData.qt -- Add quest type info if eideticData.r then bookData.r = eideticData.r -- Is on bookshelf end if eideticData.m then bookData.m = eideticData.m -- Map data end table.insert(eideticInZone, bookData) found = true end end if not found then if eideticData.m then eideticData.c = collectionIndex eideticData.b = bookIndex table.insert(eideticInZone, eideticData) end end end end end return eideticInZone end function LoreBooks_GetLoreCollectionName(categoryIndex, collectionIndex) return eideticData[categoryIndex][collectionIndex].n[GetCVar("Language.2")] end LoreBooks.lua: local function BuildEideticReport2(lastObject) local THRESHOLD_EIDETIC = 2000 local eideticHeaderText = GetControl(LoreBooksReport, "EideticHeaderText") eideticHeaderText:ClearAnchors() eideticHeaderText:SetAnchor(TOPLEFT, LoreBooksReportContainerScrollChild, TOPLEFT, 4, lastObject) if totalCurrentlyCollected >= THRESHOLD_EIDETIC then eideticHeaderText:SetText(GetString(LBOOKS_RE_FEW_BOOKS_MISSING)) copyReport = copyReport .. "\n\n" .. GetString(LBOOKS_RE_FEW_BOOKS_MISSING) local totalBooks = 0 local eideticData = {} local eideticSeen = {} local yCollectionIndex = lastObject + 48 local categoryName, numCollections = GetLoreCategoryInfo(2) -- Only Eidetic for collectionIndex = 1, numCollections do eideticData[collectionIndex] = {} eideticBooks = LoreBooks_GetEideticDataForCollection(collectionIndex) if eideticBooks then for _, bookData in ipairs(eideticBooks) do local _, _, known = GetLoreBookInfo(2, bookData.c, bookData.b) if not known and not eideticSeen[bookData.c .. "-" .. bookData.b] then table.insert(eideticData[collectionIndex], bookData) eideticSeen[bookData.c .. "-" .. bookData.b] = true end end -- Create controls local totalInCollection = #eideticData[collectionIndex] if totalInCollection > 0 then local eideticBooksInCollection = GetControl(LoreBooksReportContainerScrollChild, "BooksInMap" .. collectionIndex) local eideticCollectionName = GetControl(LoreBooksReportContainerScrollChild, "MapName" .. collectionIndex) local eideticReportForCollection = GetControl(LoreBooksReportContainerScrollChild, "ReportForMap" .. collectionIndex) if not eideticCollectionName then eideticBooksInCollection = CreateControlFromVirtual("$(parent)BooksInMap", LoreBooksReportContainerScrollChild, "Lorebook_EideticBooksInMap_Template", collectionIndex) eideticCollectionName = CreateControlFromVirtual("$(parent)MapName", LoreBooksReportContainerScrollChild, "Lorebook_EideticMapName_Template", collectionIndex) eideticReportForCollection = CreateControlFromVirtual("$(parent)ReportForMap", LoreBooksReportContainerScrollChild, "Lorebook_EideticReportForMap_Template", collectionIndex) end eideticBooksInCollection:SetAnchor(TOPLEFT, LoreBooksReportContainerScrollChild, TOPLEFT, 0, yCollectionIndex) eideticCollectionName:SetAnchor(TOPLEFT, LoreBooksReportContainerScrollChild, TOPLEFT, 25, yCollectionIndex) eideticReportForCollection:SetAnchor(TOPLEFT, LoreBooksReportContainerScrollChild, TOPLEFT, 50, yCollectionIndex + 24) local collectionName = LoreBooks_GetLoreCollectionName(2, collectionIndex); eideticBooksInCollection:SetText(totalInCollection) eideticCollectionName:SetText(zo_strformat(SI_WINDOW_TITLE_WORLD_MAP, collectionName)) local eideticReport = "" for index, data in ipairs(eideticData[collectionIndex]) do local bookName = GetLoreBookInfo(2, data.c, data.b) local bookLocation = "" if data.r then bookLocation = "[B] " else bookLocation = "[" .. GetMapNameByIndex(data.m) .. "] " end eideticReport = zo_strjoin("; ", bookLocation .. bookName, eideticReport) end if string.len(eideticReport) > 0 then eideticReport = string.sub(eideticReport, 0, -3) end eideticReportForCollection:SetText(eideticReport) copyReport = copyReport .. "\n\n" .. zo_strformat("<<1>> (<<2>>):\n<<3>>", zo_strformat(SI_WINDOW_TITLE_WORLD_MAP, collectionName), totalInCollection, eideticReport) eideticReportForCollection:GetHeight() -- Needed to let the UI recalculate the correct value. Anchors could be optimized. yCollectionIndex = yCollectionIndex + eideticReportForCollection:GetHeight() + 32 totalBooks = totalBooks + totalInCollection end end end copyReport = copyReport .. "\n\nTotal Remaining: " .. totalBooks else eideticHeaderText:SetText(GetString(LBOOKS_RE_THREESHOLD_ERROR)) copyReport = copyReport .. "\n\n" .. GetString(LBOOKS_RE_THREESHOLD_ERROR) end end Modified to use BuildEideticReport2: local function BuildLoreBookSummary() local lastObject = BuildShalidorReport() BuildEideticReport2(lastObject) LoreBooksCopyReport:GetNamedChild("Content"):GetNamedChild("Edit"):SetText(copyReport) end