From c813503da35b39e63290a776af447e16a88d64c5 Mon Sep 17 00:00:00 2001 From: notabird Date: Sat, 24 Jan 2026 05:04:43 -0800 Subject: [PATCH 1/3] fix 'GAME MODE NULL' being spammed --- Utilla/Behaviours/ConductBoardManager.cs | 3 +-- Utilla/Constants.cs | 4 ++-- Utilla/Models/Gamemode.cs | 2 +- Utilla/Patches/GameModePatches.cs | 17 +++++++++++++++++ Utilla/Utilla.csproj | 4 ++-- 5 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 Utilla/Patches/GameModePatches.cs diff --git a/Utilla/Behaviours/ConductBoardManager.cs b/Utilla/Behaviours/ConductBoardManager.cs index d4df9af..5075fbb 100644 --- a/Utilla/Behaviours/ConductBoardManager.cs +++ b/Utilla/Behaviours/ConductBoardManager.cs @@ -1,5 +1,4 @@ -using GorillaNetworking; -using GorillaTag; +using GorillaTag; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; diff --git a/Utilla/Constants.cs b/Utilla/Constants.cs index 798ab95..1707a8f 100644 --- a/Utilla/Constants.cs +++ b/Utilla/Constants.cs @@ -6,9 +6,9 @@ public class Constants internal const string Name = "Utilla"; - internal const string Version = "1.6.24"; + internal const string Version = "1.6.25"; - public const string GamemodePrefix = "MODDED_"; + public const string GamemodePrefix = "MODDED"; internal const string InfoRepositoryURL = "https://raw.githubusercontent.com/developer9998/Utilla-Info/main"; } diff --git a/Utilla/Models/Gamemode.cs b/Utilla/Models/Gamemode.cs index fa1aa2e..8a91b4b 100644 --- a/Utilla/Models/Gamemode.cs +++ b/Utilla/Models/Gamemode.cs @@ -72,7 +72,7 @@ public Gamemode(string id, string displayName, GameModeType? game_mode_type = nu { BaseGamemode = game_mode_type; - ID = game_mode_type.HasValue && !id.EndsWith(game_mode_type.Value.ToString()) ? string.Concat(id, game_mode_type) : id; + ID = game_mode_type.HasValue && !id.EndsWith(game_mode_type.Value.ToString()) ? string.Concat(id, "|", game_mode_type) : id; DisplayName = displayName; Logging.Message($"Constructed custom gamemode: {id} based on {(game_mode_type.HasValue ? game_mode_type.Value : "no")} type"); diff --git a/Utilla/Patches/GameModePatches.cs b/Utilla/Patches/GameModePatches.cs new file mode 100644 index 0000000..7ec00a8 --- /dev/null +++ b/Utilla/Patches/GameModePatches.cs @@ -0,0 +1,17 @@ +using Fusion; +using HarmonyLib; + +namespace Utilla.Patches; + +[HarmonyPatch(typeof(GorillaGameManager)), HarmonyWrapSafe] +public class GameModePatches +{ + [HarmonyPatch("GameTypeName"), HarmonyPrefix] + public static bool GameTypeNamePatch(GorillaGameManager __instance, ref string __result) { + if (int.TryParse(__instance.GameType().ToString(), out _)) { + __result = __instance.GameModeName(); + return false; + } + return true; + } +} \ No newline at end of file diff --git a/Utilla/Utilla.csproj b/Utilla/Utilla.csproj index 71879b9..21e3d64 100644 --- a/Utilla/Utilla.csproj +++ b/Utilla/Utilla.csproj @@ -35,13 +35,13 @@ $(GameAssemblyPath)\Cinemachine.dll - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Fusion.Runtime.dll + $(GameAssemblyPath)\Fusion.Runtime.dll $(GameAssemblyPath)\Mono.Security.dll - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Newtonsoft.Json.dll + $(GameAssemblyPath)\Newtonsoft.Json.dll $(GameAssemblyPath)\Oculus.Platform.dll From 8508d580682da5db1d1dae91b13e4591962832d5 Mon Sep 17 00:00:00 2001 From: notabird Date: Sun, 25 Jan 2026 02:32:23 -0800 Subject: [PATCH 2/3] Fix bug with gt telemitry that would stop gamemode from starting, thx pl2w for telling me about it and providing a patch --- Utilla/Patches/EnumUtilExtPatches.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Utilla/Patches/EnumUtilExtPatches.cs diff --git a/Utilla/Patches/EnumUtilExtPatches.cs b/Utilla/Patches/EnumUtilExtPatches.cs new file mode 100644 index 0000000..6ebe0e1 --- /dev/null +++ b/Utilla/Patches/EnumUtilExtPatches.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using GorillaGameModes; +using HarmonyLib; +using Utilla.Utils; + +namespace Utilla.Patches; + +[HarmonyPatch] +public class EnumUtilExtPatches +{ + public static MethodBase TargetMethod() + { + return typeof(EnumUtilExt) + .GetMethod(nameof(EnumUtilExt.GetName), BindingFlags.Public | BindingFlags.Static) + ?.MakeGenericMethod(typeof(GameModeType)); + } + + public static bool Prefix(GameModeType e, ref string __result) { + if (int.TryParse(e.ToString(), out _)) { + string a = GameModeUtils.GetGameModeInstance(e).GameTypeName(); + __result = a; + return false; + } + + return true; + } +} \ No newline at end of file From a12fd5aeaef09513cc9e4f3cd2e5154fe646a271 Mon Sep 17 00:00:00 2001 From: Not A Bird <74840366+Not-A-Bird-07@users.noreply.github.com> Date: Sun, 25 Jan 2026 04:44:36 -0800 Subject: [PATCH 3/3] Update Constants.cs got yelled at :( --- Utilla/Constants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilla/Constants.cs b/Utilla/Constants.cs index 1707a8f..41996fb 100644 --- a/Utilla/Constants.cs +++ b/Utilla/Constants.cs @@ -8,7 +8,7 @@ public class Constants internal const string Version = "1.6.25"; - public const string GamemodePrefix = "MODDED"; + public const string GamemodePrefix = "MODDED_"; internal const string InfoRepositoryURL = "https://raw.githubusercontent.com/developer9998/Utilla-Info/main"; }