Hi, is there really no way to see if an ItemInstance is consumable or durable? If not I'd like to request adding a flag IsConsumable or something similar!
Hi, is there really no way to see if an ItemInstance is consumable or durable? If not I'd like to request adding a flag IsConsumable or something similar!
Yes, if the item has a RemainingUses, it can be consumed.
Hey Brendan, thanks for the reply ... I'm really not a fan of this as a 'solution' as it's so non-intuitive, doesn't match the dashboard setup.
It also feels like really fragile API design to rely on a secondary property to work out the first. What if PlayFab in future adds an item class that's durable with charges? Like a wand that can be used 20 times, or to model durability on an item.
/my2c
Actually, the scenarios you describe - durability on items and number of charges on an item - are simply specific implementations of RemainingUses. There's nothing about those that would be incompatible, unless you want to have a special case of zero uses remaining - in which case, you could just code that to be when there's one use remaining. If there's something specific you'd like to see us add to the inventory return data, I'd recommend adding that to our Feature Requests forum. We use that as a way to track on things that are valuable to our community in general, by monitoring how many users "like" any given idea.
Hello @Brendan. Can you then explain about stackable durables? My test shows that they:
1) Have RemainingUses.
2) Can be consumed.
What is the purpose of having them? How they differ from consumables with count = 1?
,Hello @Brendan. Can you then explain about stackable durables please? My test shows they:
1) Have RemainingUses.
2) Can be consumed.
Do they have any purpose? Is there any difference between them and consumables with count = 1?
2 People are following this question.