question

Nishal John avatar image
Nishal John asked

Leaderboards For Guilds and Clans

I have a very specific requirement.

(I'm using blueprints)

When a player joins I want them to be able to enter a guild name and if that guild name does not exist it will create one else they will automatically join that guild.

I also want a statistical leaderboard that shows an accumulation of a custom score each player in that guild obtained within a set amount of time.

Is the above requirement possible through Playfab?

I know about groups and leaderboards but I think the above is too specific to be used through playfab.

Any guidance here is appreciated.

Leaderboards and StatisticsShared Group Datamultiplayer
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

·
Gosen Gao avatar image
Gosen Gao answered

When a player joins I want them to be able to enter a guild name and if that guild name does not exist it will create one else they will automatically join that guild.

If you mean when a player creates account, they can also enter a guild name. And after account created, they will automatically join that guild, or create with that name if it doesn’t exist. You can use Groups, Guilds and Clans - PlayFab | Microsoft Learn to do it. Steps are follows, use Groups - Get Group - REST API (PlayFab Groups) | Microsoft Learn to check if the group exist, if it does, call Groups - Add Members - REST API (PlayFab Groups) | Microsoft Learn to add this player to the group, you may use PlayFab CloudScript using Azure Functions - PlayFab | Microsoft Learn to do this step as this API requires a title level token. If it doesn’t, call Groups - Create Group - REST API (PlayFab Groups) | Microsoft Learn to create one.

I also want a statistical leaderboard that shows an accumulation of a custom score each player in that guild obtained within a set amount of time.

Group leaderboard is not supported currently, you can implement it using an external database like Redis or wait for Leaderboards v2 - PlayFab | Microsoft Learn.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.