View Single Post
01/22/23, 10:47 PM   #1
SSM24
 
SSM24's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2023
Posts: 4
How to manipulate the bank menu in code?

To be more specific, the feature I want to add is:
  1. Switching to the "Deposit" (player inventory) mode (primarily concerned about keyboard mode)
  2. Opening the Materials tab after this
For #1, I assume this has something to do with fragments, but all I can seem to find on the wiki and forum is how to detect when a fragment change occurs, not how to trigger it on your own in code (if that even is the right approach - there might be some higher-level thing I'm missing).

For #2, it seems to have something to do with ZO_InventoryManager:ChangeFilter, but when I try to use that method from Torchbug for testing, I get the error "Inventory.lua:1276: attempt to index a nil value" which seems to refer to this line (and indeed, when I was checking the value of ZO_InventoryManager.inventories earlier I was getting nil).
EDIT: I figured this one out, you're actually supposed to use PLAYER_INVENTORY instead of ZO_InventoryManager. (Though it's still not changing the "active tab" indicator so I still have a suspicion there's a better way to be doing this.)

Any insight on how I might do these things properly, or if I'm even taking the correct approach to begin with, would be appreciated.

Last edited by SSM24 : 01/23/23 at 03:38 AM.
  Reply With Quote