"Only Loadable on Demand"

So I haven’t seen anything posted about this yet and if I have, its years old with no info on how to actually fix this.

I have several addons that all say “only loadable on demand”. All of the addons and depend addons are all checked as usual but nothing will trigger the addon to turn on. for example typing /msbt would always open the menu. As of now, whenever I go to load the addon it no longer works even though it’s all up to date, boxes checked, but wont load. No matter what I do as in uninstalling the addons, reinstalling the addons, using them only on one character, ect.

So when and how will I be able to MANUELY turn them on because the only way to trigger the addon is disabled.

IMO can we please get the addons menu back in the lower left corner? I genuinely don’t want to play if the addons I’ve been using for 15 years have just stopped working.

P.S. - I don’t care if this is a memory saving thing yall changed cuz it’s dog poop now.

Your addons will need updating as some function calls have been changed, primarly the ones that are Load On Demand require changes to functions like IsAddonLoaded and LoadAddOn to be C_AddOns.IsAddonLoaded and C_AddOns.LoadAddOn

Then none of them are up to date if that’s the case even though I just did a fresh install of them to the latest update just before posting thing.

I’ll give it another shot but I just miss having addons be a resource hog and always on vs this crap.

MSBT says it’s last update was for 10.2 (Dragonflight). There have been various changes for 11.0.0 and 11.0.2 including the those mentioned above

The dependence is there and everything checked which is why I don’t get that it’s not triggering. Unless it’s brand new to this update MSBT shouldn’t have been working for the last 2 major patches, yet it did.

Time to go change the code myself to adjust for this change.

So aggravating that I can’t just check a box and move on.

Anywhere i can look to add the IsAddonLoaded and other lines I need to make this work?

If you turn script errors on, you will see that MSBT has several errors primarly caused buy function name changes beyond just those two.

Hey! I made a fan edit for 11.0.2 for MSBT, everything seems to be working like normal, including the slash command, options and other areas like the cooldown ready “pop”
I did reach out to the original author & maintainer to see if we can push an official release, but nothing yet

2 Likes

Should make the change from GetItemInfo to C_Item.GetItemInfo now as its going to cause problems in the future since the latter is deprecated and will eventually be dropped.

Yep I know, there’s a bunch of Get… That have new C_. I’ll have to change a bunch, most likely Tuesday will have that update. But thank you for the reminder!

You already changed all the prominent ones that I saw, though I only checked a handful of files to compare against edits I made to get it running. GetItemInfo just happens to be one that wasn’t outright removed in 11.0.2 and the C_ namespace replacement doesn’t return a table like all the other ones were changed to do.

My limited observation is that a lot of the 11.0 changes to C_ objects was a drop-in with no change in method signature or parameters, so a straightforward find/replace.

But true, some of the notable ones are not :rage:

Most of the ones I’ve seen were changed to return a table rather than multiple individual variables. GetSpellInfo for example, if you wanted to get the name and spellid before the change you would have to do
name, _, _, _, _, _, spellid to get past the middle 5 returns you wouldn’t be using. That doesn’t work for C_Spell.GetSpellInfo as it has only a single return which is a table of all the values.

I believe Hyphie wrote code to parse that out so they wouldn’t need to change any of the underlying functions. I’m not that experienced and so I changed everything individually.

These are the parsers I incorporated into Gnosis (stole the template from LibRangeCheck-3.0)

local GetSpellInfo = GetSpellInfo or function(spellID)
	if not spellID then
		return nil;
	end

	local spellInfo = C_Spell.GetSpellInfo(spellID);
	if spellInfo then
		return spellInfo.name, nil, spellInfo.iconID, spellInfo.castTime, spellInfo.minRange, spellInfo.maxRange, spellInfo.spellID, spellInfo.originalIconID;
	end
end

local GetSpellCooldown = GetSpellCooldown or function(spellID)
	if not spellID then
	  return nil;
	end
  
	local spellCooldownInfo = C_Spell.GetSpellCooldown(spellID);
	if spellCooldownInfo then
	  return spellCooldownInfo.startTime, spellCooldownInfo.duration, spellCooldownInfo.isEnabled, spellCooldownInfo.modRate;
	end
end

local GetSpellCharges = GetSpellCharges or function(spellID)
	if not spellID then
	  return nil;
	end
  
	local chargeInfo = C_Spell.GetSpellCharges(spellID);
	if chargeInfo then
	  return chargeInfo.currentCharges, chargeInfo.maxCharges, chargeInfo.cooldownStartTime, chargeInfo.cooldownDuration, chargeInfo.chargeModRate;
	end
end

So much cleaner and simpler than the spaghetti garbage I came up with while making msbt work for me

:dracthyr_cry_animated: