• ⚠️ Mod Release Rules now apply to this board.

    All mods must include a license, source code (for executable mods), and proper attribution.

    Read the full rules here before posting.

User Interface Custom Start Page Tools

MrJeranimo

Member
Messages
19
Reaction score
26
Custom Start Page Tools
[Currently Broken]


This mod replaces the original KSA start screen with a custom start page to provide a better starting experience.

This includes, checking and updating your Mod Manifest from the start screen, loading a Save from the start screen, Seeing a Save's info when selected, Warnings for mismatches when loading a save, and more to come.

This mod also replaces the in-game Save/Load window with a custom one that is similar to the one on the start screen. It provides extra warnings about if the Save you are about to load has a different Celestial System and/or different Game Type than what is currently loaded.

License: GNU General Public License v3

Source Code: GitHub

SpaceDock: Custom Start Page Tools

Required Mod Loader: StarMap

Installation

If you install the Release, extract the `Custom Start Page Tools.zip` to `Documents\My Games\Kitten Space Agency\mods` and make sure to add

Code
[[mods]]
id="Custom Start Page Tools"
enabled=true

to `\Documents\My Games\Kitten Space Agency\manifest.toml`.

Adding to the SaveInfoWindow

There is a function called `DrawModHook()` in the `StartStagePatch` class in this mod that is intended to allow for other mods to add their own Save Info into the prebuilt window. Just use a Harmony Patch to get the `SelectedSave` from `StartStagePatch` and to patch into the method.
 

Attachments

Last edited:
So, I tried this mod so that I can start with my own save file. Unfortunately it crashes KSA when clicking on the save file name in "Load A Save" or in game custom "LOAD SAVE" screen with exception thrown:

ERROR Unhandled exception System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeLoadException: Could not load type 'KSA.SimTime' from assembly 'KSA, Version=2026.9.10.5438, Culture=neutral, PublicKeyToken=null'.
at MonoMod.Core.Interop.CoreCLR.V60.InvokeCompileMethod(IntPtr functionPtr, IntPtr thisPtr, IntPtr corJitInfo, CORINFO_METHOD_INFO* methodInfo, UInt32 flags, Byte** nativeEntry, UInt32* nativeSizeOfCode)
at MonoMod.Core.Platforms.Runtimes.Core60Runtime.JitHookDelegateHolder.CompileMethodHook(IntPtr jit, IntPtr corJitInfo, CORINFO_METHOD_INFO* methodInfo, UInt32 flags, Byte** nativeEntry, UInt32* nativeSizeOfCode)
at Custom_Start_Page_Tools.SavesMenuUi.DrawSaveInfoBox()
at Custom_Start_Page_Tools.SavesMenuUi.DrawSaveInfoBox()
at Custom_Start_Page_Tools.SavesMenuUi.Draw()
at Custom_Start_Page_Tools.StartPagePatch.DrawSingleplayerMenu()
at Custom_Start_Page_Tools.StartPagePatch.ConfigStartPopupPatch(ConfigOnStartPopup __instance)
at KSA.ConfigOnStartPopup.OnDrawUi_Patch1(ConfigOnStartPopup this)
at KSA.Popup.DrawAll()
at KSA.SelectSystem.DrawUi()
at KSA.SelectSystem.OnFrame()
at KSA.Program..ctor(IReadOnlyList`1 inArgs)
at KSA.Program.Main_Patch1(String[] inArgs)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at StarMap.GameSurveyer.RunGame()
at StarMap.Program.Main(String[] args)
at StarMap.Program.<Main>(String[] args).

Thus with this mod I cannot save or load any save files.
 
Last edited:
So, I tried this mod so that I can start with my own save file. Unfortunately it crashes KSA when clicking on the save file name in "Load A Save" or in game custom "LOAD SAVE" screen with exception thrown:

ERROR Unhandled exception System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeLoadException: Could not load type 'KSA.SimTime' from assembly 'KSA, Version=2026.9.10.5438, Culture=neutral, PublicKeyToken=null'.
at MonoMod.Core.Interop.CoreCLR.V60.InvokeCompileMethod(IntPtr functionPtr, IntPtr thisPtr, IntPtr corJitInfo, CORINFO_METHOD_INFO* methodInfo, UInt32 flags, Byte** nativeEntry, UInt32* nativeSizeOfCode)
at MonoMod.Core.Platforms.Runtimes.Core60Runtime.JitHookDelegateHolder.CompileMethodHook(IntPtr jit, IntPtr corJitInfo, CORINFO_METHOD_INFO* methodInfo, UInt32 flags, Byte** nativeEntry, UInt32* nativeSizeOfCode)
at Custom_Start_Page_Tools.SavesMenuUi.DrawSaveInfoBox()
at Custom_Start_Page_Tools.SavesMenuUi.DrawSaveInfoBox()
at Custom_Start_Page_Tools.SavesMenuUi.Draw()
at Custom_Start_Page_Tools.StartPagePatch.DrawSingleplayerMenu()
at Custom_Start_Page_Tools.StartPagePatch.ConfigStartPopupPatch(ConfigOnStartPopup __instance)
at KSA.ConfigOnStartPopup.OnDrawUi_Patch1(ConfigOnStartPopup this)
at KSA.Popup.DrawAll()
at KSA.SelectSystem.DrawUi()
at KSA.SelectSystem.OnFrame()
at KSA.Program..ctor(IReadOnlyList`1 inArgs)
at KSA.Program.Main_Patch1(String[] inArgs)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at StarMap.GameSurveyer.RunGame()
at StarMap.Program.Main(String[] args)
at StarMap.Program.<Main>(String[] args).

Thus with this mod I cannot save or load any save files.
Unfortunately, this is because KSA updates have broken the mod and I haven't had time to update it. I will mark the mod as [Currently Broken] for now. Sorry about that.
 
Thank you for response. Yeah, I kind of got a feel that game is too young for serious mod development. Developers, are still make dramatic changes, making it hard to keep mods from breaking. I downloaded 4 mods and every single one of them was broken.

Still, I am very impressed with KSA. It is already better than KSP 1 or 2 in many aspects (like loading time is completely non-existing.)
 
Back
Top