DevourUnlocker/README.md
MiTHRAL 422f47f25c
Some checks are pending
Build DevourUnlocker / windows (push) Waiting to run
Build DevourUnlocker / linux (push) Waiting to run
Build DevourUnlocker / standalone (push) Waiting to run
v2.0.0: cross-platform winhttp proxy rewrite
- Replace hard offsets (0x74B0B0) with il2cpp resolver + string-xref sigscan
- winhttp.dll proxy (zero BepInEx, forwards WinHttp* exports) for Windows + Proton (WINEDLLOVERRIDES=winhttp=n,b)
- Selective ImGui GUI (F6) per-robe/character overrides, persisted to DevourUnlocker.json
- CMake cross-platform build, Linux .so verified
- Standalone Python CLI+Tkinter (CachyOS/Proton paths, compatdata/1274570)
- Install scripts pulling from git releases (install.sh/ps1), BepInEx Harmony fallback, CI build.yml
- Legacy DirectX11 Edition kept as reference, x64/Release artifacts removed
2026-08-21 15:28:02 -04:00

93 lines
4 KiB
Markdown

# DevourUnlocker v2 — Cross-Platform (Windows + Linux Proton)
> Full rewrite of the 3-year-stale DirectX11 DLL. Now: **selective GUI**, **no hard offsets** (il2cpp resolver + sigscan), **winhttp.dll proxy** for zero-install, **multiplayer safe** for friend lobbies, plus a **standalone** tool.
Legacy `DirectX11 Edition/` is kept as `legacy/` reference — new code is in `src/` (CMake) + `BepInEx/` + `standalone/`.
## Quick Install (pulls from your Git releases)
**Windows (PowerShell):**
```ps1
iwr https://raw.githubusercontent.com/mithral/DevourUnlocker/main/scripts/install.ps1 -OutFile install.ps1
.\install.ps1 # auto-finds Steam Devour
# or: .\install.ps1 -GameDir "C:/Program Files (x86)/Steam/steamapps/common/Devour"
```
**Linux — CachyOS / Proton:**
```bash
curl -fsSL https://raw.githubusercontent.com/mithral/DevourUnlocker/main/scripts/install.sh | bash
# then in Steam: Devour -> Properties -> Launch Options:
# WINEDLLOVERRIDES="winhttp=n,b" %command%
```
**Uninstall:**
```bash
bash scripts/install.sh --uninstall
# or ps1: .\install.ps1 -Uninstall
```
Launch Devour → **F6** toggles GUI (pick robes/characters), **F5** unloads. No BepInEx needed.
## What It Does
* Hooks `IsRobeUnlocked` / `IsCharacterUnlocked` resolved **at runtime** via `il2cpp_class_from_name` + string-xref sigscan — no `0x74B0B0` hard offset. Works across updates until method names change.
* `winhttp.dll` proxy forwards all `WinHttp*` exports to system `winhttp` — HTTP/auth/lobby unaffected. Photon/udpkit/bold networking untouched.
* GUI: ImGui DX11 (Win) / SDL fallback (Proton). Selective per-item overrides stored in `DevourUnlocker.json` beside `DEVOUR.exe`.
* Multiplayer: client-visual only, no VAC/EAC. Friend lobbies tested on Proton ↔ Windows — no desync, no ban.
## Alternatives
* **BepInEx plugin** (`BepInEx/DevourUnlocker.cs`) — if you already use Thunderstore/r2modman. Patches by method name via Harmony, same GUI via `OnGUI`.
* **Standalone** (`standalone/devour_unlocker.py` + `gui.py`) — no injection; writes `DevourUnlocker.json` for the mod to consume. Run `python standalone/gui.py` or `python standalone/devour_unlocker.py unlock --all`.
```bash
python standalone/devour_unlocker.py list
python standalone/devour_unlocker.py unlock --robes Golden,StraightJacket --chars Molly,Zara
python standalone/devour_unlocker.py unlock --all --exclusive --json ~/DevourUnlocker.json
python standalone/gui.py # Tkinter checkboxes
```
## Build From Source
**Windows (MSVC):**
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
# outputs build/winhttp.dll + build/DevourUnlocker.dll
```
**Linux (for .so / testing):**
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WINHTTP_PROXY=OFF
cmake --build build
```
**Release zip:**
```bash
powershell scripts/make_release.ps1 # or: zip -j DevourUnlocker_winhttp_v2.0.0.zip build/winhttp.dll build/DevourUnlocker.dll DevourUnlocker.json
```
## Structure
```
src/ # native mod (CMake, winhttp proxy, resolver, patches, gui)
il2cpp_resolver.* # no hard offset
patches.* # IsRobe/IsCharacter hooks (MinHook)
gui/overlay.* # ImGui selective GUI
platform/ # win32.cpp, winhttp_proxy.cpp, linux.cpp
BepInEx/ # fallback Harmony plugin
standalone/ # python CLI + Tkinter GUI
scripts/install.* # pull-from-git installers
tools/dump_metadata.py # parse global-metadata.dat -> robes list
DirectX11 Edition/ # legacy v1 (unchanged, now x64/ removed)
```
## Troubleshooting
* **GUI not showing:** Under Proton, ensure `WINEDLLOVERRIDES` is set. Check `compatdata/1274570/.../Player.log` for `[DevourUnlocker] Present hooked`.
* **winhttp conflict:** Another mod already uses `winhttp.dll` → use `BepInEx` build or chain-load via `doorstop`.
* **After game update hooks miss:** Run `python tools/dump_metadata.py /path/to/global-metadata.dat` — if `IsRobeUnlocked` gone, open issue with new `Player.log`.
## License
MIT — see `LICENSE`. Original by RaizyDaizy, rewrite by fork.