
Leaderboards
The Leaderboards plugin is specifically designed to implement PlayFab Leaderboards, which implements game statistics for games built using Construct 3 and Construct 2.
Interconnected with major platforms including Google Play, Game Center, Apple Login, Instant Games, Facebook, Facebook Instant Games, Steam, Xbox Live, Nintendo Switch, PS4 and of course PlayFab's own account and login system with email, username and password support for your own game.
The Leaderboards plugin syncs all platforms integrated into your PlayFab title (game), making all changes available in your game and even groups of games under a studio.
PlayFab also has console support, just in case you want to port in the future, especially through porting services.



Introduction

The Construct Master Collection supports the full and easy integration of the PlayFab service for both Construct 3 and Construct 2.
Please click here to learn more about PlayFab.
Features
The Leaderboards plugin is specifically designed to implement PlayFab Leaderboards, which implements game statistics for games built using Construct 3 and Construct 2.
Interconnected with major platforms including Google Play, Game Center, Apple Login, Instant Games, Facebook, Facebook Instant Games, Steam, Xbox Live, Nintendo Switch, PS4 and of course PlayFab's own account and login system with email, username and password support for your own game.
The Leaderboards plugin syncs all platforms integrated into your PlayFab title (game), making all changes available in your game and even groups of games under a studio.
PlayFab also has console support, just in case you want to port in the future, especially through porting services.
Here are some of the features of the PlayFab service:
Leaderboards
Global Leaderboards
Global Leaderboards Around Player
Local Leaderboards
Local Leaderboards Around Player
Friend Leaderboards
Friend Leaderboards Around Player
Statistics
Get Player Statistics
Get Player Statistics with version
Load Player Statistics
Update Player Statistics
Leaderboards with Profile Information
Leaderboards with Profile Constraints
Additional data with complete account and profile information for each player, managed by the PlayFab API object and server profile information constraints.
These data are accessible through the Server Response expression.
Server Response JSON data
Leaderboards with social accounts sync.
Steam
Xbox
Facebook
Server Response
For more information about all the integrated PlayFab service features, please click here to learn the introductory lessons to PlayFab.
Editor Features
Here are some of the features in the Construct editor:
All platforms support, including web, mobile and desktop.
Construct 3
Construct 2
How to use?
It is easy to use the PlayFab API plugin, you will only need to follow the steps below.
Set up the PlayFab API plugin, please click to visit the documentation. This includes creating a PlayFab account, studio and title.
Set up the Authentication plugin, please click to visit the documentation.
Set up the server-side of PlayFab's Leaderboards, please proceed to the server setup guide below.
Finally, you can now use the PlayFab API object, and include more PlayFab addons for more features.
Documentation
There is currently nothing to show, we will add more in the future.
Platform Automatic Sync
The Leaderboards plugin has its own statistic records for each player through PlayFab's servers, which is your company's personalized database. However, you can choose to also mix-in other leaderboards from other platforms like Google Play, Game Center, Facebook, Steam, Xbox. And if ported, Nintendo Switch and PS4.

Server Setup
The Leaderboards with PlayFab is implemented through syncing with the server, from there it should automatically be interconnected with all synced platforms such as Facebook, Google or PlayFab itself as your own personalized server.
Syncing platform integrations
To sync Leaderboards with other servers, you only need to integrate the platform into your title. To do that, you simple go to the Add-ons section of the PlayFab Console and add, to fully integrate include all the necessary credentials required. For example, when adding Facebook, simply go to PlayFab Dashboard > Add-ons > Facebook, install and fill in the required credentials, and you are automatically integrated.
Allow plugins to write into Leaderboards
To easily allow the Leaderboard plugin to write player statistics, you will need to allow this from the title settings. Alternatively, you may also write player statistics through the Cloud Script plugin or Azure Function plugin with cloud scripting. 1. Create an account in PlayFab, login if you already have one.

2. Click the title that you will use for your project.
3. The title's dashboard, also known as the game dashboard, should appear, then select the sidebar option Settings.

4. Select the API Features tab, then check the Allow client to post player statistics toggle.

5. Now select the sidebar option Leaderboards. Then, the leaderboards of the game, player ranking, including all the statistics of each user are now accessible.
You can control everything here as the administrator. 6. Finally, proceed with your learning and experimentation using the provided demo projects kit at the bottom-most section of the page.
Actions, Conditions & Expressions
Actions




The following action groups:
Friend Leaderboards
Leaderboards
Get Player Statistics
Get Player Statistic Versions
Update Player Statistics
Load Statistic
Friend Leaderboards
Get Friend Leaderboard - Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in the leaderboard.
Statistic Name - Statistic used to rank friends for this leaderboard.
Start Position - Position in the leaderboard to start this listing.
Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.
Include Facebook - Indicates whether Facebook friends should be included in the response.
Include Steam - Indicates whether Steam service friends should be included in the response.
Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.
Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.
Include Xbox - Indicates whether Xbox friends should be included in the response.
Xbox Token - Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab.
Tag - The tag to differentiate the requests.
Get Friend Leaderboard Around Player - Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in the leaderboard.
Statistic Name - Statistic used to rank friends for this leaderboard.
Target Player - Choose the Player to target. "Player User" will target the current user while "PlayFab ID" will target the PlayFab ID indicated below.
PlayFab ID - If "Target Player" is "PlayFab ID". PlayFab unique identifier of the user to center the leaderboard around.
Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.
Include Facebook - Indicates whether Facebook friends should be included in the response.
Include Steam - Indicates whether Steam service friends should be included in the response.
Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.
Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.
Include Xbox - Indicates whether Xbox friends should be included in the response.
Xbox Token - Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab.
Tag - The tag to differentiate the requests.
Leaderboards
Get Leaderboard - Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard.
Statistic Name - Statistic used to rank players for this leaderboard.
Start Position - Position in the leaderboard to start this listing.
Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.
Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.
Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.
Tag - The tag to differentiate the requests.
Get Leaderboard Around Player - Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user.
Statistic Name - Statistic used to rank players for this leaderboard.
Target Player - Choose the Player to target. "Player User" will target the current user while "PlayFab ID" will target the PlayFab ID indicated below.
PlayFab ID - If "Target Player" is "PlayFab ID". PlayFab unique identifier of the user to center the leaderboard around.
Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.
Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.
Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.
Tag - The tag to differentiate the requests.
Get Player Statistics
Get Statistics - Retrieves Player Statistics to return (current version will be returned).
Statistic - Get Player Statistics: Separate each Statistic Name by "|". Example: "Statistic1|Statistic2|Statistic3".
Tag - The tag to differentiate the requests.
Get All Statistics - Retrieves "All" Player Statistics to return (current version will be returned).
Tag - The tag to differentiate the requests.
Get Player Statistics : From Stack
Add Statistic Name - Add Statistic Name to Stack for the retrieval request of "Get Statistics From Stack".
Statistic Name - Unique name of the statistic.
Add Statistic Name Version - Add Statistic Name and Version to Stack for the retrieval request of "Get Statistics From Stack".
Statistic Name - Unique name of the statistic.
Version - The version of the statistic to be requested.
Get Statistics From Stack - Retrieves Player Statistics from added Statistic Name and Version Stacks.
Tag - The tag to differentiate the requests.
Get Player Statistic Versions
Get Statistic Versions - Retrieves Player's Statistic Versions from Statistic Name.
Statistic Name - Unique name of the statistic.
Update Player Statistics
Add Statistic Update Stack - Add Update Statistic Stack. Statistic Stack for the "Update Player Statistics" action.
Statistic Name - Unique name of the Statistic.
Value - Statistic Value for the Player.
Add Statistic Update Stack with Version - Add Update Statistic Stack with a version property. Statistic Stack for the "Update Player Statistics" action.
Statistic Name - Unique name of the Statistic.
Value - Statistic Value for the Player.
Version - The version of the statistic to be updated.
Update Statistics - Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
Tag - The tag to differentiate the requests.
Load Statistic
Load Statistic - Filters the Statistics locally from the latest of any "Get Statistics actions" to return the "Statistic Name", "Statistic Version" and "Statistic Value" by the input "Statistic Name".
Statistic Name - Unique name of the Statistic.
Load Statistic with Version - Filters the Statistics locally from the latest of any "Get Statistics actions" to return the "Statistic Name", "Statistic Version" and "Statistic Value" by the input "Statistic Name" and "Statistic Version".
Statistic Name - Unique name of the Statistic.
Version - The version of the statistic to be loaded.
Conditions
The following condition groups:
Leaderboards
Load Statistic
Get Statistics
Get Statistic Versions
Update Statistics


