Download
(9 Kb)
Download
Updated: 03/04/22 05:16 PM
Pictures
File Info
Compatibility:
Ascending Tide (7.3.5)
Updated:03/04/22 05:16 PM
Created:03/02/22 11:55 AM
Monthly downloads:63
Total downloads:2,059
Favorites:4
MD5:
Categories:Utility Mods, Combat Mods
Mythic Selector
Version: 1.0.2
by: static_recharge [More]
This add-on allows you to quickly switch between any number of preselected Mythic and non-Mythic jewelry.

How to Use:
  • /ms - Shows/hides the Mythic Selector window
  • /msmenu - Shows the settings menu
  • Add items to the Mythic Selector window from the right click menu on jewelry either in your inventory or already equipped
  • Left clicking on an item in the list will move it up one spot
  • Right clicking on an item in the list will remove it from the list
  • Cycle through your selected jewelry with the respective hotkeys in the controls menu.

Requires:
1.0.2
- Fixed an issue with feedback messages not showing up in chat

1.0.1
- The Que will now update even when an item is manually equipped
- Added item tooltips to the jewelry lists

1.0.0
- Full release version
- Added help and tooltip information
- Added error checking for if the next item in the list is already equipped
- Fixed an issue with the display time on the notificaion panel

0.1.0
- Second test version
- Added profile management

0.0.1
- First test version
- Missing profile management, tooltips, other finishing touches
Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.1
9kB
03/02/22 11:55 AM


Post A Reply Comment Options
Unread Today, 03:04 PM  
static_recharge
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 158
Uploads: 7
Re: DIY Fix for Can't find <item> in inventory.

Originally Posted by shadowcep
I've only recently started using this addon and it's really useful. I had no trouble getting it working with my rings but necklaces always reported "Can't find <item> in inventory."

I've found the problem is due to the way the addon scans the inventory. If it used to work but doesn't now then I guess there's been a ZOS change to the bag indexing. The present code uses GetNumBagUsedSlots() to find how many slots are used and loops from 1 to that number. Unfortunately, the backpack may have gaps where a slot doesn't reference an item, so to find all the items the scan needs to go beyond GetNumBagUsedSlots: once I'd fixed my code, I've seen my inventory of 140 used slots have to scan 160 slots to skip over 20 unused ones. It seems my rings are all in the earlier slots but my necklaces were in slots above 140.

My DIY fix is to edit AddOns\MythicSelector\MythicSelector.lua and correct function MS.GetInventoryIndex(item), from line 196. You will need to replace:
Code:
function MS.GetInventoryIndex(item)
	local index = nil
	for i=1,GetNumBagUsedSlots(BAG_BACKPACK) do
		if item.itemLink == GetItemLink(BAG_BACKPACK, i, LINK_STYLE_BRACKETS) then
			index = i
			break
		end
	end
	return index
end
with:
Code:
function MS.GetInventoryIndex(item)
	local bag, style = BAG_BACKPACK, LINK_STYLE_BRACKETS
	local slot = ZO_GetNextBagSlotIndex(bag)
	while slot do
		if HasItemInSlot(bag, slot)
		and item.itemLink == GetItemLink(bag, slot, style) then
			return slot
		end
		slot = ZO_GetNextBagSlotIndex(bag, slot)
	end
--	no return => return nil
end
I also noticed that function MS.EquipNextItem(equipType) wouldn't report "<item> is already equipped." because it was looking in the wrong bag. If you'd like to fix that while doing the edit above, go to lines 219 and 235 and change BAG_BACKPACK to BAG_WORN, so these lines:

Code:
		if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.")
			return
		end
...
		if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.")
			return
		end
become these:
Code:
		if GetItemLink(BAG_WORN, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.")
			return
		end
...
		if GetItemLink(BAG_WORN, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.")
			return
		end
Now I have both rings and necklaces under control!
Thank you that is very helpful and I will update it when I get to it!
Report comment to moderator  
Reply With Quote
Unread Today, 11:35 AM  
shadowcep
 
shadowcep's Avatar

Forum posts: 1
File comments: 118
Uploads: 0
DIY Fix for Can't find <item> in inventory.

I've only recently started using this addon and it's really useful. I had no trouble getting it working with my rings but necklaces always reported "Can't find <item> in inventory."

I've found the problem is due to the way the addon scans the inventory. If it used to work but doesn't now then I guess there's been a ZOS change to the bag indexing. The present code uses GetNumBagUsedSlots() to find how many slots are used and loops from 1 to that number. Unfortunately, the backpack may have gaps where a slot doesn't reference an item, so to find all the items the scan needs to go beyond GetNumBagUsedSlots: once I'd fixed my code, I've seen my inventory of 140 used slots have to scan 160 slots to skip over 20 unused ones. It seems my rings are all in the earlier slots but my necklaces were in slots above 140.

My DIY fix is to edit AddOns\MythicSelector\MythicSelector.lua and correct function MS.GetInventoryIndex(item), from line 196. You will need to replace:
Code:
function MS.GetInventoryIndex(item)
	local index = nil
	for i=1,GetNumBagUsedSlots(BAG_BACKPACK) do
		if item.itemLink == GetItemLink(BAG_BACKPACK, i, LINK_STYLE_BRACKETS) then
			index = i
			break
		end
	end
	return index
end
with:
Code:
function MS.GetInventoryIndex(item)
	local bag, style = BAG_BACKPACK, LINK_STYLE_BRACKETS
	local slot = ZO_GetNextBagSlotIndex(bag)
	while slot do
		if HasItemInSlot(bag, slot)
		and item.itemLink == GetItemLink(bag, slot, style) then
			return slot
		end
		slot = ZO_GetNextBagSlotIndex(bag, slot)
	end
--	no return => return nil
end
I also noticed that function MS.EquipNextItem(equipType) wouldn't report "<item> is already equipped." because it was looking in the wrong bag. If you'd like to fix that while doing the edit above, go to lines 219 and 235 and change BAG_BACKPACK to BAG_WORN, so these lines:

Code:
		if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.")
			return
		end
...
		if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.")
			return
		end
become these:
Code:
		if GetItemLink(BAG_WORN, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.")
			return
		end
...
		if GetItemLink(BAG_WORN, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then
			MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.")
			return
		end
Now I have both rings and necklaces under control!
Report comment to moderator  
Reply With Quote
Unread 06/17/22, 09:38 AM  
tralce
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 97
Uploads: 2
Originally Posted by static_recharge
Does this happen after a log in or sometime later? Do you have multiple versions of the ring with different enchants or anything?
This is on one character. Yesterday I added Oakensoul to MS, and it happened. I cleared out the list, reloaded UI, and re-added my 3 rings. Still happened. Re-logged, exited and relaunched the game, still happened.

For testing purposes, here are the item IDs of the rings on that character (problematic ones marked with *)
|H1:item:187658:364:50:45884:370:50:31:0:0:0:0:0:0:0:2049:0:0:1:0:0:0|h|h * (Oaken)
|H1:item:163052:364:50:45884:369:50:28:0:0:0:0:0:0:0:2049:0:0:1:0:0:0|h|h * (RotWH)
|H1:item:182208:364:50:45884:369:50:0:0:0:0:0:0:0:0:1:0:0:1:0:0:0|h|h (MroM)
|H1:item:171436:364:50:45883:370:50:0:0:0:0:0:0:0:0:1:0:0:1:0:0:0|h|h (RotPO)

When I first began tinkering with it yesterday, it would not equip my Oakensoul Ring I'd recently added to MS. During my testing and tinkering, MS also lost the ability to equip RotWH. I do notice that the item IDs for those two are longer, dunno if that has anything to do with it.

Today, I cleared and re-created my list on the same character, and it worked fine. Strange.

Another character does have two of the same ring, each with different enchants, and that's always been fine, and to my knowledge still is.

I will test a bit more. This is apparently gonna be difficult to reproduce though. Let me know if there's anything I can look at.
Report comment to moderator  
Reply With Quote
Unread 06/17/22, 01:11 AM  
static_recharge
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 158
Uploads: 7
Originally Posted by tralce
Since High Isle I've been having some issues with the addon being unable to find the rings in the jewelry list in my inventory. I've removed the rings in the /ms menu, and re-added them, yet if often chats messages like " [Mythic Selector]: Can't find [Oakensoul Ring] in inventory."

Let me know what additional information to provide.
Does this happen after a log in or sometime later? Do you have multiple versions of the ring with different enchants or anything?
Report comment to moderator  
Reply With Quote
Unread 06/17/22, 01:10 AM  
static_recharge
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 158
Uploads: 7
Originally Posted by vazelle
Hey man, your addon works really well for fast-changing my mythic items using it regularly now since I use pale order and sometimes forget to change it on trial/dungeon thanks

For future updates maybe can you also add options to fast-change on other mythic items such as the pants, armor, heads, etc? Cause I use Gaze of Sithis for PVP and Harpooner's Wading Kilt on PVE and want to change it fast too with your addon.
I will look into this, thanks.
Report comment to moderator  
Reply With Quote
Unread 06/16/22, 02:26 PM  
tralce
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 97
Uploads: 2
Since High Isle I've been having some issues with the addon being unable to find the rings in the jewelry list in my inventory. I've removed the rings in the /ms menu, and re-added them, yet if often chats messages like " [Mythic Selector]: Can't find [Oakensoul Ring] in inventory."

Let me know what additional information to provide.
Report comment to moderator  
Reply With Quote
Unread 05/28/22, 10:05 PM  
vazelle

Forum posts: 3
File comments: 73
Uploads: 0
Hey man, your addon works really well for fast-changing my mythic items using it regularly now since I use pale order and sometimes forget to change it on trial/dungeon thanks

For future updates maybe can you also add options to fast-change on other mythic items such as the pants, armor, heads, etc? Cause I use Gaze of Sithis for PVP and Harpooner's Wading Kilt on PVE and want to change it fast too with your addon.
Last edited by vazelle : 05/29/22 at 07:55 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: