feat(profiles): detect an alternate mod manager mod and hand it to Relay at launch - #231
Merged
Merged
Conversation
…lay at launch Relay v1.1.0 added a --mod-manager slot that replaces its built-in mod manager. Curator derives the manager generically from profile state: the enabled mod (first in order) whose resolved staging target is a base folder containing mod_manager.lua, via one focused IProfileService read (GetActiveModManager) that shares the staging resolver so the answer matches what PrepareModRoot stages. The derivation nulls when the manager file is missing from the resolved target, because the launcher hard-refuses (exit 2) a configured-but-missing manager; a stale flag would be a launch failure. The launch path emits --mod-manager <absolute staged path> immediately after the --mod-path pair, in both hosting modes (the staged tree is authoritative and the game-dir link resolves to the same file), verbatim on Windows and Z:\-translated on Linux. RELAY_MOD_MANAGER joins the reserved profile env names so a profile value cannot point Relay at a different manager than the staged one. Staging and mods.lst are unchanged: the manager mod stages and lists like any ordinary mod, and import keeps requiring base/base.mod (the existing generic mod-shape rule; an empty descriptor passes, so AML's real artifact imports under the base name).
…ls ordering While the active profile has an enabled manager mod, the manager (not Curator's order) drives in-game load order. The Mods page shows a full-width, non-dismissible caution banner between the import card and the row list, carrying the manager mod's display name. The banner state reads the same GetActiveModManager result at every Reload that the launch path consumes, so the banner and the --mod-manager flag can never disagree, and it gates nothing: reorder and lock controls stay fully functional. The name resolves through the loaded row, then the repository container, then the literal base as a defense.
Update the architecture, reference, and orientation docs for the manager slot: the Relay contract flag, the Profiles derivation and its single-read guarantee, the relay-client emission rules (absolute staged path in both hosting modes, verbatim vs Z:\ per platform, no version preflight), the mod-list banner, the reserved RELAY_MOD_MANAGER env name, and the new test coverage. The README gains a short user-facing note.
…d root The staged manager path was handed to the launcher verbatim in both hosting modes. Under default game-dir hosting --mod-path is the game dir, so Relay received a profile-tree path for a file it is told to find under the game dir's mods link. Compose the flag value from the same effective mod root --mod-path was formulated from (modPath plus the in-tree relative portion of the staged manager path), right after the hosting block finalizes modPath. The derivation still locates + verifies the manager in the staged tree; ActiveModManager.ManagerPath stays the staged path.
…ted mod-root path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #228.
What changed
Relay v1.1.0 can replace its built-in mod manager via
--mod-manager <file>. Curator now supports that end to end:IProfileService.GetActiveModManager): an enabled profile mod whose resolved staging target is abasefolder containingmod_manager.luais the active alternate mod manager (the Darktide Mod Loader family convention; e.g. AML, Nexus mod 246). Detection is content-based, manager-agnostic, and shares the staging resolver, so the answer always matches whatPrepareModRootstages. At most one manager per profile (the existing base-name collision block). Yields null when the manager file is missing from the resolved target: Relay hard-refuses a configured-but-missing file, so Curator never hands it one.base/withmod_manager.lua+ an emptybase.mod; the empty descriptor passes the existing import validation (a Vortex install marker), and AML-shaped archives import with base namebase.--mod-manager <path>is emitted immediately after the--mod-pathpair (verbatim on Windows,Z:\-translated on Linux). The value is projected onto the same effective mod root--mod-pathwas formulated from: the game dir under default hosting, the staged root under the external-hosting preference.RELAY_MOD_MANAGERis now a reserved profile env-var name so a profile cannot point Relay at a different manager than the staged one.Tests
New coverage across Profiles (detection matrix: untracked/Nexus/linked, disabled, unresolvable, missing file, capitalized
Base, unknown profile, ordinary staging), Mods (AML archive shape validates + imports), RelayClient (flag presence/position/value on both platforms, projection in both hosting modes, Z:\ translation, no-flag cases), and UI (banner on/off/name formatting, toggle-driven refresh in both directions).