ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   3.3 Update (https://www.esoui.com/forums/showthread.php?t=7539)

ZOS_ChipHilseberg 01/19/18 04:30 PM

Quote:

Originally Posted by Shinni (Post 33649)
So I was playing around with the new preview and outfit API. It seems to be really hard to find the correct collectible/outfitStyle if you want to reproduce a given item/itemLink.
Would it be possible to add a GetItemLinkOutfitStyleId function similar to GetItemLinkItemStyle ?
The only workaround I have found so far is to compare the names from GetCollectibleInfo and GetItemStyleName(GetItemLinkItemStyle(itemLink)) but that is slow and can not detect the correct rank/material of the style.

This should be possible.

Rhyono 01/19/18 04:46 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 33653)
We could add house bank to the returns or we could make a new bag based function. Either way, that data would only be available while in a house. What is the use case here?

With CraftStore, I keep track of the data of all storage, which means even when I don't have access to it. When you open the house bank, I'll want to write it all to saved vars. I need quantities which works okay when you have a single stack, but the second you split a stack, the numbers are ruined because I'm only calling that slot for the total and not all slots.

The existing function works for the other 3 bag types all of the time and I know the housing banks don't "exist" until they are opened. As such, I'd like:

Code:

GetItemLinkHouseStack(string itemLink, number Bag bagId)
Returns: number stackCount

which I'd trigger via inventory update events that currently exist.

Baertram 01/19/18 05:00 PM

Oh, didn't notice so far that the house bank data is not accessible if we are not at the house interacting with the bank.
Why is that? :confused:

We are not able to see what is in the bank without saving everthing to the savedvars and updating it each time we go to the house and open, close the bank? :(

My usecase would be e.g. the number of items in my inventory -> move the mouse over the item and see in the tooltip the amount of items in my housebanks.
Or scan my housebank items and mark them with a "flag"/"icon" even if I'm not at the bank.

Rhyono 01/19/18 05:15 PM

Quote:

Originally Posted by Baertram (Post 33660)
Oh, didn't notice so far that the house bank data is not accessible if we are not at the house interacting with the bank.

The bank IDs don't exist in SHARED_INVENTORY until you open each one that session. Leave the house, the IDs still exist, but the data is wiped. Re-enter your house and every bank you had previously opened will have its data restored.

It's likely to minimize the data that is cached since we can't access these banks outside of our houses anyway. It's just a nuisance for our use cases.

ZOS_ChipHilseberg 01/24/18 12:12 PM

Quote:

Originally Posted by Shinni (Post 33649)
So I was playing around with the new preview and outfit API. It seems to be really hard to find the correct collectible/outfitStyle if you want to reproduce a given item/itemLink.
Would it be possible to add a GetItemLinkOutfitStyleId function similar to GetItemLinkItemStyle ?
The only workaround I have found so far is to compare the names from GetCollectibleInfo and GetItemStyleName(GetItemLinkItemStyle(itemLink)) but that is slow and can not detect the correct rank/material of the style.

This will be added with the next PTS.

Shinni 01/24/18 01:59 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 33704)
This will be added with the next PTS.

Awesome, thanks a lot!

Rhyono 01/24/18 04:39 PM

Any word on whether the function is being considered? Otherwise, I'll have to loop through every item in the bank at hand each time an item is added. I don't know how well plebeian computers will handle that, then I'll have disgruntled masses.

ArtOfShred 01/24/18 05:34 PM

Quote:

Originally Posted by Rhyono (Post 33710)
Any word on whether the function is being considered? Otherwise, I'll have to loop through every item in the bank at hand each time an item is added. I don't know how well plebeian computers will handle that, then I'll have disgruntled masses.

Depending on what you're using it for you could just update the index with EVENT_INVENTORY_SINGLE_SLOT_UPDATE. I have a function that adds or removes items from 4 separate indexes in LUI Extended (Worn, Bag, Bank, House Bags) if you need ideas. Also could index at the start/beginning of EVENT_OPEN/CLOSE_BANK. Shouldn't really cause any hit to iterate over the bags once for this.

Although a function would definitely make it easier :-D

Rhyono 01/24/18 05:42 PM

CS has always been very fluid about it, it uses a single slot update, then updates the tooltip instantly. Without my proposed solution or that function, I'd have to pull the full bank data on open and close, then have it go through for each item link and build a table and add to the quantities for each as they are encountered.

I know I'd be bombarded with complaints of the tooltip being wrong until you exit the bank.


All times are GMT -6. The time now is 05:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI