question

bunzaga@gmail.com avatar image
bunzaga@gmail.com asked

Change quantity from table bundles through code.

I have been trying to think of the best way to reward players for completing dungeons.  Instead of dropping an item every time the user kills a mob, I thought about tallying these up and based on the progress of the user, I could drop specific 'chest' bundles.

For example:

1. first time completed: 500 credits, every time after 100 credits.

2. for each enemy type killed:

 a. for each number of times that enemy was killed:

  b. give them a random item from the drop table for that enemy type.

I thought of using a 'Bundle' from the item catalog for this, but can I change the Quantity field of a bundle through cloud script, or is it a read-only property?

What is the 'PlayFab' way to do this entire process?  Use cloud scripting and custom user properties?

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

Changing the quantity in a random drop table is an Admin operation, as it's a configuration item for your game. Also, since that would change the quantity for all players, that's really not what you want to do.

What you're describing is a need for having complex logic in the decision-making about what items to grant to the player. That's something that's really best handled at the title level. You would define different random drop tables/bundles for the different rewards you want to give, and then use your game logic to make the decisions concerning first/not first time completing a quest, etc.

One thing we are looking to add to the random drop tables in future is randomization of the quantity, so that you could have a drop table where one reward is (for example) anywhere from 10-100 of a virtual currency.

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.

eric@begoodi.fr avatar image eric@begoodi.fr commented ·

"One thing we are looking to add to the random drop tables in future is randomization of the quantity, so that you could have a drop table where one reward is (for example) anywhere from 10-100 of a virtual currency"

 

Very interested in that too !

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.