Since I'm testing some features, now my inventory is completely full and it's a huge pain to remove items one at a time. Is there any way to completely remove the entire player's inventory?
Thx
Since I'm testing some features, now my inventory is completely full and it's a huge pain to remove items one at a time. Is there any way to completely remove the entire player's inventory?
Thx
Not with a single API call. You have a couple options.
1.) Switch to using characters more heavily(even if your game would only ever have one per user) and then build out CloudScript calls to quickly delete and create new characters. Depending on how much gameplay data you store in your characters this is the cleanest option to get back to a "clean build" on an account.
2.) CloudScript call could remove up to 9 items at a time. Server.GetUserInventory combined with Server. RevokeInventoryItem. This function could then be called from the game manager or through an external client. You would need to call it multiple times if a user has a large set of items and you might need to space those calls out.
You could also toy around with using the Admin api and build a custom account management tool but I think the above two methods would serve you better overall.
No problem. I found big got ya with the character technique today.
If you do not set up a custom way of deleting characters through the server api and remove characters through the game manager all the items on the deleted character will be moved to the parent user account. This ends up flooding the user with the items and really just moves the problem around.
TL;DR Make sure if using characters to quickly reset items and stats you set up a CloudScript or other Server api call to delete the character with the move items flag set to false.
One caution on this is that running a Cloud Script multiple times in a row, and in particular to call a Server API more times than is allowed within the limits, is risky. The limits are specifically designed to ensure that no one title can put excessive load on any component. If you need higher limits, you should be working with us on a custom agreement that covers your usage. Attempting to work around them runs the very real risk of getting the title throttled due to violation of our Fair Use policy.
4 People are following this question.