Skip to content

Run on KSA 2026.11.10.5801, and skip a hook whose target is gone - #114

Merged
KlaasWhite merged 1 commit into
StarMapLoader:feature/external/pr-114-fix-ksa-5801-hooksfrom
LaurensDeV:fix/ksa-5801-hooks
Nov 8, 2026
Merged

KlaasWhite merged 1 commit into
StarMapLoader:feature/external/pr-114-fix-ksa-5801-hooksfrom
LaurensDeV:fix/ksa-5801-hooks

Conversation

@LaurensDeV

Copy link
Copy Markdown
Contributor

Fixes #113.

KSA 2026.11.10.5801 breaks StarMap in three places. This fixes all three in source that still
compiles against the 2026.10.25.5707 reference package, so it can ship before that package moves.

[StarMapImmediateLoad] stops the loader. 5801 removed Mod.PrepareSystems, so
GetMethod(nameof(Mod.PrepareSystems))! is null and GetOrCreateMethodPatch throws on the null key,
out of StarMapCore's constructor: the game never starts. The hook now prefixes Mod.LoadSettings.
In 5707 ModLibrary.PrepareAll called RegisterTo, PrepareSystems, LoadSettings in that order
for each mod; 5801 calls RegisterTo, LoadSettings. So the callback fires at the same moment it
always did, on both builds.

[StarMapAllModsLoaded] never runs. 5801 gave ModLibrary.LoadAll an optional parameter, and
the postfix passed the patched method's arguments on to a callback that takes none, so every call
threw TargetParameterCountException. It is now invoked with no arguments, which is its documented
signature.

A missing hook target no longer takes the loader down. PatchManager's register methods take a
nullable target; a null logs a warning naming the mod and returns a patch that does nothing, so the
next KSA rename costs one callback rather than the game. This answers the second question in #113.

ConfirmRestart against 5801. NativeList<T>.Ptr became an extension property in
Brutal.Collections (FixedListExtensions). With that namespace imported the same line compiles on
both builds. A StarMap built against 5707 still calls the old member, so this half only takes
effect once the reference package is 5801.

Tested

  • Builds against the 5707 and the 5801 assemblies (Debug configuration, both sets in Import/).
  • Run on KSA 2026.11.10.5801 (Windows) with this build in place of 0.5.2's StarMap.dll, StarMap.Core.dll
    and StarMap.API.dll, mods Core, ModMenu, KSArmory and FastAndPurrious: the game starts (0.5.2 exits
    with the trace in [StarMapImmediateLoad] cannot register on KSA 2026.11.10.5801, which removed Mod.PrepareSystems #113), KSArmory's [StarMapImmediateLoad] and [StarMapAllModsLoaded] callbacks
    both run, and its scripted engagement passes.
  • Not exercised: the missing-target warning (nothing hooked is missing any more) and the restart popup.

ImmediateLoad prefixes Mod.LoadSettings, which follows registration in 5707 and 5801 alike now that PrepareSystems is gone; AllModsLoaded callbacks are invoked with no arguments whatever LoadAll takes; a null patch target logs a warning and registers nothing instead of stopping the loader; ConfirmRestart imports Brutal.Collections so NativeList.Ptr resolves on both builds.
@github-actions
github-actions Bot changed the base branch from main to feature/external/pr-114-fix-ksa-5801-hooks November 8, 2026 13:10
@KlaasWhite
KlaasWhite merged commit 02b3a59 into StarMapLoader:feature/external/pr-114-fix-ksa-5801-hooks Nov 8, 2026
3 checks passed
LaurensDeV added a commit to LaurensDeV/KSArmory that referenced this pull request Nov 8, 2026
StarMap 0.5.2 threw at startup on 2026.11.10.5801 and never called a mod's all-mods-loaded hook;
0.5.3 carries the fix (StarMapLoader/StarMap#114). Flown on 0.5.3 as released: head-on passes,
and both of KSArmory's load hooks run. The compile reference moves to StarMap.API 0.5.3, whose
Harmony is byte for byte the 2.4.3 already referenced.
github-actions Bot pushed a commit to LaurensDeV/KSArmory that referenced this pull request Nov 8, 2026
## [0.10.1](v0.10.0...v0.10.1) (2026-11-08)

### Features

* **clouds:** shade a nuclear cloud's folds and its shadow on the ground ([252949a](252949a))
* **damage:** armour plates, judged by Lambert's ballistic limit ([f90df10](f90df10))
* **damage:** hits a tank's wall stops still wear it down ([88ab270](88ab270))
* **damage:** ram tanks behind others, the exit wall, fragments and duds ([77ce38f](77ce38f))
* **damage:** split a full tank by the liquid a round drives through it ([5ad1362](5ad1362))
* **damage:** tank walls stop hits, and holed gas tanks burst ([80b6793](80b6793))
* **tools:** show a moved craft where it will land ([a74e09f](a74e09f))
* **ui:** reopen the panel from StarMap's Mods menu, not a button ([e34042d](e34042d))

### Fixes

* **damage:** an inert dart's hole is little wider than the dart ([3eee4f7](3eee4f7))
* **damage:** judge a dart against a tank wall with holes switched off ([466a804](466a804))
* **damage:** take 2014 aluminium's crack length for every tank wall ([462c84c](462c84c))
* **damage:** take thin sheet's fracture toughness for a tank's wall ([856d488](856d488))
* **effects:** put Core's close crack back under a nuclear bang ([97a6a25](97a6a25))
* **leaks:** leak through a hole anywhere on a tank's skin ([3c9aed1](3c9aed1))
* **leaks:** send a tank's stream out square to the skin ([605e7b8](605e7b8))

### Performance

* **damage:** read each tank's wall once, not on every hit ([050db86](050db86))

### Build and packaging

* **deps:** require StarMap 0.5.3, the first that starts KSA 5801 ([980d814](980d814)), closes [StarMapLoader/StarMap#114](StarMapLoader/StarMap#114)
* **ksa:** retarget 2026.11.10.5801 ([62c6c64](62c6c64))
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

2 participants