question

Kain avatar image
Kain asked

Stacked Item Expiring before Expiration?

I just read the explanation here that Item expiration executes upon inventory query:
https://community.playfab.com/questions/6572/is-it-possible-to-have-playstream-event-when-an-in.html


We currently have an issue where a customer is complaining that an item is disappearing from their inventory as soon as they get it.

This item has an expiration data of 5 days and is also marked as "Stackable".

Is it possible that the user has obtained this item and then had the stack expire within the same pass?

Specifically, I am wondering about either of these two possibilities:

  1. If an item expires every 5 days, and the user receives 1 of these stackable items per day, will they suddenly have 0 items on day 6 or will expiration decrease the stack amount as if the time of each stack add was tracked?
  2. When the client API queries inventory, will the API results return inventory for items that have already expired as a result of that same query?
In-Game Economy
10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

For a stackable item that is consumed by time, only the first item that it is granted to players is counted, which means no matter how many the same items you grant later, the expiration time will not be refreshed. After the expiration time is reached, this item entry will be expired, along with stacked ones. It is by design.

The expiration action is for an item entry in player’s inventory, hence, to avoid your situation, our suggestion is that you shouldn’t set those items stackable. As a result, for each item-granting, a new item entry will be created in inventory, which possesses separate expiration time. In terms of the stacking feature, it is better to implement it in your clients.

1 comment
10 |1200

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

Kain avatar image Kain commented ·

Ah, thank you!

1 Like 1 ·

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.