Skip to content

Added Instancing support through CLAs and ENV. - #80

Merged
KlaasWhite merged 1 commit into
StarMapLoader:feature/external/pr-80-devfrom
MrJeranimo:dev
Aug 2, 2026
Merged

Added Instancing support through CLAs and ENV.#80
KlaasWhite merged 1 commit into
StarMapLoader:feature/external/pr-80-devfrom
MrJeranimo:dev

Conversation

@MrJeranimo

@MrJeranimo MrJeranimo commented Jul 30, 2026

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 relevant use cases that involve 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.

!!DISCLAIMER!! - if you provide an illegal or non-existing path for instancing when launching StarMap, StarMap and KSA will both crash as there are no checks for if the path exists. This is an intended behavior as the program or user who is creating an instance should have the instance's directory made before launching.

@github-actions
github-actions Bot changed the base branch from dev to feature/external/pr-80-dev July 30, 2026 22:07
@MrJeranimo

Copy link
Copy Markdown
Contributor Author

If the instance path you provide is valid, meaning C:\Users\<user>\OneDrive\Documents\My Games\Instance A or similar exists when starting StarMap and set as the Instance Path, is empty when launching StarMap, KSA will create all the relevant missing files and directories in the Instance Folder.

KSA will create the missing manifest.toml, \mods, settings.toml, \saves, \vehicles, \logs, \crashdumps, \HUDLayouts, etc.

@KlaasWhite
KlaasWhite merged commit bdf7bdd into StarMapLoader:feature/external/pr-80-dev Aug 2, 2026
1 check passed
KlaasWhite added a commit that referenced this pull request Aug 2, 2026
* Added Instancing support through CLAs and ENV. (#80)

* minor changes

---------

Co-authored-by: MrJeranimo <147461811+MrJeranimo@users.noreply.github.com>
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