question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

Playfab Clan/Guild available features and limitations-Second thread?

Hi,

I have integrated the Playfab Groups/Clans/Guild system in my game but I have few questions and for my current understanding for groups/clans please see this thread:

  • I want to add the icons and flags to each of my clan, how can I do that? Does Playfab support that? If not, then what's the work around?
  • I am showing the list of clan members but the issue is the API is returning the Playfab IDs of my clan members but I want to get their display names. How can I do that?
  • Can I set the language setting to each of clan? For example, I want one group's default language to English but for my second group I want it to be Japanese or some other language.
  • How can I access each player's level who are in my clan? I want to show every player's level on UI? Given that the level is saved in player's player data

Any help would be appreciated, thanks!

apissdks
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

·
Citrus Yan avatar image
Citrus Yan answered

1. Entity groups are also entities themselves, they also contain the following initial features as entities:

  • Object data
  • File data
  • Profiles

Therefore, you can use SetObjects & GetObjects/GetProfile(s) to add icons (url) and flags into group entity’s object and retrieve it. Or, you can also save icons’ file into entity files using Entity File

2. The same as mentioned above, you can use SetObjects to save each player’s Displayname into their own entity objects and use GetObjects/GetProfiles to retrieve it in a single request. And, please note player entity themselves can only retrieve their own objects, therefore, you’ll need to use server-side logic to obtain all the player’s displaynames are return it back to the client side.

3. This is not natively supported, you can add the language settings into the Group entity’s object like we did in answer #1 and apply custom language settings from client-side.

4. We recommend that you save each player’s level info into their own objects are retrieve them similar to answer #2.

4 comments
10 |1200

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·
And, please note player entity themselves can only retrieve their own objects, therefore, you’ll need to use server-side logic to obtain all the player’s displaynames are return it back to the client side.

Is there any chance that GetProfiles() with multiple profiles can be changed to be callable by clients?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Brent Batas (Lisk) commented ·

It's possible that you modify a player entity object's policy to make it accessible by anyone, take a player entity 123's object called "Object1" for instance, call SetProfilePolicy with the following request:

{
  "Statements": [
    {
                              "Resource": "pfrn:data--title_player_account!123/Profile/Objects/Object1",
                        "Action": "Read",
                        "Effect": "Allow",
                        "Principal": "*"
    }
  ],
  "Entity": {
    "Id": "123",
    "Type": "title_player_account",
    "TypeString": "title_player_account"
  }
}<br>

Then entity 123's object "Object1" can be accessed by other players using GetProfiles.

PS: Please be cautious about this since it may expose some data that the players don't want others to see.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) Citrus Yan commented ·

Thank you. Is it possible to do this for all players? if not I guess I can set up a cloudscript trigger for all new accounts, then run a script for existing accounts.

0 Likes 0 ·
Show more comments

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.