From 78ec72c7ff95b724b355cb0a743d856166718bb3 Mon Sep 17 00:00:00 2001 From: VirxEC Date: Mon, 29 Jun 2026 23:02:26 -0500 Subject: [PATCH] Add -noeac arg for heroic/legendary Add game port parameter to custom launchers --- .../LaunchManager/CustomLaunchers.cs | 31 ++++++++++--------- .../LaunchManager/RocketLeagueLauncher.cs | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/RLBotCS/ManagerTools/LaunchManager/CustomLaunchers.cs b/RLBotCS/ManagerTools/LaunchManager/CustomLaunchers.cs index 87b44a5..86c28e2 100644 --- a/RLBotCS/ManagerTools/LaunchManager/CustomLaunchers.cs +++ b/RLBotCS/ManagerTools/LaunchManager/CustomLaunchers.cs @@ -4,40 +4,43 @@ namespace RLBotCS.ManagerTools; public static partial class LaunchManager { - private static void LaunchGameViaLegendary() + private static void LaunchGameViaLegendary(int gamePort) { - Process legendary = RunCommandInShell( - "legendary launch Sugar -rlbot RLBot_ControllerURL=127.0.0.1:23233 RLBot_PacketSendRate=240 -nomovie" - ); + string args = string.Join(" ", GetRLBotArgs(gamePort)); + Process legendary = RunCommandInShell($"legendary launch Sugar {args} -noeac"); legendary.Start(); } - private static void LaunchGameViaHeroic() + private static void LaunchGameViaHeroic(int gamePort) { + string[] rlbotArgs = GetRLBotArgs(gamePort); + string heroicArgs = string.Join( + "", + rlbotArgs.Select(a => $"&arg={Uri.EscapeDataString(a)}") + ); + string heroicUrl = + $"heroic://launch?appName=Sugar&runner=legendary{heroicArgs}&arg=-noeac"; + Process heroic; #if WINDOWS - heroic = RunCommandInShell( - "start \"\" \"heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie\"" - ); + heroic = RunCommandInShell($"start \"\" \"{heroicUrl}\""); #else - heroic = RunCommandInShell( - "xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'" - ); + heroic = RunCommandInShell($"xdg-open '{heroicUrl}'"); #endif heroic.Start(); } - private static void LaunchCustomLauncher(string extraArg) + private static void LaunchCustomLauncher(string extraArg, int gamePort) { if (extraArg.Equals("legendary", StringComparison.OrdinalIgnoreCase)) { - LaunchGameViaLegendary(); + LaunchGameViaLegendary(gamePort); } else if (extraArg.Equals("heroic", StringComparison.OrdinalIgnoreCase)) { - LaunchGameViaHeroic(); + LaunchGameViaHeroic(gamePort); } else { diff --git a/RLBotCS/ManagerTools/LaunchManager/RocketLeagueLauncher.cs b/RLBotCS/ManagerTools/LaunchManager/RocketLeagueLauncher.cs index 5d63915..b17310c 100644 --- a/RLBotCS/ManagerTools/LaunchManager/RocketLeagueLauncher.cs +++ b/RLBotCS/ManagerTools/LaunchManager/RocketLeagueLauncher.cs @@ -34,7 +34,7 @@ int gamePort LaunchGameViaEpic(gamePort); break; case RLBot.Flat.Launcher.Custom: - LaunchCustomLauncher(extraArg); + LaunchCustomLauncher(extraArg, gamePort); break; case RLBot.Flat.Launcher.NoLaunch: break;