Go to Page... |
Compatibility: | Ascending Tide (7.3.5) |
Updated: | 03/04/22 05:16 PM |
Created: | 03/02/22 11:55 AM |
Monthly downloads: | 53 |
Total downloads: | 2,084 |
Favorites: | 4 |
MD5: | |
Categories: | Utility Mods, Combat Mods |
![]() |
Comment Options |
shadowcep |
View Public Profile |
Send a private message to shadowcep |
Send email to shadowcep |
Find More Posts by shadowcep |
Add shadowcep to Your Buddy List |
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
![]() |
|
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 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 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 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 |
|
![]() |
![]() |
shadowcep |
View Public Profile |
Send a private message to shadowcep |
Send email to shadowcep |
Find More Posts by shadowcep |
Add shadowcep to Your Buddy List |
![]() |
||
|
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. |
|
![]() |
![]() |
tralce |
View Public Profile |
Send a private message to tralce |
Send email to tralce |
Find More Posts by tralce |
Add tralce to Your Buddy List |
![]() |
||
|
|
|
![]() |
![]() |
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
![]() |
||
|
|
|
![]() |
![]() |
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
![]() |
|
|
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. |
![]() |
![]() |
tralce |
View Public Profile |
Send a private message to tralce |
Send email to tralce |
Find More Posts by tralce |
Add tralce to Your Buddy List |
![]() |
|
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.
|
![]() |
![]() |
vazelle |
View Public Profile |
Send a private message to vazelle |
Send email to vazelle |
Find More Posts by vazelle |
Add vazelle to Your Buddy List |
![]() |