question

brendan avatar image
brendan asked

Inventory item limit and how to count items

Question from a developer:

What counts as an item in the inventory, so that I know how to determine if I'm approaching the limit for the free service?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Basically, it's each "line item" in the player's inventory. So, a stackable item would be 1, while each instance of a a non-stackable item would be 1. A bundle is actually an item that comes with other items included, so that would be 1 + N, where N is the number of items in the bundle (though if they're stackables, they may be adding to a pre-existing stack). A container is 1 until it's opened, and then the items in it are added to the inventory. Any item no longer in the inventory - consumables whose usage period/count has expired, or revoked items - don't count against the limit.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de answered

hmm, in your ProgressiveRewards Recipe https://github.com/PlayFab/PlayFab-Samples/tree/master/Recipes/ProgressiveRewards u use bundles to give Gems to the users with GrantItemToUser.

I though bundles would be "deleted" after u gave them to the User, but since they arent, your recipe would create bundles in their inventory until its "full".

Do we need to make the Bundles consumable ? Or how is the approach to grant bundles with to users and then delete the Bundle item itself, so it wont count to the inventory limit ?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de answered

Since i cant edit my comment, here a small addition :

Why i do is:

1. A player can buy a Bundle which contains Coins with another virtual currency, it all works fine, coins are getting added to the user, but the bundle is still in the inventory and counts to the limit. I just need the bundle to get removed from the invenotry limit count.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The way to remove a bundle after it "delivers" currency, set the Usage Period to 1 (second). That will remove it from the player's inventory after it deposits the currency.

 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de answered

Oh thats a nice solution, even tho i though bundles are just given and deleted, whats the point of saving them ?

And i think u should add this to the recipe in your docs, since i dont think u want to save those bundles either.

 

Thank you !

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The core concept of the bundle is that it's an item that comes with other items "for free", so to speak. So there are a number of use cases where the main bundle item itself actually shouldn't go away. But yes, I'll ask the tools team to update their recipe to show this, since that example clearly should be using an expiring bundle item.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.