question

basse avatar image
basse asked

Using Avatar URL as generic string

If a title doesn't make use of avatar urls, is it possible to use this profile field for some general public player data string that could then be retrieved as part of eg leaderboard query responses? Could this cause issues (not counting any visual implications in the Game Manager) ? Is the avatar url title-scoped (not shared across titles)?

Player Data
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

·
brendan avatar image
brendan answered

Could you give us an idea of what it is you'd like to use this for? It sounds like what you really want to use is the player Tag system (https://api.playfab.com/documentation/server/method/AddPlayerTag), as those can also be returned as part of the profile. Profile information (including the Avatar URL) is indeed per-title, but the Avatar URL is expected to be an actual URL. We don't strictly enforce that, but you're correct that we use it that way in the game manager, and if we provide functionality in future for the Avatar URL, that functionality won't work correctly for players where it's set to something else.

2 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.

basse avatar image basse commented ·

Basically we would use it as an encoded description of the other player's in-game appearance. That is, something like a public UserData value. We have customizable characters (with clothes etc) and render some of the leaderboard players in-game using the character rig. Right now we need to separately fetch this data for each player we want to display, spacing the requests out in time not to generate too high request rates etc. Piggybacking this data on the leaderboard responses would be significantly simpler and more efficient for our purposes. We could also format the string as an actual url with the "payload" as a URL parameter, if that would be better. I got the impression that the player tag mechanism may not be intended for this kind of case where each player will have a unique descriptive string.

0 Likes 0 ·
brendan avatar image brendan basse commented ·

Thanks - that's extremely helpful. You are correct that tags aren't really meant to be a way to have unique strings per player (though from a technical standpoint, it is possible). Your idea about encoding your parameters into a URL is a very good one, since if you use your community site as the base URL, you could then use it on the site as well.

1 Like 1 ·

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.