question

Larry Dietz avatar image
Larry Dietz asked

Question concerning Max amount in Virtual Currencies

I assumed that by setting the Max Amount field in a Virtual Currency to 3, that any subsequent calls to AddUserVirtualCurrency would fail to add more currency once the Max amount was hit.

This doesn't appear to be the case.

In my project I created a VC with a Max amount of 3. My test player, after 4 attempts to add 1 to this VC, has 4, when I expected it to have only 3 (The Max amount)

Am I misinterpreting this field?

It isn't a big issue, as I can check the current amount in the cloudscript before calling the add, but I figured I would ask, just in case.

Thanks,

-Larry

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

No, while that was the original intent, due to title requirements, you can set the VC to any amount via the Add/Subtract calls, including negative values. The Max Amount field is effectively unused at the moment. Sorry for the confusion on that - we'll be making a fairly major update to the inventory system early next year, and re-evaluating how the virtual currencies work with respect to things like that is on the list for potential updates.

3 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.

sgarg76271 avatar image sgarg76271 commented ·

I was also under that impression but just then I saw someone changed his virtual currrency to 999999 while 2000 was maximum limit.

Then I added the conditions where I call the add and sub function in cloudscript.

I think we should have an option to enforce these limits in case our title needs so. :)

0 Likes 0 ·
brendan avatar image brendan sgarg76271 commented ·

While I tend to agree, updating to enforce that would technically be a breaking change, so we cannot do that - one of our primary commitments is to not making breaking changes. When we update the inventory system, what we'll look at doing is adding a new property to define an absolute limit.

0 Likes 0 ·
Larry Dietz avatar image Larry Dietz commented ·

Thanks for the update. I will update the cloudscript to enforce the limit.

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.