A mods folder: load every DLL in %LOCALAPPDATA%\victory\mods before the title runs #37

Closed
github-bot wants to merge 1 commit from gh-pr/37/head into gh-pr/37/base
Owner

@⁠leonidarider on GitHub · 2026-11-29 02:47 UTC · original
ragetools:mods-folder → main · +41 −0 · 1 files · 1 commits · closed without merging

What it changes

A mod DLL has no clean way into victory today: it has to pose as a system DLL beside the program or inject itself from outside.

This adds a mods folder. Every .dll in %LOCALAPPDATA%\victory\mods is loaded by name order with LoadLibraryW just before the title runs. Each one is named on the console whether it loaded or not, and a DLL that fails to load costs the run nothing. An empty or missing folder changes nothing, and off Windows the function is empty.

One self-contained function, load_mods, in apps/victory/src/main.rs, and a call before run::run. No new dependency.

What uses it

We wrote it for OpenRage's mod loader: a DLL that serves loose files from a mods folder beside the game in place of the archives' own, with no archive rewritten. Nothing in this change is specific to it: any mod DLL dropped in the folder loads the same way.

How it was tested

Honestly: not on this tree. The same behaviour is open and in daily use on the NVIDIA fork as trustno1-coder/VIctory-NVIDIA#1892, where it goes through that fork's own DLL-loading call. This version is rewritten to stand alone because this tree has no such call. The function compiles and passes rustfmt on its own under edition 2024 with warnings denied, but I have not built this repository with it, so please treat it as a proposal to check rather than a tested change.

**@⁠leonidarider** on GitHub · 2026-11-29 02:47 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/37) `ragetools:mods-folder` → `main` · +41 −0 · 1 files · 1 commits · closed without merging ## What it changes A mod DLL has no clean way into victory today: it has to pose as a system DLL beside the program or inject itself from outside. This adds a mods folder. Every `.dll` in `%LOCALAPPDATA%\victory\mods` is loaded by name order with `LoadLibraryW` just before the title runs. Each one is named on the console whether it loaded or not, and a DLL that fails to load costs the run nothing. An empty or missing folder changes nothing, and off Windows the function is empty. One self-contained function, `load_mods`, in `apps/victory/src/main.rs`, and a call before `run::run`. No new dependency. ## What uses it We wrote it for [OpenRage](https://github.com/openragee/openrage)'s mod loader: a DLL that serves loose files from a `mods` folder beside the game in place of the archives' own, with no archive rewritten. Nothing in this change is specific to it: any mod DLL dropped in the folder loads the same way. ## How it was tested Honestly: not on this tree. The same behaviour is open and in daily use on the NVIDIA fork as trustno1-coder/VIctory-NVIDIA#1892, where it goes through that fork's own DLL-loading call. This version is rewritten to stand alone because this tree has no such call. The function compiles and passes `rustfmt` on its own under edition 2024 with warnings denied, but I have not built this repository with it, so please treat it as a proposal to check rather than a tested change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:23:34 +00:00
github-bot closed this pull request 2026-11-30 02:23:34 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-11-29 08:10 UTC · original

Thanks! Ported with credit (commit 6c67166) and released in v0.8.1: https://github.com/readmet3xt-lab/foxhound/releases/tag/v0.8.1. Each mod is named on the console, so it lands in the launcher's log. The README has a short Mods section warning to load only trusted DLLs.

**@⁠readmet3xt-lab** on GitHub · 2026-11-29 08:10 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/37#issuecomment-7252932567) Thanks! Ported with credit (commit 6c67166) and released in v0.8.1: https://github.com/readmet3xt-lab/foxhound/releases/tag/v0.8.1. Each mod is named on the console, so it lands in the launcher's log. The README has a short Mods section warning to load only trusted DLLs.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.