OnlineSubsystemEOS - Setting Rich Presence; Instructions Unclear

This question was created in reference to: [EOS - Presence [Content removed]

Hi there. We are trying to set Rich Presence for a game, however, there seems to be some confusion around what to do when using OnlineSubsystemEOS. We are not using OnlineServicesEOS, however.

On the Epic Dev Portal, we’ve set up our Localized Presence templates which are simple strings. When we call IOnlinePresence::SetPresence() we pass in the key which we defined in GameplayTags in the project, however when checking the overlay, the presence seems to just be set to the raw key string, and not the expected presence template.

Please find sample code from our ActivitiesSubsystem class attached. Calling SetPresence has worked for all other platforms, apart from EOS.

The EOS SDK seems to suggest we need to completely bypass OnlineSubsystem and make the SDK calls directly, but it seems like UserManagerEOS::SetPresence is performing all the necessary calls to the EOS SDK already…

Any clarity on this would be greatly appreciated

TL;DR: We are trying to set a presence string that we have set up on the Dev Portal in the templates, however, passing the template key in results in the raw key string being set.

void UActivitiesSubsystem::SetRichPresence(const FGameplayTag& ActivityId)
{
    const IOnlineSubsystem* Oss = nullptr;
 
    switch (UUserPlatformHelper::GetPlatform())
    {
       case EPlatform::Steam:
          Oss = IOnlineSubsystem::Get(STEAM_SUBSYSTEM);
          break;
       case EPlatform::Epic:
          Oss = IOnlineSubsystem::Get(EOS_SUBSYSTEM);
          break;
       // Other platforms omitted from code sample....
       default:
          UE_LOG(LogTemp, Error, TEXT("Cannot set rich presence. Unknown platform."));
          return;
    }
    
    FOnlineUserPresenceStatus Status;
    Status.State = EOnlinePresenceState::Online;
    Status.StatusStr = GetActivityNameFromGameplayTag(ActivityId);
    if (!Oss) return;
 
    const IOnlinePresencePtr Presence = Oss->GetPresenceInterface();
 
    const TSharedPtr<const FUniqueNetId> UserId = Oss->GetIdentityInterface()->GetUniquePlayerId(0);
    if (!UserId.IsValid())
    {
       return;
    }
 
 
    Status.StatusStr = GetActivityNameFromGameplayTag(ActivityId);
    
    // as a test and for example for this EPS post, we have added EOS-compatible presence properties here
    Status.Properties.Add(DefaultPresenceKey, FVariantData(Status.StatusStr));
    FString PresenceKey = GetActivityNameFromGameplayTag(ActivityId);
    Status.Properties.Add(TEXT("presence_key"), FVariantData(PresenceKey));
    Status.Properties.Add(DefaultPlatformKey, FVariantData(TEXT("WIN")));
    Status.Properties.Add(DefaultAppIdKey, FVariantData(TEXT("GameTitleName")));
 
    UE_LOG(LogActivities, Error, TEXT("Setting rich presence: %s"),
    *Status.StatusStr);
 
    Presence->SetPresence(*UserId, Status, FOnMyPresenceSetResult::CreateUObject(this, &UActivitiesSubsystem::OnSetPresenceComplete));
}

Regards,

Daniel Mendelowitz

Hello Daniel, the Localized Rich Presence templating functionality was only added to Epic Online Services with version 1.18.0.4 of the EOS SDK, and has not yet been integrated with the EOS Online Subsystem plugin.

https://dev.epicgames.com/docs/epic\-online\-services/whats\-new\#eos\-11804\-\-\-cl45343210\-\-\-2025\-sept\-16

Within the FUserManagerEOS::SetPresence function, the EOS SDK API EOS_PresenceModification_SetRawRichText is used to update the user’s rich presence string.

The string passed to this function is the exact value other users will see when they query the local user’s presence.

To support templated rich text presence, you would need to either modify the plugin to call EOS_PresenceModification_SetTemplateId as per the documentation linked below or wait for the feature to be added to the plugin.

https://dev.epicgames.com/docs/epic\-account\-services/eos\-presence\-interface\#localize\-rich\-presence\-text

The current system allows free text, but it is passed through a moderation filter. Future EOS integrations are steered towards using Localized Rich Presence, where developers provide a set of localized templates through the developer portal, and games update player presence at runtime by selecting a template and providing values to fill in any variables. Our team is working on integrating this with the Unreal Engine plugins, but I don’t know if this will come to the Online Subsystem plugins at this moment.

Hi Ieuan. Thank you for the reply. We have gone with the approach of having a lookup to a datatable of localised strings to set the presence.

I find it odd that Epic would allow arbitrary strings to be set on the client side, given the potential for explicit content, but I understand that is one of the reasons why OnlineServicesEOS is being worked on (or will this also come to OnlineSubsytemEOS as well?)