Go to Page... |
|
Thread Tools | Display Modes |
06/21/24, 02:56 AM | #1 | |
Join Date: Jun 2024
Posts: 1
|
edit BMU, don't show leads with complete codex
Hello everybody, I'm new to modifying addons and even more new to LUA. I'm trying to modify the Beam Me Up addon in a way that it doesn't show in my UI the leads that have completed codex.
In the following image, I'd like for Sacred Resin to be displayed, but not Draoife Storystone. The issue is that I can't find a way to tell the addon to filter the results of the search by codex entries. If I try the addon crashes ^^" In a very generic question, how would a beginner tackle this? How do I find functions/methods to lookup what I need? In my search I found just two snippets of code that handle antiquities, but modifying either leads to an addon crash on menu opening so I'm sure I'm doing something wrong. Code:
if BMU.savedVarsChar.displayAntiquityLeads.scried or BMU.savedVarsChar.displayAntiquityLeads.srcyable then -- seperately: go over all leads and add them to "portalPlayers" and "unrelatedItemsRecords" local antiquityId = GetNextAntiquityId() while antiquityId do if DoesAntiquityHaveLead(antiquityId) then local zoneId = GetAntiquityZoneId(antiquityId) local achievedGoals = GetNumGoalsAchievedForAntiquity(antiquityId) -- leads that are already scried (at least one "achieved goal" in lead scry progress) if (BMU.savedVarsChar.displayAntiquityLeads.scried and achievedGoals > 0) or -- leads that are are scryable (no progress) (BMU.savedVarsChar.displayAntiquityLeads.srcyable and achievedGoals == 0) then -- check if lead can be matched to an entry in portalPlayers table local isRelated, updatedRecord, recordIndex = BMU.leadIsRelated(portalPlayers, antiquityId) if isRelated then -- lead is related and connected to an entry in portalPlayers table -- update record in portalPlayers portalPlayers[recordIndex] = updatedRecord else -- lead cannot be assigned to an entry in portalPlayers table -- check if a record for the zone already exists local record = unrelatedItemsRecords[zoneId] if not record then -- create new record record = BMU.createClickableZoneRecord(zoneId) end -- add lead to the record record = BMU.addLeadInformation(record, antiquityId) -- save record unrelatedItemsRecords[zoneId] = record end end end antiquityId = GetNextAntiquityId(antiquityId) end end Code:
-- count leads local antiquityId = GetNextAntiquityId() while antiquityId do if DoesAntiquityHaveLead(antiquityId) then counter_table["leads"] = counter_table["leads"] + 1 end antiquityId = GetNextAntiquityId(antiquityId) end local list_counters = {counter_table["alchemist"], counter_table["enchanter"], counter_table["woodworker"], counter_table["blacksmith"], counter_table["clothier"], counter_table["jewelry"], counter_table["treasure"], counter_table["leads"]} local text = string.format("|t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_alchemy.dds|t: %d |t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_enchanting.dds|t: %d " .. "|t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_woodworking.dds|t: %d |t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_smithy.dds|t: %d " .. "|t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_clothier.dds|t: %d |t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_jewelrycrafting.dds|t: %d " .. "|t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_bank.dds|t: %d |t<dim>:<dim>:esoui/art/icons/servicemappins/servicepin_antiquities.dds|t: %d", unpack(list_counters)) Last edited by Dragona7Power : 06/21/24 at 03:02 AM. |
|
06/21/24, 03:06 AM | #2 |
I'd start with finding the place in BMU where it is output at that tooltip.
Maybe "InformationTooltip" tooltip variable is used there, so search for it. And then search for text used at the tooltip like "Codex" or lookup here the string constant that ES uses (SI_*) for the translation of codex: https://github.com/esoui/esoui/blob/...tedstrings.lua -> Could be this e.g. "Codex", -- SI_ANTIQUITY_LOG_BOOK So search in BMU code for "Codex" or SI_ANTIQUITY_LOG_BOOK then If you find that, find the variables used to display that <done>/<total> text line. After that either check how it was done in the BMU code and change it to not add the varibales to the output tables for the tooltip if done == total. Or just add an if done ~= total then outout the line end And if you know how to use merTorchbug or zgoo then move your mouse above the control where the tooltip shows from and use /tbm (or /tbug mouse) or /zgoo mouse to inspect the conrtol below the mouse cursor. Check the name etc. and try to find that name, or parts of it (the end/suffix) as the beginning is the Parent control's name) in BMU code and XML files. And then check if the XML provides a handler like <OnMouseEnter> where you see a function like BMU.ShowRowTooltip() etc. and then find that function. Or the handler is in lua code -> :SetHandler("OnMouseEnter", To your BMU code examples: The top code seems to be like a loop above all leads and then trying to match if it is still to be digged etc. and then mathcing it to a zone where some player currently is. It's not adding any info to tooltips etc. It just seems to detect if any player is in a zone, if you e.g. enable the "survey/leads/treasure maps" filter tab! The bottom one looks like the summary line at the bottom of the BMU "survey/leads/treasure maps" tab UI (not that tooltip) that shows the surveys and leads found, with icons of the professions etc. Last edited by Baertram : 06/21/24 at 03:18 AM. |
|
ESOUI » Developer Discussions » General Authoring Discussion » edit BMU, don't show leads with complete codex |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|