Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by tbizapps · Jun 06, 2018 at 03:50 PM · Leaderboards and StatisticsTitle Data

Automated Title Content Update and Resetting Leaderboards?

My game hosts an in-game tournament twice a week (Wednesdays and Sundays), that lasts for 24 hours. The goal is for players to get as far as they can in the game within 24 hours. I use a leaderboard to track their progress for this specific 24 hour time period and to display in-game so that players can see how they place against others and compete against each other for larger prizes.

I use a Title Data key-value pair to trigger the start of the tournament, by updating one of the values to the date of the tournament. I need to do this within a few hours prior to the server time hitting each Wednesday or Sunday. When the game notices today is a Wednesday or Sunday and it matches the Title Data key-value pair date, it allows the player to enter the tournament and begins tracking his stats. My question is - is there any way to automate updating this Title Data key-value pair every Wednesday and Sunday? I'm totally unfamiliar with cloud scripts - can I use one of them for this? Have a script automatically execute when the clock hits midnight on Wed/Sun and update a Title Data value with the current date?

Also, is there any way to automate resetting leaderboards outside of the normal daily/weekly/monthly intervals? I reuse the same leaderboards for these tournaments, meaning I need to manually reset them prior to each Wednesday and Sunday (twice a week, so obviously the normal intervals would not work). If there was a way to select specific dates or patterns for resetting leaderboards - that would be fantastic.

I realize I probably set up these tournaments in a silly, inconvenient way with all these restrictions - but it is too late to change anything now :).

Please let me know your thoughts or if you need any more information.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jun 07, 2018 at 01:45 AM

So, Title Data can be written to from a Cloud Script that's triggered by a Scheduled Task. That's the reason it's available in the Server API - writing to Title Data due to a player action, to be clear, is not supported (Title Data is meant only for occasional updates, as it is a sharded and cached resource).

To reset a leaderboard on a daily time you decide (not 00:00 UTC, which is the built-in reset), you would need to use the Admin API call IncrementPlayerStatisticVersion. That's provided so that you can run it from your own tooling - we do want to add it to the Server API in future, but we need to build in some safeguards so that if someone were to accidentally try to use it too frequently it wouldn't be an issue.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tbizapps · Jun 07, 2018 at 01:29 PM 0
Share

Thank you, this was very helpful! Any idea on a timeframe when the IncrementPlayerStatisticVersion might be available in the Server API? The manual updating of the Title Data is pretty quick and easy, but resetting so many leaderboards is the somewhat time consuming and annoying part.

avatar image Brendan ♦♦ tbizapps · Jun 08, 2018 at 02:16 AM 0
Share

Sorry, but that hasn't been called out as a need by very many developers, so it hasn't been prioritized into the schedule yet. I'd recommend adding it to our Feature Requests forum, so that we can track on how many "likes" it gets.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Leaderboard Information in Push Notification 1 Answer

    Leaderboard related Questions 1 Answer

    Timed quest and semi online machmaking 3 Answers

    Can we do action when Leaderboard is reset? 1 Answer

    Use Shared Group Data for a live event system? 4 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges