Thread Tools Display Modes
09/10/15, 02:57 PM   #1
t31os
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 26
Function to get next bag upgrade cost?

Been trawling the wiki and source and i'm still stumped as to how to fetch the cost of the next upgrade for the bag/inventory.

The bank upgrade has a convenient "GetNextBankUpgradePrice()" function, but i can't find an equivalent for the inventory.

Any suggestions chaps?
  Reply With Quote
09/10/15, 03:32 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I don't think there is something because such functions are hardcoded in the speech of a npc (for bag, it's a chat with a npc which upgrade the bag).

But you can build a table and deduct it with the bag size and upgrade of the mount.
  Reply With Quote
09/10/15, 03:37 PM   #3
t31os
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 26
If that's the case and there's no way to do a lookup with an ingame constant, function or both i'll probably just hard code in the upgrade costs, and work it out that way, cheaper and easier, until such time the API provides a means.

Aside: The game has to read the max bag size and cost from somewhere though, i feel i'm missing something. Though i guess certain data is outside the scope of the API and thus unavailable.

Thanks..

Last edited by t31os : 09/10/15 at 03:40 PM.
  Reply With Quote
09/10/15, 03:58 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
When you try to buy bag space, game fires event where the only argument is upgrade cost:
* EVENT_INVENTORY_BUY_BAG_SPACE (*integer* _cost_)

I didn't find any other place where is mentioned upgrade price in EsoUI source code.
  Reply With Quote
09/10/15, 09:58 PM   #5
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Numbers can be logged into a table and function can be made based on available item space. Other than that I am not aware of any other way.
  Reply With Quote
09/11/15, 04:02 AM   #6
t31os
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 26
That's pretty much all i could find to Garkin, i wasn't sure if i was looking hard and deep enough or whether i was simply missing something totally obvious to someone more familiar with the code base.

Thank you both for having a dig around for me, unfortunately it only confirms my own conclusions but it's nice to have some confirmation all the same.

I'll stick to pulling the values from the wiki and hard-coding them in for now, it'll mean adding or tweaking items in an array any time these change in-game, but i think i can live with that.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Function to get next bag upgrade cost?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off