[QUOTE=GotSomePills;519243]
How does the get friends avatar node work?
Do I need to pass it my controller and their steam ID? Does it only work for friends or can I use this for anybody match made with? Also, do you happen to know what the sizes of the avatars are?
You know, technically that function shouldn’t require a player controller, I must have been attempting to get it within the player context or got carried away since all of the subsystem ones do, but that is unnecessary (using the current version you will still need to pass any valid controller as it checks it). I will change it to not require one after I test with dedicated servers.
I kept the name as “GetFriendAvatar” but it is a generic call to get the avatar, for that matter there are actually a lot of generic steam specific functions that are accessible but aren’t used in the UE4 subsystem at large (clan chat, played with counts, clan info, name history, ect).
The way it works is that it requests the information for all of your friends list and it gets download asynchronously afterwards, to get the avatar or information for a non friend you should use the node “RequestSteamFriendInfo” first to the player for retrieval. It will download the smallest to the largest avatar sizes so when I was doing it I would check for validity on the avatars from largest and fall back to smaller sizes until it found a valid avatar (or not).
The size definitions are below but it is a UTexture2D so you should also be able to pull them from that:
// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0;
// gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0;
// gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
// returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again
virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0;
The get user information is declared as:
// requests information about a user - persona name & avatar
// if bRequireNameOnly is set, then the avatar of a user isn't downloaded
// - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them
// if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved
// if returns false, it means that we already have all the details about that user, and functions can be called immediately
virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0;
I’ll remove the player controller requirement from the RestSteamFriendInfo and GetSteamAvatar nodes and next upload will be without them.