question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Wipe all inventories

What would be the recommended approach to wipe all users' inventories? It doesn't have to be realtime - it could take 24 hours if we needed to.

We are currently in alpha testing, but we will be launching via Steam Early Access in about a month.

I want to test inventory systems with alpha testers, in the coming weeks, but I also want to be able to wipe the inventories just before launch.

I've considered creating a new TitleID, but it could also be a pain to migrate all the settings, Rules, Analytics/etc. not to mention debugging any parts of my project that reference the current TitleID. Additionally, I want to award badges to the top 100 players, and it's difficult to do that if we started a new TitleID.

Player Inventory
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

There isn't a trivial way to clear player inventory, so your best bet actually would be to move to another Title ID (but in the same studio, so that they share a Publisher ID - that way, the logins player have used up to that point will still be valid).

Next best would be to simply set up a new catalog with all-different Item IDs and ignore the Item IDs from the previous version, but that relies upon the title not needing a large number of inventory items (so that the alpha + release version only take up the limit between them).

But finally, you can remove all the items from a player iteratively, using Cloud Script. This would be a process whereby you have an OnLogin Cloud Script that you call just after login which checks the player inventory and removes the items from the alpha. But since you're limited in processing time and API calls, if the player could have a lot of items, you would need to do this iteratively, staging out the requests over time so that you don't encounter throttling issues. If it's possible for a player to have a large number of items (hundreds) in the alpha, I really can't recommend this, as you would need to stage out the calls over a significant period of time.

It might be possible to do a mix of 2 and 3 though, where you have a new list of Item IDs, in a new catalog, and on each player login you remove a few of the items from the old catalog from the player inventory.

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.

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Thanks for the answers, Brendan. Thank you especially for answering this late at night, because it lets me get started immediately on productive work this morning.

I'm thinking to do the iterative solution via Cloud Script. It looks like the Cloud Script API limit is 15, and given that players for the alpha will have probably on average, maybe 10 items or so, I think it will work. I'll just space out the calls as you suggested.

How much time between cloud script calls would you recommend? One per second has been my general rule of thumb for some other similar scripts.

I think this solution will work for future wipes, too. Our items are purely cosmetic, so staging out the calls over a significant period of time (say, over a full week in the future) should be fine.

0 Likes 0 ·

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.