A mods folder: load every DLL in %LOCALAPPDATA%\victory\mods before the title runs #1523
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1523"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by leonidarider on 2026-11-29T02:47:46Z.
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
.dllin%LOCALAPPDATA%\victory\modsis loaded by name order withLoadLibraryWjust 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, inapps/victory/src/main.rs, and a call beforerun::run. No new dependency.What uses it
We wrote it for OpenRage's mod loader: a DLL that serves loose files from a
modsfolder 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
rustfmton 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.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.