Add Slay the Spire 2 v0.110.1 compatibility - #1
Draft
PageSecOnd wants to merge 20 commits into
Draft
Conversation
PageSecOnd
force-pushed
the
agent/sts2-0.110.1-compat
branch
from
August 10, 2026 11:40
053a0e4 to
7f5af9d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adapt LAN Multiplayer Reforged to Slay the Spire 2 v0.110.1 API and runtime scene changes identified from the v0.110.1 game assembly, local builds, and in-game logs.
Root cause
STS2 v0.110.x refactored lobby player state. The old
LobbyPlayertype was split intoStartRunLobbyPlayer,LoadRunLobbyPlayer, andRunLobbyPlayer,RunLobbynow receivesIEnumerable<RunLobbyPlayer>, and lobby player serialization now includesPeerVersionInfo. The old mod therefore returned a null constructor fromRunLobbyConstructorPatchs.TargetMethods()and also referenced a type that no longer exists.Additional compile-time API changes found by building against v0.110.1:
JoinFlow.NetServiceis now exposed asINetClientGameService, while the LAN player-name helper still required concreteNetClientGameService.NControllerManager.IsUsingControllerwas removed; controller state is now represented byNControllerManager.InputType/InputType.Controller.Runtime testing also found a join-screen scene-layout change:
JoinButton.Create()assumedControllerIconwas a direct child of the copied refresh button. In v0.110.1 the vanilla scene references it as a unique node (%ControllerIcon), and the old hard-coded direct lookup threw during the Harmony_Readyprefix. That interrupted vanilla_Ready, which then causedNJoinFriendScreen.OnSubmenuOpened()to throw and left the join screen blank.Changes
RunLobbyconstructor Harmony target to useIEnumerable<RunLobbyPlayer>.StartRunLobbyPlayer.Serialize/Deserializeinstead of removedLobbyPlayer.PeerVersionInfoserialization/deserialization in the correct packet order.ClientLobbyJoinResponseMessageandLobbyBeginRunMessagelist deserialization toStartRunLobbyPlayer.RunLobby.ConnectedPlayerIdsusage withRunLobby.PlayerIds.LoadRunLobby.ConnectedPlayerIdscounting withLoadRunLobby.PlayerCount.INetClientGameService.IsUsingControllercalls withInputType == InputType.Controller.StartENetHosterrors instead of discarding its return value.ControllerIconrecursively and restore owners for duplicated descendants so unique-node lookups remain usable._Readyprefix to a postfix and make key scene lookups tolerant, so LAN UI failures no longer prevent the vanilla join screen from initializing.Validation
Static compatibility review was performed against the supplied STS2 v0.110.1
sts2.dllmetadata. The affected types, namespaces, fields, interfaces, enum values, and target method/property names were checked directly against that assembly.A first local build with .NET 9.0.316 against the v0.110.1 game files exposed six API errors (three
INetClientGameServiceconversion errors and three removedIsUsingControllerreferences); those were addressed.A subsequent in-game run showed the mod now completes initialization, but entering the join screen failed at
JoinButton.Create()becauseControllerIconis no longer a direct child. That runtime failure and the resulting blank-screen cascade are addressed by the latest commits.The PR remains a draft pending another local build and in-game join/host verification.
Expected impact
This should remove the original Harmony initialization failure, eliminate the known stale lobby-player API references, address the compile errors reported against v0.110.1, and restore the LAN join panel without breaking the vanilla join screen when the UI scene layout changes.