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 /
  • General Discussion /
avatar image
Question by ya-ralla · Oct 05, 2017 at 06:11 AM · CloudScriptTitle Datascheduled tasks

Getting global stats for events

Hello,

I am trying to make an event in my game using global stats, in this case I want to give some bonus for total items looted by all players. To track that I made a custom event every time someone loot an item. And I am trying to store the total events between two dates on the title data to acces it ingame.

I could do it manually just by checking the event history but could be possible to make a scheduled task to update title data value every 30 minutes or one hour during a couple of days by executing a cloud script function? that function should get the total event created in that time period.

Thank you.

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 · Oct 05, 2017 at 06:18 AM

Sorry, but a global value that is updated by all players is not supported currently. PlayFab primarily supports two data types:

1. Title- and Publisher-level data: This is data that is sharded and cached, so that millions of players can access it simultaneously. As a consequence, it takes time for all caches to be updated, meaning that you can't have high consistency (player actions cannot update this data type).

2. User and Shared Group Data: Really a single data type, this is data which is highly consistent, but as a result can only be shared by a small number of players, since requests to read or update the data are operating on a single data table row.

We will be providing an updated data service later this quarter, which will provide for data that can be updated across larger player groups (particularly for guilds/teams/clans).

As to a single scheduled task, that's really not going to work. Yes, you could use a global value in the script as your aggregation value, and have the script run across all users in the All Players segment, adding their values to that global value, but there wouldn't be any way to know when you're done (the last player). And writing to Title Data for every instance of running that script on your players isn't going to work, as that would exceed the limits in our service, resulting in throttling. What I would recommend for now is using a Redit Int for tracking this.

Comment

People who like this

0 Show 0 · 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

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

    1 Person is following this question.

    avatar image

    Related Questions

    How to store the user's data in Playfab? 1 Answer

    How to parse through title data in clouscript 1 Answer

    Data Encryption for Player Data and CloudScript responses 1 Answer

    How do I add currency to a single user and then to ALL users?,How do I add currency to a single user and then to all users? 1 Answer

    About the ranking schedule setting 1 Answer

    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