Notify mod DLLs once the title is mapped #292
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/292"
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 readmet3xt-lab/foxhound. Originally posted by Korothi on 2026-12-01T10:35:44Z.
## What
A mod loaded from
%LOCALAPPDATA%\victory\modscan now find out where the title was mapped. Mods are only loaded withLoadLibraryWtoday, so a mod that has to hook the title's code has no way to know its address or size.After the title is mapped and before any title code runs,
run.rscallsvictory_on_title_mapped(&TitleInfo)in every mod DLL the layer already loaded that exports it. A mod without the export is left alone. A nonzero return is logged and the title runs on. No new switch or environment variable, and the launcher works unchanged.The callback's contract (when it is called, what a nonzero return means, how the struct may grow under a new
version) is written down in the README's Mods section, as asked in the earlier review. Mods are named by role in the code comments.Where the files go
The mod DLL goes in
%LOCALAPPDATA%\victory\mods\. Anything else a mod needs goes where that mod's own documentation says, for example beside<exe>; the layer does not look at it.Notes
Testing
Tested on Windows with the supported build, 1440p, DLSS Quality, started through the launcher with a custom
victory.exe:Not tested: other mods, other builds.
🤖 Generated with Claude Code
Imported from readmet3xt-lab/foxhound. Originally posted by readmet3xt-lab on 2026-12-01T12:27:41Z.
Checked: nothing harmful in the change, a run without mods is untouched, and it only calls into DLLs the layer already loads. The answer to "whether the layer should support mods this far" is yes, after the release now in testing, with three conditions:
If you add the first two to this pull request, it goes onto the batch for the release after the frozen one; the third is ours to add.
Imported from readmet3xt-lab/foxhound. Originally posted by Korothi on 2026-12-01T22:10:01Z.
Added the first two conditions: the first lines of the log now say 'Mods: none' or list the loaded mods, every crash report has a 'mods loaded:' line, and the callback and its struct are marked experimental in the README and in the code. Not yet run on a real build with these lines.
Pull request closed