question

1StepCloser avatar image
1StepCloser asked

Recommended Method for Cost-Based Player Display Name Changes?

After scouring through some posts, and considering the date with which the requests were made its quite apparent that the API feature request for updating the User's Display Name through Server API might not come to fruition.

With that being said, if relying only on Client/Admin API display name management, what would be the recommended setup for implementing Display Name Changes that come with a currency cost based on the number of times the display name has been changed?

Normally I'd utilize Player Title Data for such a situation, but considering that leaderboards send the display name when requested, it seems far more economical to utilize the display name.

apisPlayer DataLeaderboards and StatisticsPlayStream
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

·
Seth Du avatar image
Seth Du answered

Does your concerns come from Cloud Script not supporting Admin API?

Surely if it is cost-based name changing feature, there should be an external secure server that will handle the requests from players. I have seen some mobile games can only change DisplayName via consuming specific item(Name Change Card in Girls’ Frontline), which can be an IAP item. Since the API is only supported in Admin API and Client API, you may consider implementing it on Azure Function.

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

1StepCloser avatar image 1StepCloser commented ·

Thanks for the response, yes my immediate concern is security-based, considering that a client-side called can be abused.

Would it be possible to create a rule based on the name change playstream event that basically checks for a player name change occurrence, and once this event takes place I can automatically deduct the cost of the name change on the server side?

If so, does this occur when called only, or can there be a more specific check to see if the playstream event has been completed.

Furthermore, what in your opinion is the best application of rules with playstream events? Is there a common occurrence you seem them used, any recommended areas you would advise using them in? I understand each game has its own requirements, just curious on a general/fundamental level.

0 Likes 0 ·
1StepCloser avatar image 1StepCloser commented ·

Adding more to the discussion:

I see that the playstream event, in the case of display name changes, occurs once updated rather than if the API is just called. Does this mean that the playstream event rule imitation would only occur in the event of a successfully updated display name change as opposed to a failed one?

More questions:

Are there any apparent security risks to be aware of when utilizing playstream events, is it more or less on par with Cloudscript?

Also, as someone who relies heavily on Cloudscript, how useful/performant are playstream events? What would you define is their role?

Would you describe playstream events as a means of moving towards a more automated game flow?

In the instance where a Cloudscript function and a playstream event action can both accomplish the task at hand, is one more recommended than the other?

Let's say I have the method of adding virtual currency through cloudscript and through playstream event actions, how different if at all are these two? (This is more of a technical question)

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ 1StepCloser commented ·
In fact, both methods should work, however, you will need to add corresponding anti-cheating part for each of them.
  • Adding virtual currency through CloudScript

If it is the scenario, before the VC is granted, the function requires checking specific states of this player and make sure something like prerequisites has been fulfilled.

  • Through PlayStream event actions

Most of the PlayStream Events are generated automatically by PlayFab API uses. In the normal circumstances, I don't recommend permitting players to generate custom events on the clients. If it is a PlayFab built-in PlayStream Event, setting up a rule should do the job. However, it is a custom event, make sure the event is generated somewhere safe to avoid abusive use. Otherwise, the first method will be better.

0 Likes 0 ·
1StepCloser avatar image 1StepCloser commented ·

Is it possible to receive the return values of a Cloudscript function that's called from a Playstream event?

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]