Skip to content

Run mod callbacks on KSA 2026.11.10.5801 - #115

Closed
Maximilian-Nesslauer wants to merge 1 commit into
StarMapLoader:feature/external/pr-115-fix-5801-mod-loadingfrom
Maximilian-Nesslauer:fix-5801-mod-loading
Closed

Maximilian-Nesslauer wants to merge 1 commit into
StarMapLoader:feature/external/pr-115-fix-5801-mod-loadingfrom
Maximilian-Nesslauer:fix-5801-mod-loading

Conversation

@Maximilian-Nesslauer

Copy link
Copy Markdown
Contributor

Fixes #113.

KSA 2026.11.10.5801 changed two things that StarMap hooks into, so on that build mods do not get their [StarMapAllModsLoaded] and [StarMapImmediateLoad] callbacks.

  • ModLibrary.LoadAll has an optional parameter now. The [StarMapAllModsLoaded] callbacks have no parameters, so they are called without arguments.
  • Mod.PrepareSystems is gone. [StarMapImmediateLoad] hooks Mod.PrepareSystems when KSA has it and Mod.LoadSettings otherwise, which ModLibrary.PrepareAll calls for each mod at the old place. When KSA has neither, StarMap writes a warning and skips the callback, and the loader goes on.
  • ConfirmRestart needs using Brutal.Collections;, because the Ptr extension of NativeList moved there.

I built it against the 5801 assemblies and ran a mod with all four callbacks ([StarMapBeforeMain], [StarMapImmediateLoad], [StarMapAllModsLoaded], [StarMapUnload]) plus three mods that set up in [StarMapAllModsLoaded]: each callback ran, once.

The exception at shutdown when the game starts with -InstancePath is a different problem and not part of this change.

- Call the StarMapAllModsLoaded methods without arguments, because ModLibrary.LoadAll has an optional parameter now

- Hook StarMapImmediateLoad to Mod.LoadSettings when Mod.PrepareSystems is gone, and skip the callback with a warning when KSA has neither

- Add the using for the NativeList extension that moved to Brutal.Collections
@github-actions
github-actions Bot changed the base branch from main to feature/external/pr-115-fix-5801-mod-loading November 8, 2026 13:43
@Maximilian-Nesslauer

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #114, which makes the same three changes and also makes the missing-target case safe in PatchManager, with the docs updated.

One difference to keep in mind: this PR hooked [StarMapImmediateLoad] to Mod.PrepareSystems when KSA still has it and to Mod.LoadSettings only otherwise, so builds before 5801 kept the exact old moment. In #114 the hook always runs at Mod.LoadSettings, which is one step after PrepareSystems in ModLibrary.PrepareAll on those builds. Mod.LoadSettings exists in every build back to 2026.2.18.3622.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[StarMapImmediateLoad] cannot register on KSA 2026.11.10.5801, which removed Mod.PrepareSystems

1 participant