A mods folder: load every DLL in %LOCALAPPDATA%\victory\mods before the title runs #1892
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1892"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by leonidarider on 2026-11-29T01:47:58Z.
What it changes
victory already loads one mod in a slot of its own (MFG Unlocker) and whatever DLL sits beside
victory.exeunder a Windows name. A mod that is neither has no clean way in: it has to pose as a system DLL or inject itself from outside.This adds a mods folder. Every
.dllin%LOCALAPPDATA%\victory\modsis loaded by name order, after MFG Unlocker's slot and before the title runs, through the samevictory_hle::streamline::load_modcall that slot uses. 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.It is called on both paths that run a title (
playandrun), so a script that runs the title directly loads the same DLLs.30 lines:
load_modsinapps/victory/src/play.rs, two calls inapps/victory/src/main.rs.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 (the loader iscrates/tools/or-loaderthere, the guide isdocs/guides/GTA_VI_Modding.md). Nothing in this change is specific to it: any mod DLL dropped in the folder loads the same way.How it was tested
mainbuild and runcargo testpassed for the crates it touches: no (not run;cargo build --release -p victorypasses)Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ifBars on 2026-11-29T18:02:30Z.
Thanks for the mods folder. We'd like Palmhook (a mod host for this title) to install as a DLL in this folder instead of as a patched
victory.exe, but the folder alone isn't enough for that yet:streamline::load_modmarks MFG Unlocker as present for any DLL. #2113 fixes that.#2846 (draft) adds optional
victory_mod_*exports for the first three points. A DLL that exports none of them behaves exactly as it does with this PR.