Notify mod DLLs once the title is mapped #558

Open
github-bot wants to merge 1 commit from github-bot/gh-558 into main AGit
Owner

@⁠Korothi on GitHub · 2026-12-03 11:31 UTC · original
Korothi:mod-title-mapped-callback → main · +148 −9 · 6 files · 1 commits · open

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)

**@⁠Korothi** on GitHub · 2026-12-03 11:31 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/558) `Korothi:mod-title-mapped-callback` → `main` · +148 −9 · 6 files · 1 commits · open 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)
After the title is mapped and before any title code runs, call victory_on_title_mapped(&TitleInfo) in every mod DLL of %LOCALAPPDATA%\victory\mods that exports it. The first lines of the log and every crash report name the loaded mods, and the callback is documented as experimental in docs/mod-callback.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 11:33:33 +00:00
This pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/558/head:github-bot/gh-558'
git switch 'github-bot/gh-558'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-558'
git switch 'github-bot/gh-558'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-558'
git switch 'github-bot/gh-558'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-558'
git switch 'main'
git merge --squash 'github-bot/gh-558'
git switch 'main'
git merge --ff-only 'github-bot/gh-558'
git switch 'main'
git merge 'github-bot/gh-558'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.