Area
Compatibility
Motivation / use case
I am trying to run Slay the Spire 2 on an Android environment using a community-made launcher (StS2-Launcher_Mod_Manager). QuickReload causes a crash on startup, preventing the game from reaching the main menu.
Environment
- Game version: v0.103.2
- Launcher: StS2-Launcher_Mod_Manager v0.3.11
- QuickReload: v1.0.4
- Device: Samsung Galaxy Tab S7+ (SM-T970), Android 13
What happens
The mod initializer throws a HarmonyException when attempting to patch NDailyRunLoadScreen.OnSubmenuOpened(). The relevant log output is as follows:
[ERROR] Exception thrown when calling mod initializer of type QuickReload.Entry:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> HarmonyLib.HarmonyException: Patching exception in method
virtual System.Void MegaCrit.Sts2.Core.Nodes.Screens.DailyRun.NDailyRunLoadScreen::OnSubmenuOpened()
This is consistent with the launcher's prior technical analysis of QuickReload, which identified the following Steamworks-related references in the mod:
- Direct references to
Steamworks.NET, Steamworks, CSteamID, m_SteamID, GetSteamID, SteamUser
- Multiplayer lobby hooks depending on Steam Lobby API (
LoadRunLobby, GetRunLobby, WaitForLobbyAndAutoReady, AreAllLobbyPlayersConnected)
- Steam connection initializers (
SteamClientConnectionInitializer, SteamInitializer)
- DLL import resolver registration (
SetDllImportResolver, GodotDllImportResolver, OnResolveDllImport)
- 3 Harmony patches (
QuickReloadNetworkPatch, QuickReloadPauseMenuPatch, QuickReloadMainMenuPatch)
The launcher provides a no-op stub for libsteam_api.so to allow the app to boot, but actual Steamworks API calls will always fail on Android. When Harmony attempts to JIT-compile a patch method that references Steamworks types (such as NDailyRunLoadScreen.OnSubmenuOpened()), the CLR must resolve those types, which triggers the load of Steamworks.NET.dll and causes an immediate crash.
Proposed solution
The same issue was recently encountered and resolved in RitsuLib by refactoring Steam-dependent code into late-bound or platform-gated modules — specifically by adding a platform check at initialization to skip Steam-related Harmony patch registration on non-PC platforms.
A similar approach for QuickReload would be:
- Adding a runtime platform guard (e.g.
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) to skip Steam-dependent patch registration on Android/iOS
- Or using conditional compilation to exclude Steamworks references from non-PC builds
Additional context
Other mods including those with RitsuLib dependencies (ShowPlayerHandCards, MultiPlayerPotionView) work correctly on the mobile launcher after the RitsuLib fix. QuickReload is the only remaining mod in my setup that fails due to this issue.
The launcher developer has confirmed this cannot be fixed launcher-side, as the Steamworks dependency is within the mod's own code.
launcher_20260514_183340.log
Area
Compatibility
Motivation / use case
I am trying to run Slay the Spire 2 on an Android environment using a community-made launcher (StS2-Launcher_Mod_Manager). QuickReload causes a crash on startup, preventing the game from reaching the main menu.
Environment
What happens
The mod initializer throws a
HarmonyExceptionwhen attempting to patchNDailyRunLoadScreen.OnSubmenuOpened(). The relevant log output is as follows:This is consistent with the launcher's prior technical analysis of QuickReload, which identified the following Steamworks-related references in the mod:
Steamworks.NET,Steamworks,CSteamID,m_SteamID,GetSteamID,SteamUserLoadRunLobby,GetRunLobby,WaitForLobbyAndAutoReady,AreAllLobbyPlayersConnected)SteamClientConnectionInitializer,SteamInitializer)SetDllImportResolver,GodotDllImportResolver,OnResolveDllImport)QuickReloadNetworkPatch,QuickReloadPauseMenuPatch,QuickReloadMainMenuPatch)The launcher provides a no-op stub for
libsteam_api.soto allow the app to boot, but actual Steamworks API calls will always fail on Android. When Harmony attempts to JIT-compile a patch method that references Steamworks types (such asNDailyRunLoadScreen.OnSubmenuOpened()), the CLR must resolve those types, which triggers the load ofSteamworks.NET.dlland causes an immediate crash.Proposed solution
The same issue was recently encountered and resolved in RitsuLib by refactoring Steam-dependent code into late-bound or platform-gated modules — specifically by adding a platform check at initialization to skip Steam-related Harmony patch registration on non-PC platforms.
A similar approach for QuickReload would be:
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) to skip Steam-dependent patch registration on Android/iOSAdditional context
Other mods including those with RitsuLib dependencies (ShowPlayerHandCards, MultiPlayerPotionView) work correctly on the mobile launcher after the RitsuLib fix. QuickReload is the only remaining mod in my setup that fails due to this issue.
The launcher developer has confirmed this cannot be fixed launcher-side, as the Steamworks dependency is within the mod's own code.
launcher_20260514_183340.log