- Title-managed Stats (formerly named Stats 2017)
- Event-based Stats (formerly named Stats 2013)
We recommend that you use title-managed Stats when configuring new titles. However, Rich Presence variables only work with event-based Stats.
Title-managed Stats
When using title-managed Stats, you send up the actual stat value itself for the server to use. In title-managed Stats, the server does little to no validation on the value sent to it. It’s up to your title to keep track of the correct stat values. Your title is the source of truth for statistic values. When using title-managed Stats, we recommend that you track and store your stats in the cloud with Cloud Storage. Title-managed Stats is like a reporting service. You send the correct stat for your game to the server. Your stat then sits on the server and waits to be displayed upon request or is updated.The global leaderboard for a title-managed stat maintains only the highest recorded value per player. Writing a lower value updates the stored stat to that lower value, but doesn’t lower the player’s position on the global leaderboard. If your title needs leaderboard positions to decrease (for example, a rating that goes up or down, or a score that resets on losses), use event-based Stats with a
Replace stat rule, or an external leaderboard service such as PlayFab Leaderboards v2. For details, see the title-managed Stats overview and the XblLeaderboardQuery reference.Event-based Stats
When using event-based Stats, the game sends events to XBOX services. The events include specific details about the actions taken by a player. The information in these events is used to update stats accordingly. In event-based Stats, the service keeps track of and updates all your stat’s values. The service is the source of truth for statistic values for a player or group of players.History
With the launch of XBOX One, XBOX services introduced event-based Stats. This offered a multitude of benefits. For example, a single game event can update data for multiple XBOX features such as leaderboards and achievements, XBOX services configuration is managed on the server rather than the client, among other capabilities. In the years following the XBOX One launch, developers requested a more streamlined stats service for bypassing the complexity that comes with an event-based system. They could then use any stats-tracking methods they were already practicing. Based on developer feedback, a new, simplified version of stats was created that would put control of stats logic back into the hands of the developer. That system is title-managed Stats. It’s a service that simply takes the value passed to it by the title, giving developers control of the logic of how a stat value is determined.How stats are handled in event-based Stats and title-managed Stats
Let’s look at configuring and updating stats for event-based Stats versus title-managed Stats. For example, we’re going to make stats from some generic RPG and want to keep track of monsters killed.Event-based Stats
With event-based Stats, your title would send an event that contains information about an action performed by a player. In this event, the action is slaying an orc while the player had a sword. Some of the information contained in this event might be that a slay action was taken, the thing slayed was an orc, the combat type was melee, and the weapon used was a sword. Event-based stats runs this information through a number of rules that are configured by you, the developer, at Partner Center, and update stats, also configured by you, based on the event. In event-based Stats, the service keeps track of what the value for your slaying statistics should be. The “slay orc with sword” event could update multiple statistics such as number of kills, number of orcs slain, and number of sword kills.Title-managed Stats
In title-managed Stats, you’ll send the actual values for your statistics. For the “slay orc with sword” example, your title keeps track of the number of overall kills, sword kills, and orcs slain individually, and sends the service the updated number for each statistic. The service has minimal validation checks to make sure that you’re sending a number that makes sense, so it’s essential for your title to send up the correct statistic. Although you might use the title-managed Stats service to recall the values of stats at the beginning of a game session, don’t use the title-managed Stats service to confirm the value of a stat while the session is ongoing. The following diagram shows how the two flavors of Stats operate.- Event-based Stats on the left
- Title-managed Stats on the right
Other differences between the two approaches
For Managed Partners, there are a few more differences to be aware of when deciding between event-based Stats and title-managed Stats for your title. With event-based Stats, you can:- Get more leaderboard views.
- More easily analyze the meta-data of your statistics. In our “orc slay” example, the overall statistic was keeping track of the number of kills.
- Get detailed statistics on what was killed, with what weapon, and any other kill-defining information you might configure.
