question

robert avatar image
robert asked

Virtual currency refreshing immediately

For some reason we suddenly have troubles with virtual currency and refreshing.

We use two virtual currencies for offers (e.g. free coins every hour and free spin every day).

The virtual currency "FC" (free coins) is configured with refresh rate of 24 and a maximum value of 1. For some reason, as soon as we purchase an item with the FC currency the value immediately goes to 1 again. After another purchase the currency is back to zero as expected. More interestingly, after the second purchase, the refresh time shows to correct time counted from the first purchase.

This was definitely working before.

Any ideas or any recent changes in this area?

More details:

When purchasing the item we get following events:

player_virtual_currency_balance_changed   
FC: from 1 to 0   
Order ID: D847F424C5DEADC6

player_vc_item_purchased
RewardFreeCoins from catalog 1.0
Bought 1 using 1 of currency FC

player_virtual_currency_balance_changed<br>FC: from 0 to 1

We have no idea where the last FC: from 0 to 1 is coming from. Looks like its refreshing the currency immediately and not 1 hour after the last purchase...

Title: 4D83
Events in question: https://developer.playfab.com/en-us/4D83/players/DE2F33CD45E504DB/event-history?query=ZXZlbnREYXRhLmV2ZW50TmFtZSUzQXBsYXllcl92aXJ0dWFsX2N1cnJlbmN5X2JhbGFuY2VfY2hhbmdlZA==&sumBy=&termsField=

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.

robert avatar image robert commented ·

We recently added two new titles to the same studio which also use the same currencies. Could this maybe be a side effect??

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Yes, due to changes to the inventory system, there was a recent issue where regenerating VCs were having their "time to next recharge" reset whenever the VC was added to (via the Server API call). This has since been corrected, but it sounds like there may be a new issue due to that change - we'll investigate. So to be clear, you're saying that for a brand new player account in your game, the very first time you make a purchase with your FC currency, the balance immediately regenerates to 1 (whereas it should take an hour, based on your regeneration rate of 24), but that after that, all subsequent regeneration does take an hour when the VC is spent.

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

robert avatar image robert commented ·

Thanks for the information. Actually this issue happens for existing user only (we test with around 10 users created around 2 months ago), we have not been able to reproduce it with a new user when making the purchase the first time. We will try again tomorrow and try more cases to find a common pattern.

"you make a purchase with your FC currency, the balance immediately regenerates to 1 (whereas it should take an hour, based on your regeneration rate of 24), but that after that, all subsequent regeneration does take an hour when the VC is spent."

This is exactly what we observed, but only tried with existing users yet.

0 Likes 0 ·
brendan avatar image brendan robert commented ·

So, wait - is it correct to say that this issue is only possible for a pre-existing player account which has never made a purchase using the VC? Or does it occur even on older accounts that have made a purchase in the past? Also, is this a VC which was defined in the game after those player accounts were made?

0 Likes 0 ·
robert avatar image robert commented ·

>> Is only possible for a pre-existing player account which has never made a purchase using the VC?
The accounts we tried so far have definitely made purchases with this VC in past.

>> Does it occur even on older accounts that have made a purchase in the past?
Yes

>> Also, is this a VC which was defined in the game after those player accounts were made?
Thats a good question. We used our test accounts we created around the same time when we defined the VC, can't say exactly what was first.

Maybe you want to take a look at the player with the ID:

DE2F33CD45E504DB
In the event history, just examine the last 20 events.

You will see that FC goes from 1 to 0. (when purchasing the item at 2017-07-04T14:58:25.1288483Z)

Then, just a second later, it goes right to 1 again (2017-07-04T14:58:26.1481084Z)

Hope this helps...

0 Likes 0 ·
brendan avatar image brendan robert commented ·

Thanks, that helps. It looks like FC was first added on March 19th, then deleted and re-added on the 21st. I'll add that info to the bug, in case it's related to the issue. But you're definitely not seeing this on any new player accounts, correct?

0 Likes 0 ·
robert avatar image robert commented ·

Just tried again with a new account. First purchase right after account creation set the refresh time correctly to 1 hour. Purchasing again after this 1 hour set the refreh time also correctly, so it looks like only older account are affected.

We just tried an older account again where we had this issue today already and it now happened again, user id: 6089D000CE291297

0 Likes 0 ·
robert avatar image robert robert commented ·

We also just tried the previous account again (DE2F....). Right after purchasing the next refresh date was set to 35min (instead of 60min)

FC: from 1 to 0 at 8:11pm, refresh time shows 26min left at 8:20pm
0 Likes 0 ·
brendan avatar image brendan robert commented ·

We have a fix for the regeneration issue which will be live soon (early next week at the latest).

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.