From 81468c1d25fe5f76ced0fd675ea8ed41feb8983e Mon Sep 17 00:00:00 2001 From: Mabel Date: Wed, 20 May 2026 13:38:57 +0000 Subject: [PATCH] Discord Rich Presence: Tomodachi Life LTD and Animal Crossing New Horizons (#103) Adds Discord Rich Presence for Tomodachi Life: Living the Dream, Tomodachi Life: Living the Dream - Welcome Version, and Animal Crossing: New Horizons Tomodachi Life Rich Presence uses your total Mii count, and your island level ![image](/attachments/46c20fba-f092-4f8c-af8d-c71340d94e78) Animal Crossing New Horizons Rich Presence uses your island name ![image](/attachments/f9dfbeaa-86a3-4989-b74a-d65b1d8e6260) Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/103 --- .../PlayReport/PlayReports.Formatters.cs | 17 +++++++++++++++++ src/Ryujinx/Systems/PlayReport/PlayReports.cs | 13 +++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/Ryujinx/Systems/PlayReport/PlayReports.Formatters.cs b/src/Ryujinx/Systems/PlayReport/PlayReports.Formatters.cs index 649c3cad6..d8df7b627 100644 --- a/src/Ryujinx/Systems/PlayReport/PlayReports.Formatters.cs +++ b/src/Ryujinx/Systems/PlayReport/PlayReports.Formatters.cs @@ -1070,6 +1070,23 @@ namespace Ryujinx.Ava.Systems.PlayReport _ => FormattedValue.ForceReset }; + private static FormattedValue TomodachiLifeLTD_Status(SingleValue value) + { + MessagePackObject messagePackObject = value.Matched.PackedValue; + MessagePackObjectDictionary messagePackObjectDictionary = messagePackObject.AsDictionary(); + + int miiCount = messagePackObjectDictionary["MiiNum"].AsInt32(); + int fountainLevel = messagePackObjectDictionary["FountainLevel"].AsInt32(); + + return $"Looking after {"Mii".ToQuantity(miiCount)}, with an island level of {fountainLevel}"; + } + + private static FormattedValue AnimalCrossingNewHorizons_AppCommon(SingleValue value) + { + MessagePackObject messagePackObject = value.Matched.PackedValue; + MessagePackObjectDictionary messagePackObjectDictionary = messagePackObject.AsDictionary(); + return $"Living on {messagePackObjectDictionary["LandName"].AsString()} Island"; + } } } diff --git a/src/Ryujinx/Systems/PlayReport/PlayReports.cs b/src/Ryujinx/Systems/PlayReport/PlayReports.cs index d483515bb..8880ed5d4 100644 --- a/src/Ryujinx/Systems/PlayReport/PlayReports.cs +++ b/src/Ryujinx/Systems/PlayReport/PlayReports.cs @@ -119,6 +119,19 @@ namespace Ryujinx.Ava.Systems.PlayReport "based on what game you first launch.\n\nNSO emulators do not print any Play Report information past the first game launch so it's all we got.") .AddValueFormatter("launch_title_id", NsoEmulator_LaunchedGame) ) + .AddSpec( + [ "010051f0207b2000", "0100ca502552a000" ], // Tomodachi Life: Living the Dream + Demo + spec => spec + .WithDescription( + "based on your total Mii count and island level.") + .AddValueFormatter("Common", TomodachiLifeLTD_Status) + ) + .AddSpec( + "01006f8002326000", // Animal Crossing New Horizons + spec => spec + .WithDescription("based on your island name.") + .AddValueFormatter("AppCmn", AnimalCrossingNewHorizons_AppCommon) + ) ); private static string Playing(string game) => $"Playing {game}";