Under the Hood

Mod Build & Setup

A C# add-on targeting .NET 4.7.2, running inside Kerbal Space Program. This page is for building it rather than using it.

Building

Terminal
cd "KSP Mod Side"
./build.sh

# Build only, without deploying:
cd "KSP Mod Side/GeneKerman"
dotnet build -c Release

The build script compiles the assembly, copies it into the GameData folder, and deploys to the local development installs. Managed assemblies are referenced from KSP_Data/Managed.

Two names, do not conflate them

The source project and the assembly are called GeneKerman. The GameData folder it installs into is called BoundlessMissions. That is intentional, and the settings node keeps the source name too, so renaming either one to match the other breaks things quietly.

Build channels

The default channel produces a clean assembly with the in-game debug test panel compiled out entirely. A development channel includes it, for running the live security tests from inside the game.

A development build must never be published: it carries test-only code, and its hash differs, so the server’s version gate would reject it anyway. Packaging a release on a non-production channel is refused by the script rather than merely discouraged.

The pieces

GeneKermanMod.cs

the singleton

Loaded at the main menu and persisting across every scene. Runs the unlinked, linking, linked state machine and holds the API client and the interface.
ApiClient.cs

all HTTP

Every request to the server, through Unity's own web request type with coroutine callbacks, which is the only practical HTTP client in KSP's Mono runtime. Also owns the settings file and the session token.
Consent.cs

the gate

The privacy opt-in everything else waits on. Blocks all transmission until accepted, and re-reads its file when it changes on disk.
ClientState.cs

shared state

Profile, missions, contracts and the notification feed, plus the fetch, the local notification merge, de-duplication, the unread count and the action coroutines. Exposed by reference rather than copied, because a second copy drifts the moment either side gains a mutation.
VesselDataCollector.cs

telemetry

Reads situation, body, resources and crew off the active vessel for submission verification.
UI/Gui/

the sidebar

A retained-mode canvas UI with its own design tokens, procedurally drawn sprites and a fluent builder, since there is no Unity editor in this workflow.
UI/

the gates

The screens drawn in immediate mode rather than on the canvas: consent, the update gate, the suspension notice, device verification and the link screen. Each of them draws at a moment when the canvas may not.
LifeSupport/

reflection only

One adapter per optional life support mod over a shared base, plus the registry, the endurance scan and the freeze. The build references none of them.

A note on the Python files in the source tree

There are a handful of .py files sitting beside the C#. They are one-off patching scripts and are not part of the build. The interface is entirely C#.

Optional mod integrations

No other mod is referenced at build time. Each is detected at runtime and reached through reflection where it has an API worth reaching, so every integration degrades to doing nothing when the mod is absent and to doing nothing harmful when it is present in a version the add-on does not recognise. That covers TweakScale, Textures Unlimited, RealFuels, ConformalDecals, Janitor’s Closet, CKAN, Deferred and all five life support mods. The details of what each one carries are on Sharing Craft and Life Support.