Skip to content

迁移到 Reforge 无 Harmony 重写版并修复 beta 兼容问题和超过 7 人无法联机问题#23

Open
zuiter wants to merge 1 commit into
Rain156:mainfrom
zuiter:reforge-migration-0.1.8-beta
Open

迁移到 Reforge 无 Harmony 重写版并修复 beta 兼容问题和超过 7 人无法联机问题#23
zuiter wants to merge 1 commit into
Rain156:mainfrom
zuiter:reforge-migration-0.1.8-beta

Conversation

@zuiter
Copy link
Copy Markdown

@zuiter zuiter commented May 27, 2026

修改内容

本 PR 将旧的 Harmony 实现迁移为 Reforge 无 Harmony 重写版。
主要改动:

  • 移除旧 Harmony patch 实现,改为 ModInitializer + ReflectionCache + Godot 节点模块
  • 使用 RMP 扩展大厅协议处理 5-16 人大厅同步
  • 修复 beta 0.106 中第一个宝箱后可能数据不同步的问题
  • 修复 beta 0.106.1 下 INetMessage.ShouldBuffer 导致的模组加载失败
  • 更新 README.md / README_ZH.md,保留截图、功能说明、配置说明和鸣谢
  • 删除旧的已跟踪 build/ 二进制产物
  • 发布脚本改为自动解析 sts2.dllSteamworks.NET.dll

说明

Reforge 版本不再使用 Harmony / MonoMod / Transpiler,也不再依赖运行时方法替换。
当前实现通过游戏自带的 Mod 初始化入口加载模块,并使用反射缓存、Godot 节点轮询和 RMP 扩展网络协议来处理多人大厅、UI 布局、宝箱房和难度缩放等功能。
0.1.8-beta 中房间人数上限固定为 16,旧配置中的 max_player_limit 会被忽略;配置文件仅保留 difficulty_scaling 和 macOS TLS 兼容补丁相关选项。

已验证

  • dotnet build .\RemoveMultiplayerPlayerLimit.csproj -c Release 通过
  • tools/build_release.ps1 完整打包通过
  • 成功生成 sts2-RMP-0.1.8-beta.zip
  • git diff --cached --check 通过
  • 确认源码和 .csproj 中没有 Harmony / MonoMod patch 引用

未验证

  • 尚未进行真实 5-16 人联机实测
  • macOS / Linux 运行环境未实机验证

Replace the old runtime-patching implementation with the Reforge module system: official mod initializer, reflection cache, injected Godot nodes, and the RMP extended lobby protocol for large-lobby synchronization. The migration also refreshes player-facing README content, restores screenshot assets and contributor credits, removes tracked build outputs, and teaches release scripts to resolve both sts2.dll and Steamworks.NET.dll from the installed game.

Constraint: Current project rules forbid Harmony, MonoMod, runtime transpilers, and JSON config files.
Constraint: Slay the Spire 2 beta 0.106.1 requires INetMessage.ShouldBuffer to be compiled against the current game assembly.
Rejected: Patch the old Harmony implementation in place | this PR is intentionally the Reforge migration requested by maintainers.
Rejected: Commit generated DLL/PCK/ZIP artifacts | build outputs are reproducible and already ignored.
Confidence: medium
Scope-risk: broad
Directive: Do not reintroduce runtime patching frameworks; keep game-internal access behind ReflectionCache and RMP protocol boundaries.
Tested: dotnet build .\RemoveMultiplayerPlayerLimit.csproj -c Release with installed beta sts2.dll and Steamworks.NET.dll
Tested: powershell -ExecutionPolicy Bypass -File tools\build_release.ps1 -Configuration Release -Sts2AssemblyPath <installed sts2.dll> -SteamworksAssemblyPath <installed Steamworks.NET.dll>
Tested: git diff --cached --check
Not-tested: In-game multiplayer session with 5-16 real clients
@zuiter zuiter force-pushed the reforge-migration-0.1.8-beta branch from 7666149 to e6670c9 Compare May 27, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant