Notify mod DLLs once the title is mapped #558
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/558"
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-03T11:31:01Z.
Continues #292, which GitHub closed automatically when main's history was rewritten and which cannot be reopened. Rebased onto the current main; the review points are included.
## What
A mod loaded from
%LOCALAPPDATA%\\victory\\modscan now find out where the title was mapped. 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 still loaded (itsDllMainruns) but not called. A nonzero return is logged and the title runs on. No new switch, and the launcher works unchanged.As asked in the review:
- The first lines of the log say
Mods: noneor list the loaded mods, and every crash report has amods loaded:line.- The callback and its struct are marked experimental in
docs/mod-callback.mdand in the code.- The contract (when it is called, what a nonzero return means, how the struct may grow under a new
version) is indocs/mod-callback.md, linked from the README. The README no longer has a Mods section, so the page is linked from the Reference list and from the mods bullet under Troubleshooting.## 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>.## Testing
Tested on Windows with the supported build, 1440p, DLSS Quality, through the launcher with a custom
victory.exe(before this rebase): with a mod that hooks the title in the mods folder the game runs and the mod's in-game menu opens; without it the game behaves as before. TheMods:andmods loaded:lines and the rebased tree were not run on a real build yet.AI-assisted: written with Claude Sonnet 5.5.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.