|
1 | | -# uc-online2 — xinerqu 分支 |
2 | | - |
3 | | -> **⚠️ 此仓库是 [UnionCrax-Team/uc-online2](https://github.com/UnionCrax-Team/uc-online2) 的个人维护分支 (fork)。** |
4 | | -> |
5 | | -> 原作者 [veeanti](https://vee-anti.xyz) 的工作是上游的基础。本分支在原 v1.5.0 基础上修复了关键 bug 并补全了功能,如果上游未合并 PR,两条线将各自独立发展。 |
6 | | -> |
7 | | -> 英文说明见原文下方,本段为中文摘要。详细变更见 [Changelog](#changelog)。 |
8 | | -
|
9 | | -# uc-online2 (Original README below) |
| 1 | +# uc-online2 |
10 | 2 |
|
11 | 3 | Custom modified Steam API .dll for Steam games to spoof your game as Spacewar (or any other game). Drop-in replacement for `steam_api.dll` / `steam_api64.dll`. Now has its own "client"! (AKA Core) |
12 | 4 |
|
13 | 5 | ## Usage |
14 | 6 |
|
15 | | -__**If using downloaded .dlls from [Releases](https://github.com/xinerqu/uc-online2/releases) (xinerqu fork, v1.5.1):**__ |
| 7 | +__**If using downloaded .dlls from [Releases](https://github.com/UnionCrax-Team/uc-online2/releases) (as of now, v1.6.2, thanks to xinerqu!):**__ |
16 | 8 | - 1. Extract the archive downloaded from __**LATEST**__ release (which is now v1.5.0). |
17 | 9 | - 2. Copy the corresponding .dll to replace your original .dll. |
18 | 10 | - 2a. Rename the original .dll before copying it to something else if you feel you must back it up, something like ``steam_api_o.dll`` as Goldberg Emu suggests or ``steam_api64.dll.old``. (It doesn't matter as long as it is just changed.) |
@@ -95,11 +87,17 @@ Okay, so this part I did not cover as of publishing the source files, this will |
95 | 87 | - No, this will not work with Denuvo protected games. If you think it can, modify it so that it can work like an activated game, but even then I cannot guarantee it will work. It will likely reject you and you will need to get re-activated as your token will be fucked permanently. So basically, __I say just don't even bother. It'll likely waste your time and the activators' time too.__ |
96 | 88 | - As it is right now, DLC you don't own will likely not work - I'll try and add functionality for that in and if it works, then it'll likely work the same as Goldberg does. |
97 | 89 | - ~~If you're trying this with a game that has the AppId hard coded in (like with Godot games) then you'll need to modify the game to set the AppId to what you need it to be. Though, you won't even need this at all if you do that lol.~~ |
| 90 | + ... note from xinerqu ... |
| 91 | + - ZH |
98 | 92 | **已于 v1.6.0 修复:** 本 fork 通过 `BIsSubscribedApp` hook + 补全 flat API 导出,解决了 Steamworks.NET (C#) 游戏(如 Godot + Steamworks.NET)的兼容性问题。已测试 Slay the Spire 2 正常运行,其他同类游戏应有同样效果。 |
| 93 | + - EN |
| 94 | + **Fixed in v1.6.0:** This fork resolves compatibility issues for Steamworks.NET (C#) games—such as those built with Godot + Steamworks.NET—by utilizing the `BIsSubscribedApp` hook and completing the flat API exports. *Slay the Spire 2* has been tested and runs normally; other similar games should yield the same results. |
99 | 95 | - You cannot join VAC protected servers or servers hosted using the real AppId in Garry's Mod or other Source games or any other games that have similar protections. (GoldSrc games seemingly do not apply, as CS1.6 let me join any servers.) Please do not message me asking why you can't join any servers in Garry's Mod. Instead, ask me how you can play with your friends if they have legitimate copies. :) |
100 | 96 | - For any other unexpected or unaccounted for issues, please contact me. I have yet to test this with every game so I will rely on the community to do so. |
101 | 97 |
|
102 | | -## Changelog (xinerqu fork vs upstream v1.5.0) |
| 98 | +## Changelog, from xinerqu's PR |
| 99 | + |
| 100 | + - ZH |
103 | 101 |
|
104 | 102 | ### v1.6.2 — Facepunch.Steamworks / Unity 游戏兼容性修复 |
105 | 103 |
|
@@ -151,4 +149,58 @@ Okay, so this part I did not cover as of publishing the source files, this will |
151 | 149 |
|
152 | 150 | **其他修复** |
153 | 151 | - Release 模式日志:移除 `#ifdef _DEBUG` 守卫,UCOLOG 现在在所有构建模式下工作 |
154 | | -- 更健壮的 DLL 路径解析:`PathFindFileNameA` 确保文件名提取正确 |
| 152 | +- 更健壮的 DLL 路径解析:`PathFindFileNameA` 确保文件名提取正确 |
| 153 | + |
| 154 | + - EN |
| 155 | + |
| 156 | + ### v1.6.2 — Facepunch.Steamworks / Unity Game Compatibility Fixes |
| 157 | + |
| 158 | +**Fixed crashes in Unity games using Facepunch.Steamworks (such as BadPunPC) caused by missing flat API exports.** |
| 159 | + |
| 160 | +- **Issue**: Facepunch.Steamworks requires 995 Steam API exports, but uc-online2 was missing 22 of them, including the ISteamAppList interface, several interface version strings, and some networking/Stadia-related exports. Missing these exports caused games to crash immediately during initialization. |
| 161 | +- **Fix**: Added all 22 missing exports: |
| 162 | + - **ISteamAppList**: `GetISteamAppList` + 5 AppList functions, obtaining the real interface through `SteamInternal_FindOrCreateUserInterface` |
| 163 | + - **Interface version strings**: `SteamAppList_v001`, `SteamUser_v021`, `SteamRemotePlay_v001`, `SteamUGC_v016`, `SteamVideo_v002`, `SteamGameServer_v014`, `SteamGameServerUGC_v016` |
| 164 | + - **Networking stubs**: 4 FakeUDPPort functions, 3 SteamDatagramHostedAddress functions |
| 165 | + - **Stadia stubs**: `GetStadiaID`, `SetStadiaID` |
| 166 | +- **Affected scope**: All Unity / .NET games using Facepunch.Steamworks |
| 167 | + |
| 168 | +### v1.6.1 — Save Persistence Fix |
| 169 | + |
| 170 | +**Fixed an issue where save data in some Steam Remote Storage games would disappear after exiting the game.** |
| 171 | + |
| 172 | +- **Issue**: Games queried save files through `FileExists`, and Steam returned FALSE. The game would then treat the local save as corrupted/dirty data and automatically delete it, even though the file still existed and the data was valid. |
| 173 | +- **Fix**: Added a local fallback in `SteamAPI_ISteamRemoteStorage_FileExists`. When Steam returns FALSE, it scans all subdirectories under `%APPDATA%` for folders matching the `steam/<SteamID>` pattern. If the local file exists, it returns TRUE to prevent accidental deletion. Paths are cached after the initial scan. |
| 174 | + |
| 175 | +### v1.6.0 — Steamworks.NET Compatibility Fixes (Godot Game Support) |
| 176 | + |
| 177 | +**Fixed issues preventing Godot + Steamworks.NET games (such as Slay the Spire 2) from running.** |
| 178 | + |
| 179 | +- **Root cause**: uc-online2 was missing the `SteamAPI_ISteamUserStats_RequestCurrentStats` flat API export. |
| 180 | +- Steamworks.NET (C#) immediately P/Invokes this function after initialization to load achievements/statistics, and its absence caused an `EntryPointNotFoundException`. |
| 181 | +- The BIsSubscribedApp hook already handled hardcoded AppID checks, but incomplete flat API exports caused the C# layer itself to throw an exception. |
| 182 | +- **Fix**: Added the missing flat API export. `RequestCurrentStats` has been removed in newer Steam SDKs (stats are now automatically managed by the Steam client), so the implementation returns `k_uAPICallInvalid`. |
| 183 | +- **Affected scope**: All Godot / Unity / C# games using Steamworks.NET |
| 184 | + |
| 185 | +### v1.5.1 — Bug Fixes & Missing API Exports |
| 186 | + |
| 187 | +**Bug 1: `InitSteamClient()` loading path issue** |
| 188 | +- Original code used `LoadLibraryA(fullPath)` to load `steamclient64.dll` |
| 189 | +- When Windows resolved DLL dependencies (`tier0_s64.dll`, `vstdlib_s64.dll`), it searched the game EXE directory instead of the Steam directory |
| 190 | +- **Fix**: Switched to `LoadLibraryExA` + `LOAD_WITH_ALTERED_SEARCH_PATH`, and unified core DLL loading path fixes in `uc_loader.h` |
| 191 | + |
| 192 | +**Bug 2: `LoadGameOverlay()` hardcoded path** |
| 193 | +- `GetModuleHandle` used the hardcoded path `C:\Program Files (x86)\Steam\GameOverlayRenderer64.dll` |
| 194 | +- If Steam was installed in a non-default location, the overlay could be incorrectly detected as already loaded |
| 195 | +- **Fix**: Replaced with `GetModuleHandleA(moduleName)`, added three-level Steam path fallback logic (registry → hardcoded → API cache), plus PATH search fallback |
| 196 | + |
| 197 | +**Added missing flat API exports** |
| 198 | +- 34 `ISteamMusicRemote` flat API exports |
| 199 | +- 11 legacy `ISteamGameSearch` flat API stubs |
| 200 | +- `ISteamFriends_SetPersonaName` + `ISteamFriends_GetUserRestrictions` |
| 201 | +- Legacy versioned interface aliases (v001 GameSearch/MusicRemote/Timeline, v017 Friends, v012 UserStats, v020 UGC, etc.) |
| 202 | +- `g_pSteamClientGameServer` export (fixed `S_API` declaration placement) |
| 203 | + |
| 204 | +**Other fixes** |
| 205 | +- Release build logging: removed the `#ifdef _DEBUG` guard, so UCOLOG now works in all build configurations |
| 206 | +- More robust DLL path resolution: `PathFindFileNameA` now ensures correct filename extraction |
0 commit comments