question

andrearossini avatar image
andrearossini asked

Avoid multiple/duplicated items

Hi,

In my game, player can open containers to collect some items.

These items are like token (you have or you haven't it). They are durable.

I would like to avoid that a player open a container and get an item he already has.

Do you have a solution for this situation?

I would like to prevent item flood in player inventory (so I can stay under usage limits).

Thank you for help.

Best regards,

Andrea

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, we don't support item uniqueness within a single player's account yet, but we added EvaluateRandomResultTable to provide for this, and other scenarios. So, here's the way this would work:

Create a consumable item which you use in place of the chance of getting a duplicate item. This could be a replacement for the container, or a "token" in the container that you give the player instead of the random result table drop item.

Have two drop tables - the normal one, that has a chance of getting the duplicate item, and a separate one which is your "fallback" table, which cannot give a duplicate item (alternately, you could just give VC instead as your fallback, but this is assuming you always want to give an item).

In Cloud Script, use EvaluateRandomResultTable to get an item from the first table. If it's something that's already in the player inventory, use the second table. Grant the appropriate item, and consume the "token" item.

2 comments
10 |1200

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

augustamiller77 avatar image augustamiller77 commented ·

@Brendan

We've run into the exact same issue recently, and would like to know if this is still the best practice. Has there been any changes to Playfab in the last 4 years that might help maintain item uniqueness in drop tables?

Thanks in advance

,

@Brendan

We've recently run into a similar problem with item uniqueness and drop tables. We would like to understand the best way to accomplish this before continuing. Is this still the recommend practice? Has there been any changes to Playfab in the last 4 years that offer a better alternative than what you've described here.

Thanks in advance

0 Likes 0 ·
augustamiller77 avatar image augustamiller77 augustamiller77 commented ·

I apologize for the duplicate question. I thought I had lost my first post...guess not

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.