The issue is resolved, and the North American PC/Mac megaserver is now available. Thank you for your patience!
Maintenance for the week of April 15:
• [EXTENDED] ESO Store and Account System for maintenance – April 16, 8:00AM EDT (12:00 UTC) - 2:00PM EDT (18:00 UTC)

GetBagSize changes

CodeInject
CodeInject
Soul Shriven
Hello,

today I tried the abandoned addon called Mass Deconstructor.
It didn't work as intended (for other people it works) and I tried to find out why.

There's a problem with the API function GetBagSize.
It gives me a bank size of 130, but I have 260, since I'm a Plus-Member.
It's simple to fix, if there's an API function for membership check.

But I don't know how much addons this could break in the future.
Please fix it.
Edited by CodeInject on May 31, 2017 6:51AM
  • katkat42
    katkat42
    ✭✭✭
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.
    Stonehenge ROCKS!
  • CodeInject
    CodeInject
    Soul Shriven
    katkat42 wrote: »
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.

    Thank you very much, didn't find that on google.

    GetBagUseableSize(BAG_BANK) + GetBagUseableSize(BAG_SUBSCRIBER_BANK)
    That should be the correct usage, right?
  • Reorx_Holybeard
    Reorx_Holybeard
    ✭✭✭✭✭
    CodeInject wrote: »
    katkat42 wrote: »
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.

    Thank you very much, didn't find that on google.

    GetBagUseableSize(BAG_BANK) + GetBagUseableSize(BAG_SUBSCRIBER_BANK)
    That should be the correct usage, right?

    Yes, that should be correct....

    Edited by Reorx_Holybeard on June 4, 2017 1:55PM
    Reorx Holybeard -- NA/PC
    Founder/Admin of www.uesp.net -- UESP ESO Guilds
    Creator of the "Best" ESO Build Editor
    I'm on a quest to build the world's toughest USB drive!
  • Kaymorolis
    Kaymorolis
    ✭✭✭
    CodeInject wrote: »
    katkat42 wrote: »
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.

    Thank you very much, didn't find that on google.

    GetBagUseableSize(BAG_BANK) + GetBagUseableSize(BAG_SUBSCRIBER_BANK)
    That should be the correct usage, right?

    Wouldn't GetBagUseableSize(BAG_SUBSCRIBER_BANK) give you the total number available in a subscribers bank? If that returned 0 (ie not an ESO plus member) then you should try GetBagUseableSize(BAG_BANK).

    You probably don't want to add them together because the result could be more than is actually available.
    PC | NA
    CP: 240+
    Tai'Zar - 50 Bosmer Stamblade
    Annatar the Fair - 50 Altmer MagSorc
    Rules Through Fear - 50 Argonian Templar
  • CodeInject
    CodeInject
    Soul Shriven
    Kaymorolis wrote: »
    CodeInject wrote: »
    katkat42 wrote: »
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.

    Thank you very much, didn't find that on google.

    GetBagUseableSize(BAG_BANK) + GetBagUseableSize(BAG_SUBSCRIBER_BANK)
    That should be the correct usage, right?

    Wouldn't GetBagUseableSize(BAG_SUBSCRIBER_BANK) give you the total number available in a subscribers bank? If that returned 0 (ie not an ESO plus member) then you should try GetBagUseableSize(BAG_BANK).

    You probably don't want to add them together because the result could be more than is actually available.
    Afaik the BAG_SUBSCRIBER_BANK constant gives you the additional size, not the whole size of your bag, that's the reason for the +BAG_BANK.
  • Reorx_Holybeard
    Reorx_Holybeard
    ✭✭✭✭✭
    CodeInject wrote: »
    Kaymorolis wrote: »
    CodeInject wrote: »
    katkat42 wrote: »
    From the API patch notes highlights post:
    Subscriber Bank
    A new bank bag has been added to the game for ESO Plus subscribers and is named BAG_SUBSCRIBER_BANK. The size of the bag is the same as BAG_BACKPACK. We have also added a new bag function, GetBagUseableSize(bagId), to return how many usable slots a bag has. This will return 0 for the subscriber bank if the player does not have ESO Plus. This new bag also necessitated some changes in the lua inventory objects to support multiple bags appearing in a single inventory view. Look out for functions that once took inventoryType now taking bagId as an additional parameter.

    Thank you very much, didn't find that on google.

    GetBagUseableSize(BAG_BANK) + GetBagUseableSize(BAG_SUBSCRIBER_BANK)
    That should be the correct usage, right?

    Wouldn't GetBagUseableSize(BAG_SUBSCRIBER_BANK) give you the total number available in a subscribers bank? If that returned 0 (ie not an ESO plus member) then you should try GetBagUseableSize(BAG_BANK).

    You probably don't want to add them together because the result could be more than is actually available.
    Afaik the BAG_SUBSCRIBER_BANK constant gives you the additional size, not the whole size of your bag, that's the reason for the +BAG_BANK.

    That's right. BAG_BANK and BAG_SUBSCRIBER_BANK are two separate bags that the game's UI combines to look like one. GetBagUseableSize(BAG_BANK) will return the size of just your normal bank (max 240) and GetBagUseableSize(BAG_SUBSCRIBER_BANK) will return the same size (since it doubles the bank size) or 0 if you are not an ESO Plus Subscriber.
    Reorx Holybeard -- NA/PC
    Founder/Admin of www.uesp.net -- UESP ESO Guilds
    Creator of the "Best" ESO Build Editor
    I'm on a quest to build the world's toughest USB drive!
Sign In or Register to comment.