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.

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)
					-- leads that are are scryable (no progress)
					(BMU.savedVarsChar.displayAntiquityLeads.srcyable and achievedGoals == 0)
					-- 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
						-- 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)
						-- add lead to the record
						record = BMU.addLeadInformation(record, antiquityId)
						-- save record
						unrelatedItemsRecords[zoneId] = record
			antiquityId = GetNextAntiquityId(antiquityId)
-- count leads
	local antiquityId = GetNextAntiquityId()
	while antiquityId do
		if DoesAntiquityHaveLead(antiquityId) then
			counter_table["leads"] = counter_table["leads"] + 1
		antiquityId = GetNextAntiquityId(antiquityId)
	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/|t: %d   |t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   " ..
	"|t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   |t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   " ..
	"|t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   |t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   " ..
	"|t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d   |t<dim>:<dim>:esoui/art/icons/servicemappins/|t: %d", unpack(list_counters))
Edit: Quick edit just to add that this change is intended for personal use, I don't want to publish this anywhere, if it's important.

Last edited by Dragona7Power : 06/21/24 at 03:02 AM.
  Reply With Quote
06/21/24, 03:06 AM   #2
Super Moderator
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,098
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:
-> 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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » edit BMU, don't show leads with complete codex

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