Skip to content

A simple KSA mod that adds a "Mods" tab to the Menu Bar at the top of the game.

License

Notifications You must be signed in to change notification settings

MrJeranimo/ModMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModMenu

A modding framework for Kitten Space Agency that allows mods to easily add menu entries.

Example Mod

To see ModMenu in action, it is recommended to install ModMenu.ExampleMod and put that mod in your KSA Content folder.

For developers it is also recommended to see how ModMenu.ExampleMod uses the ModMenu.

For Mod Developers

Installation

Add the NuGet package to your mod project in Visual Studio, go to Manage NuGet Packages ->

Screenshot 2025-12-09 231613

Click on the settings icon ->

Screenshot 2025-12-09 231345

Click Add ->

image

Put in a name you want and for the source put in this URL: https://nuget.pkg.github.com/MrJeranimo/index.json. Then Click 'Save' ->

image

You'll see the new Source. Go to back to the Manage NuGet Packages page ->

Screenshot 2025-12-09 232144

Change the source to the new ModMenu source you added or All ->

Screenshot 2025-12-09 232306

If you do the new source, it should be the only one.

If you do All you must search for ModMenu.Attributes

image

Once installed add the using ModMenu; to your Mod and add the [ModMenuEntry("Mod Name")] tag to which ever function you want to be called by ModMenu. If you add any ImGui code in the function, it will be drawn inside a submenu that is labeled with the "Mod Name" you put in the tag.

Usage

using ModMenu;

public class MyMod
{
    [ModMenuEntry("My Mod Name")]
    public static void DrawMenu()
    {
        ImGui.Text("Hello World!");
    }
}

Building

!!!WARNING!!!

You MUST include the ModMenu.Attributes.dll file in your Mod folder otherwise the mod WILL CRASH on startup. You can either download the ModMenu.Attributes.dll in the releases, or if the ModMenu.Attributes.dll is not showing up when building add

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> to your .csproj file.

Example:

<PropertyGroup>
  <TargetFramework>net9.0</TargetFramework>
  <ImplicitUsings>enable</ImplicitUsings>
  <Nullable>enable</Nullable>
 <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Note that this will copy all of your NuGet Packages .dlls into the build folder. I currently do not know a better way to do this.

Once you have the built files, put your Mod's .dll and the ModMenu.Attributes.dll into your Mod's folder. Then make sure you have ModMenu installed and put in your KSA/Content folder and you can launch StarMap and see the Submenu for your mod.

For Players

  1. Download ModMenu.zip from Releases
  2. Extract it to Kitten Space Agency/Content/
  3. Add to the manifest.toml in Documents/My Games/Kitten Space Agency/ for Windows.
[[mods]]
id = "ModMenu"
enabled = true
  1. Launch the game via StarMap

Any installed mods using ModMenu will automatically appear in the "Mods" menu.

Repository Structure

  • /ModMenu.Attributes/ - NuGet package with the [ModMenuEntry] attribute
  • /ModMenu/ - Main mod DLL (or wherever your main mod code is)

License

MIT

About

A simple KSA mod that adds a "Mods" tab to the Menu Bar at the top of the game.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages