From 8f33016cffdaf23ceed0c17946fb2c854c7f9cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ne=C3=9Flauer?= Date: Mon, 23 Feb 2026 11:51:18 +0100 Subject: [PATCH 1/2] Support local mods folder from KSA v2026.2.34.3656 RuntimeMod.TryCreateMod() now checks both Content/ and the local mods folder (Documents/My Games/Kitten Space Agency/mods/) when resolving mod directories, matching the game's own fallback behavior. Also removes unused path variables in ModLoader.PrepareMods() and updates the README mod location section. --- README.md | 7 ++++++- StarMap.Core/ModRepository/ModLoader.cs | 5 ----- StarMap.Core/ModRepository/RuntimeMod.cs | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f08e97..aec0447 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,12 @@ It makes use of Assembly Load Contexts to ensure mod dependencies are managed se ## Mod location -Mods should be installed in the contents folder in the KSA installation, StarMap makes use of the +Mods can be placed in either of these two locations: + +- `Documents/My Games/Kitten Space Agency/mods//` (recommended, persists across game updates) +- `/Content//` + +StarMap uses the game's manifest system to discover mods from both locations. ## Mod creation diff --git a/StarMap.Core/ModRepository/ModLoader.cs b/StarMap.Core/ModRepository/ModLoader.cs index c0a8754..5c8714d 100644 --- a/StarMap.Core/ModRepository/ModLoader.cs +++ b/StarMap.Core/ModRepository/ModLoader.cs @@ -56,9 +56,6 @@ private void PrepareMods() var mods = ModLibrary.Manifest.Mods; if (mods is null) return; - string rootPath = "Content"; - string path = Path.Combine(new ReadOnlySpan(in rootPath)); - foreach (var mod in mods) { if (!mod.Enabled) @@ -67,8 +64,6 @@ private void PrepareMods() continue; } - var modPath = Path.Combine(path, mod.Id); - if (!RuntimeMod.TryCreateMod(mod, _coreAssemblyLoadContext, out var runtimeMod)) continue; diff --git a/StarMap.Core/ModRepository/RuntimeMod.cs b/StarMap.Core/ModRepository/RuntimeMod.cs index 25bea2e..1cb09b8 100644 --- a/StarMap.Core/ModRepository/RuntimeMod.cs +++ b/StarMap.Core/ModRepository/RuntimeMod.cs @@ -38,7 +38,12 @@ public static bool TryCreateMod(ModEntry manifestEntry, AssemblyLoadContext core var modPath = Path.Combine(_rootContentPath, manifestEntry.Id); var modTomlPath = Path.Combine(modPath, "mod.toml"); - if (!File.Exists(modTomlPath)) return false; + if (!File.Exists(modTomlPath)) + { + modPath = Path.Combine(ModLibrary.LocalModsFolderPath, manifestEntry.Id); + modTomlPath = Path.Combine(modPath, "mod.toml"); + if (!File.Exists(modTomlPath)) return false; + } var tomlConfig = TomletMain.To(File.ReadAllText(modTomlPath)); if (tomlConfig?.StarMap is not StarMapConfig starMapConfig) { From 524be06ae0ebc303a371c795aa2e133fe8500db3 Mon Sep 17 00:00:00 2001 From: KlaasWhite Date: Sun, 1 Mar 2026 15:41:32 +0100 Subject: [PATCH 2/2] Update dummy --- StarMap.API/StarMap.API.csproj | 2 +- StarMap.Core/StarMap.Core.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/StarMap.API/StarMap.API.csproj b/StarMap.API/StarMap.API.csproj index 71d564e..8d55bad 100644 --- a/StarMap.API/StarMap.API.csproj +++ b/StarMap.API/StarMap.API.csproj @@ -18,7 +18,7 @@ - + compile; build; analyzers all diff --git a/StarMap.Core/StarMap.Core.csproj b/StarMap.Core/StarMap.Core.csproj index 53dc1d7..3859eda 100644 --- a/StarMap.Core/StarMap.Core.csproj +++ b/StarMap.Core/StarMap.Core.csproj @@ -23,7 +23,7 @@ - + runtime