Skip to content

Added Instancing Support to StarMap using CLA and/or Environment Variables - #79

Closed
MrJeranimo wants to merge 27 commits into
StarMapLoader:feature/external/pr-79-mainfrom
MrJeranimo:main
Closed

Added Instancing Support to StarMap using CLA and/or Environment Variables#79
MrJeranimo wants to merge 27 commits into
StarMapLoader:feature/external/pr-79-mainfrom
MrJeranimo:main

Conversation

@MrJeranimo

Copy link
Copy Markdown
Contributor

Added the ability to switch which directory StarMap looks at for the manifest and mod loading. Also redirects KSA to the new instance folder.

You can now select which folder you want StarMap and KSA to look at for things like manifest.toml, \mods, settings.toml, \saves, \vehicles, \logs, \crashdumps, \HUDLayouts, etc.

This can be done either by using a Command Line Argument -> .\StarMap.exe -InstancePath C:\users\<user>\OneDrive\Documents\My Games\Instance A and StarMap, KSA, and all mods (as long as the mods use Constants.DocumentFolderPath or other variables/functions that derive from that) will now read/write to the new instance folder.

The other option is be setting the file path you want in an Environment Variable when launching StarMap. -> $env:INSTANCE_PATH = "C:\Users\<user>\OneDrive\Documents\My Games\Instance A"; .\StarMap.exe (this is for power shell).

This modification is done through a Harmony Patch of the Constants.DocumentsFolderPath getter which flows down to all relavent use cases that invole the Documents\My Games\Kitten Space Agency\ folder, and only provides the newly given path if it exists, otherwise it falls back to KSA's default getter.

KlaasWhite and others added 27 commits November 15, 2025 19:43
Mods can implement the IStarMapOnUi to access OnBeforeUi and OnAfterUi which are called before and after the OnDrawUi of Program in KSA, this can be used to add or overwrite ui elements using ImGui
Only publish API when there is a change
Switch interface to use attributes instead of interfaces
Resolve issue in attribute resolution
Fixed issue with StarMap.API forcing dummy KSA dll
StarMapBeforeMainAttribute attribute + Fix issue with ALCs unloading after initialization
Change actions to publish StarMap.API to nuget instead of github
Make the AssemblyLoadContexts not collectable (StarMapLoader#42)
Do not try to unload the assembly load contexts (StarMapLoader#44)
Add StarMap hook for after onFrame
Feature/external/pr 65 fix local mods folder dev (StarMapLoader#69)
Fix OnDrawUi harmony patch for KSA 2026.4.6.4036 (StarMapLoader#71)
Add config option for game CLI arguments
…manifest and mod loading. Also redirects KSA to the new instance folder.
@github-actions
github-actions Bot changed the base branch from dev to feature/external/pr-79-main July 26, 2026 01:10
@MrJeranimo

Copy link
Copy Markdown
Contributor Author

This is the stale version of my pull request that was made on the main branch, not dev.

@MrJeranimo MrJeranimo closed this Jul 30, 2026
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.

2 participants