Notify mod DLLs once the title is mapped #558

Open
Korothi wants to merge 1 commit from upstream-pr/558 into main
Korothi commented 2026-12-03 11:31:01 +00:00 (Migrated from github.com)

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\\mods can now find out where the title was mapped. After the title is mapped and before any title code runs, run.rs calls victory\_on\_title\_mapped(\&TitleInfo) in every mod DLL the layer already loaded that exports it. A mod without the export is still loaded (its DllMain runs) 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: none or list the loaded mods, and every crash report has a mods loaded: line.

- The callback and its struct are marked experimental in docs/mod-callback.md and in the code.

- The contract (when it is called, what a nonzero return means, how the struct may grow under a new version) is in docs/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. The Mods: and mods 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)

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5625591079 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/558). Originally posted by [Korothi](https://github.com/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\\mods` can now find out where the title was mapped. After the title is mapped and before any title code runs, `run.rs` calls `victory\_on\_title\_mapped(\&TitleInfo)` in every mod DLL the layer already loaded that exports it. A mod without the export is still loaded (its `DllMain` runs) 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: none` or list the loaded mods, and every crash report has a `mods loaded:` line. \- The callback and its struct are marked experimental in `docs/mod-callback.md` and in the code. \- The contract (when it is called, what a nonzero return means, how the struct may grow under a new `version`) is in `docs/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. The `Mods:` and `mods 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)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/558:upstream-pr/558'
git switch 'upstream-pr/558'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/558'
git switch 'upstream-pr/558'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/558'
git switch 'upstream-pr/558'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/558'
git switch 'main'
git merge --squash 'upstream-pr/558'
git switch 'main'
git merge --ff-only 'upstream-pr/558'
git switch 'main'
git merge 'upstream-pr/558'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
readmet3xt-lab/foxhound!558
No description provided.