Social: Friends, Presence & Party
UCrimsonOnlineFriendsService
Wraps IOnlineFriends. Reads and refreshes the platform friend list, sends and answers friend requests, and blocks players. Remote players are always addressed by their platform user ID as a string - the same PlatformUserId you get back in FCrimsonFriendInfo. Every function takes LocalUserNum (default 0) as its last parameter.
| Member | Description |
|---|---|
| ReadFriendsList(LocalUserNum = 0) | Refreshes the cached friend list from the platform. Completes on OnFriendsListRead |
| GetFriendsList(LocalUserNum = 0) | BlueprintPure. Returns TArray<FCrimsonFriendInfo> from the cache; meaningful only after ReadFriendsList succeeds |
| IsFriend(PlatformUserId, LocalUserNum = 0) | BlueprintPure. Returns true if that player is on the cached list |
| SendFriendInvite(PlatformUserId, LocalUserNum = 0) | Sends a friend request. Completes on OnFriendInviteSent |
| AcceptFriendInvite(PlatformUserId, LocalUserNum = 0) | Accepts an incoming request. Completes on OnFriendInviteAccepted |
| RejectFriendInvite(PlatformUserId, LocalUserNum = 0) | Rejects an incoming request. Completes on OnFriendInviteRejected |
| DeleteFriend(PlatformUserId, LocalUserNum = 0) | Removes an existing friend. Completes on OnFriendDeleted |
| BlockPlayer(PlatformUserId, LocalUserNum = 0) | Blocks a player, removing them from the friend list if present. Completes on OnPlayerBlocked |
| UnblockPlayer(PlatformUserId, LocalUserNum = 0) | Unblocks a previously blocked player. Completes on OnPlayerUnblocked |
| QueryRecentPlayers(LocalUserNum = 0) | Queries the platform recent-players list. Completes on OnRecentPlayersQueried |
| OnFriendsListRead | Delegate: bool bSuccess |
| OnFriendInviteSent / OnFriendInviteAccepted / OnFriendInviteRejected / OnFriendDeleted | Delegate: bool bSuccess, const FString& PlatformUserId |
| OnPlayerBlocked / OnPlayerUnblocked | Delegate: bool bSuccess, const FString& PlatformUserId |
| OnRecentPlayersQueried | Delegate: bool bSuccess, const TArray<FCrimsonFriendInfo>& RecentPlayers |
| OnFriendsListChanged | Delegate with no parameters. Fires when the platform reports any change to the list - re-read GetFriendsList from the handler |
FCrimsonFriendInfo
| Field | Type | Description |
|---|---|---|
| DisplayName | FString | Platform display name |
| PlatformUserId | FString | Platform ID string - pass this back to any friends function |
| Presence | ECrimsonFriendPresence | Unknown / Online / Away / Offline |
| bHasIncomingInvite | bool | This person sent us a friend request we have not answered |
| bHasOutgoingInvite | bool | We sent this person a request they have not answered |
GetFriend accessor - iterate GetFriendsList and match on PlatformUserId. FCrimsonFriendInfo also carries no rich-presence text and no "is playing this game" flag; ECrimsonFriendPresence is the whole presence surface the friends service exposes.UCrimsonOnlinePresenceService
Wraps IOnlinePresence. This service publishes the local player's rich presence string; it does not read presence for remote players. Keep status strings under about 128 characters for cross-platform safety.
| Member | Description |
|---|---|
| SetPresenceStatus(StatusString, LocalUserNum = 0) | Publishes a rich presence status string to the platform overlay and friends list |
| ClearPresenceStatus(LocalUserNum = 0) | Resets presence to the default in-game state with no extra status string |
| OnPresenceSet | Delegate: bool bSuccess |
FCrimsonFriendInfo::Presence carries the condensed ECrimsonFriendPresence for everyone on the cached friend list. There is no query-remote-presence call on the presence service.UCrimsonOnlinePartyService
Wraps IOnlinePartySystem. Manages one active party at a time: creation, invitations, membership, kick and leader promotion. Members are addressed by platform user ID string. Every function takes LocalUserNum (default 0) as its last parameter.
| Member | Description |
|---|---|
| CreateParty(MaxMembers = 4, LocalUserNum = 0) | Creates a party with the local player as leader. Completes on OnPartyCreated |
| LeaveParty(LocalUserNum = 0) | Leaves the current party; leaving as leader dissolves it. Completes on OnPartyLeft |
| SendPartyInvite(InviteePlatformId, LocalUserNum = 0) | Invites a player to the current party. Completes on OnPartyInviteSent |
| AcceptPartyInvite(InviterPlatformId, LocalUserNum = 0) | Accepts the most recent pending invitation from that inviter. Completes on OnPartyJoined |
| GetPendingInviterIds(LocalUserNum = 0) | BlueprintPure. Returns TArray<FString> of everyone with a pending invitation out to us |
| KickPartyMember(TargetPlatformId, LocalUserNum = 0) | Leader only. Completes on OnPartyKickComplete |
| PromotePartyMember(TargetPlatformId, LocalUserNum = 0) | Leader only - transfers leadership. Completes on OnPartyPromoteComplete |
| GetCurrentPartyMembers(LocalUserNum = 0) | BlueprintPure. Returns TArray<FCrimsonPartyMemberInfo>; empty when not in a party |
| IsInParty(LocalUserNum = 0) | BlueprintPure. Returns true while a party is active |
| IsPartyLeader(LocalUserNum = 0) | BlueprintPure. Returns true if the local player leads the party |
| OnPartyCreated / OnPartyLeft / OnPartyJoined | Delegate: bool bSuccess |
| OnPartyInviteSent | Delegate: bool bSuccess, const FString& InviteePlatformId |
| OnPartyKickComplete / OnPartyPromoteComplete | Delegate: bool bSuccess, const FString& TargetPlatformId |
| OnPartyMemberJoined | Delegate: const FCrimsonPartyMemberInfo& MemberInfo. Fires for every join, including our own |
| OnPartyMemberLeft | Delegate: const FString& PlatformUserId |
| OnPartyLeaderChanged | Delegate: const FString& NewLeaderPlatformId |
| OnPartyInviteReceived | Delegate: const FString& InviterPlatformId |
AcceptPartyInvite accepts the most recent invitation from the inviter you name. List every pending inviter with GetPendingInviterIds before deciding which one to accept.