From 3e02cf8092da6caf2f7d610720265b846d7c6cc2 Mon Sep 17 00:00:00 2001 From: KlaasWhite <45828001+KlaasWhite@users.noreply.github.com> Date: Sat, 15 Nov 2025 19:47:50 +0100 Subject: [PATCH 1/4] Fix package release --- .github/workflows/release-zip.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-zip.yml b/.github/workflows/release-zip.yml index 46b6c20..f4cc563 100644 --- a/.github/workflows/release-zip.yml +++ b/.github/workflows/release-zip.yml @@ -141,5 +141,4 @@ jobs: /p:Version=${{ steps.version.outputs.new }} \ /p:AssemblyVersion=${{ steps.version.outputs.new }} \ /p:FileVersion=${{ steps.version.outputs.new }} - dotnet nuget add source --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text --name github "${{ env.NUGET_SOURCE }}" dotnet nuget push ./nupkg/*.nupkg --source github --api-key "${{ secrets.GITHUB_TOKEN }}" --skip-duplicate From c3786526c592f4aecdc35326a9d28eed23a8c50b Mon Sep 17 00:00:00 2001 From: averageksp <158779203+averageksp@users.noreply.github.com> Date: Sat, 15 Nov 2025 20:37:45 +0100 Subject: [PATCH 2/4] No need to point to KSA .dll --- StarMap.Types/LoaderConfig.cs | 36 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/StarMap.Types/LoaderConfig.cs b/StarMap.Types/LoaderConfig.cs index 370b273..1dadd1f 100644 --- a/StarMap.Types/LoaderConfig.cs +++ b/StarMap.Types/LoaderConfig.cs @@ -13,27 +13,39 @@ public class LoaderConfig public bool TryLoadConfig() { - if (!File.Exists("./StarMapConfig.json")) { + if (!File.Exists("./StarMapConfig.json")) + { Console.WriteLine("Please fill the StarMapConfig.json and restart the program"); - File.Create("./StarMapConfig.json").Dispose(); - File.WriteAllText("./StarMapConfig.json", JsonSerializer.Serialize(new LoaderConfig())); - Console.ReadLine(); + File.WriteAllText("./StarMapConfig.json", JsonSerializer.Serialize(new LoaderConfig(), new JsonSerializerOptions { WriteIndented = true })); return false; } - + var jsonString = File.ReadAllText("./StarMapConfig.json"); var config = JsonSerializer.Deserialize(jsonString); - + if (config is null) return false; - - if (string.IsNullOrEmpty(config.GameLocation) || !File.Exists(config.GameLocation)) + + if (string.IsNullOrEmpty(config.GameLocation)) { - Console.WriteLine("The 'GameLocation' property in StarMapConfig.json is either empty or points to a non-existing file."); - Console.ReadLine(); + Console.WriteLine("The 'GameLocation' property is empty."); return false; } - - GameLocation = config.GameLocation; + + string path = config.GameLocation; + + if (Directory.Exists(path)) + { + path = Path.Combine(path, "KSA.dll"); + } + + if (!File.Exists(path)) + { + Console.WriteLine("Could not find KSA.dll. Make sure the folder or file path is correct:"); + Console.WriteLine(path); + return false; + } + + GameLocation = path; return true; } From b847c8c0ffd6d8536e23c837d3f845c53b588260 Mon Sep 17 00:00:00 2001 From: averageksp <158779203+averageksp@users.noreply.github.com> Date: Sat, 15 Nov 2025 20:38:24 +0100 Subject: [PATCH 3/4] Improve error message for empty GameLocation --- StarMap.Types/LoaderConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StarMap.Types/LoaderConfig.cs b/StarMap.Types/LoaderConfig.cs index 1dadd1f..f7646b6 100644 --- a/StarMap.Types/LoaderConfig.cs +++ b/StarMap.Types/LoaderConfig.cs @@ -27,7 +27,7 @@ public bool TryLoadConfig() if (string.IsNullOrEmpty(config.GameLocation)) { - Console.WriteLine("The 'GameLocation' property is empty."); + Console.WriteLine("The 'GameLocation' property in StarMapConfig.json is either empty or points to a non-existing file."); return false; } From f6b3e27651deb1c369bd3513b425e3fbaa0aca26 Mon Sep 17 00:00:00 2001 From: averageksp <158779203+averageksp@users.noreply.github.com> Date: Sat, 15 Nov 2025 20:48:59 +0100 Subject: [PATCH 4/4] Clarify GameLocation path in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76885dc..ac40813 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It makes use of Assembly Load Contexts to ensure mod dependencies are managed se - Download and unzip release from [Releases](https://github.com/StarMapLoader/StarMap/releases/latest). - Run StarMap.exe, this will fail and create a StarMapConfig.json. - Open StarMapConfig.json and set the location of your KSA installation. - - `GameLocation` should be set to the location of your KSA.dll, pointing directly to that file (e.g. `C:\\games\\Kitten Space Agency\\KSA.dll`) + - `GameLocation` should be set to the location where Kitten Space Agency was installed, pointing directly to that folder (e.g. `C:\\games\\Kitten Space Agency\\`) - `RepositoryLocation` can be kept empty - Run StarMap.exe again, this should launch KSA and load your mods.