Mods folder, and F8 cheats from Xbox Game Trainer #182

Open
github-bot wants to merge 1 commit from github-bot/gh-182 into main AGit
Owner

@⁠edupode on GitHub · 2026-12-02 12:41 UTC · original
edupode:f8-cheats → main · +133 −0 · 6 files · 1 commits · open

Adds a small mods folder to xmem, so the F8 cheats from Xbox Game Trainer (GPL-3.0) can run in it.

What changes

  • apps/victory/src/mods.rs: once the title's image is mapped, and before any title code runs, every DLL in the mods folder is loaded with LoadLibraryW. The folder is VICTORY_MODS_DIR, otherwise mods beside victory.exe. VICTORY_MODS=0 loads none, and each loaded DLL is named in the output. With no mods folder, nothing changes.
  • tools/cheats.sh: puts the newest victory_cheats.dll from the trainer's releases into ./mods and sets VICTORY_MODS_DIR in run.conf. tools/cheats.sh off undoes that, and tools/cheats.sh FILE.dll uses a local copy instead of downloading.
  • A short "F8 cheats" section in the README, plus /mods/ in .gitignore.

How the trainer runs here
No engine API is needed. Without one, the DLL finds the title's image itself, checks the 70 game functions it uses, takes F8 and draws its menu in a window of its own. It is single player only.

Tested

  • Windows on an NVIDIA card, where xmem itself stops with "unified memory is not there". The DLL was loaded, found the image, matched all 70 functions, hooked the game's cheat input and readied the F8 overlay.
  • Not yet tested in a game on Linux with AMD: we have no such machine here. Gamescope composes a single window and may not show the trainer's own window; the README says so.

🤖 Generated with Claude Code

**@⁠edupode** on GitHub · 2026-12-02 12:41 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/182) `edupode:f8-cheats` → `main` · +133 −0 · 6 files · 1 commits · open Adds a small mods folder to xmem, so the F8 cheats from [Xbox Game Trainer](https://github.com/edupode/Xbox-game-trainer) (GPL-3.0) can run in it. **What changes** - `apps/victory/src/mods.rs`: once the title's image is mapped, and before any title code runs, every DLL in the mods folder is loaded with `LoadLibraryW`. The folder is `VICTORY_MODS_DIR`, otherwise `mods` beside `victory.exe`. `VICTORY_MODS=0` loads none, and each loaded DLL is named in the output. With no mods folder, nothing changes. - `tools/cheats.sh`: puts the newest `victory_cheats.dll` from the trainer's releases into `./mods` and sets `VICTORY_MODS_DIR` in `run.conf`. `tools/cheats.sh off` undoes that, and `tools/cheats.sh FILE.dll` uses a local copy instead of downloading. - A short "F8 cheats" section in the README, plus `/mods/` in `.gitignore`. **How the trainer runs here** No engine API is needed. Without one, the DLL finds the title's image itself, checks the 70 game functions it uses, takes F8 and draws its menu in a window of its own. It is single player only. **Tested** - Windows on an NVIDIA card, where xmem itself stops with "unified memory is not there". The DLL was loaded, found the image, matched all 70 functions, hooked the game's cheat input and readied the F8 overlay. - **Not yet tested in a game on Linux with AMD:** we have no such machine here. Gamescope composes a single window and may not show the trainer's own window; the README says so. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every DLL in the mods folder (VICTORY_MODS_DIR, else `mods` beside
victory.exe; VICTORY_MODS=0 loads none) is loaded once the title's image is
mapped, before it runs. Xbox Game Trainer's victory_cheats.dll runs that way
without an engine table: it finds the title's image itself, takes F8 and
draws its menu in a window of its own.

tools/cheats.sh gets the newest victory_cheats.dll from the trainer's GitHub
releases into ./mods and sets VICTORY_MODS_DIR in run.conf; `off` undoes it.

Tested on Windows (NVIDIA, where xmem itself stops for want of unified
memory): the DLL is loaded, finds the image, checks its 70 game functions,
hooks the game's cheat input and readies the F8 overlay. Not yet tested in a
game on Linux.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 12:45:59 +00:00
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 12:01 UTC · original

The mods loader is ~35 lines and genuinely useful, but as one PR this cannot land: tools/cheats.sh:24-28 fetches whatever the mutable "latest release" of a third party's trainer repo points at and the loader executes it inside the game process, with no hash. Every download in setup.sh is pinned (setup.sh:11-22 carries a sha256 per URL), so this is the opposite of the project's own rule.

Smaller things, all fixable:

  • VICTORY_MODS_DIR and VICTORY_MODS are in neither run.conf.default nor docs/SETTINGS.md, so the F1 menu cannot show them (run.conf.default:2-3).
  • apps/victory/src/mods.rs:22-27 defaults the folder to next to victory.exe, i.e. inside the build output, which build.sh/setup.sh wipe on update — and tools/cheats.sh writes to ./mods at the repo root. The two halves disagree on the path; the game dir next to run.conf is the place both want.
  • apps/victory/src/mods.rs:65-68 mutates process-global env in a test without serialisation.

If you split it into the loader alone, with the switch documented, mods under the game dir, and no network in the repo at all (let people fetch the DLL themselves and say so in the README), that half is reviewable.

**@⁠Luxuride** on GitHub · 2026-12-04 12:01 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/182#issuecomment-7410865809) The mods loader is ~35 lines and genuinely useful, but as one PR this cannot land: `tools/cheats.sh:24-28` fetches whatever the mutable "latest release" of a third party's trainer repo points at and the loader executes it inside the game process, with no hash. Every download in `setup.sh` is pinned (`setup.sh:11-22` carries a sha256 per URL), so this is the opposite of the project's own rule. Smaller things, all fixable: - `VICTORY_MODS_DIR` and `VICTORY_MODS` are in neither `run.conf.default` nor `docs/SETTINGS.md`, so the F1 menu cannot show them (`run.conf.default:2-3`). - `apps/victory/src/mods.rs:22-27` defaults the folder to next to `victory.exe`, i.e. inside the build output, which `build.sh`/`setup.sh` wipe on update — and `tools/cheats.sh` writes to `./mods` at the repo root. The two halves disagree on the path; the game dir next to `run.conf` is the place both want. - `apps/victory/src/mods.rs:65-68` mutates process-global env in a test without serialisation. If you split it into the loader alone, with the switch documented, mods under the game dir, and no network in the repo at all (let people fetch the DLL themselves and say so in the README), that half is reviewable.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/182/head:github-bot/gh-182'
git switch 'github-bot/gh-182'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-182'
git switch 'github-bot/gh-182'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-182'
git switch 'github-bot/gh-182'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-182'
git switch 'main'
git merge --squash 'github-bot/gh-182'
git switch 'main'
git merge --ff-only 'github-bot/gh-182'
git switch 'main'
git merge 'github-bot/gh-182'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.