Files

49 lines
2.4 KiB
Markdown

# MH Wilds Mod Manager (Linux)
Native GTK4/libadwaita mod manager for Monster Hunter Wilds: checkbox mod list, screenshots, categories,
search, conflict detection, load order, profiles, archive import (zip/7z/rar), `nxm://` downloads, REFramework
setup, and safe recovery when a title update raises the vanilla PAK ceiling.
No pip packages: it needs only system PyGObject (GTK 4, libadwaita ≥ 1.4), plus `7z` / `unrar` for those formats.
## Run
```bash
./bin/mhwmm
```
Tests (headless, stdlib `unittest`):
```bash
PYTHONPATH=src python3 -m unittest discover -s tests -t .
```
A dev venv must use `--system-site-packages`, otherwise `gi` disappears.
## How it works
- Mods are extracted into `~/.local/share/mhwilds-mod-manager/mods/<id>/files`; the game folder is only touched
by **Deploy**, which symlinks (or hardlinks/copies) files and records each one in `state/deployed.json`.
- PAK mods get slots above the vanilla ceiling of each chain (`re_chunk_000.pak.patch_NNN.pak` and the
`.sub_000` chain). On every start the manager compares against `state/pak-baseline.json`; if Steam added or
changed PAKs it removes its own PAKs, re-derives the ceiling and re-slots.
- Safety: only files in the manifest that still match what was recorded are ever deleted; foreign PAKs are never
touched; `reframework/data/` is never managed; destinations are restricted to `natives/`, `reframework/` and
PAK/DLL names at the game root; failed deploys roll back. **Undeploy All** returns the game folder to its
pre-mod state (shadowed files restored, directories the manager created pruned).
- REFramework: `dinput8.dll`, `LooseFileLoader_Enabled` in `re2_fw_config.txt`, and the Proton launch option
`WINEDLLOVERRIDES="dinput8.dll=n,b" %command%`. The launch option is verified and shown with a Copy button;
writing `localconfig.vdf` is opt-in, backed up, and refused while Steam runs.
## nxm:// links
Preferences → Nexus Mods: paste an API key and press *Register* (writes a user-level `.desktop` file and runs
`xdg-mime default`). Links are forwarded to the running instance over D-Bus.
## Known limits
- PAK↔PAK / PAK↔loose conflict detection parses the KPKA entry table and hashes paths with murmur3; it is
best-effort and shows nothing if a PAK cannot be parsed.
- A PAK you copy into the game folder by hand above the ceiling is indistinguishable from a game update and will
be adopted as vanilla.