question

max avatar image
max asked

Stackable Items show remaining uses of zero after adding the first and two after the second.

If I grant my players a stackable item and then catch their inventory from PlayFab, it shows that the item has remaining uses of zero - but the item is in the inventory indeed.

After granting the players another item of the same type, the remaining uses go up from zero to two.

Is this intended behaviour?

In-Game Economygame manager
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

·
brendan avatar image
brendan answered

Yes, if you haven't given the base item a usage count (Consumable->By count), then if the player has no stacks of that item and one is added, it won't have a usage count to start, meaning RemainingUses isn't used (and so would come back as 0, since it's really null). As soon as you add another though, our stacking kicks in, upping the count to 2 (since that's how many you have). The simple fix for this is to always give your stackables a usage 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.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]