Oxidizer is a mod loader for Kitten Space Agency, written in Rust. It loads code mods written in Rust and mods written as Rhai scripts, so you can mod the game without writing any C#. It runs on its own or as a StarMap mod, next to your C# mods.
What mods can do

Install
Download from GitHub Releases. Both zips work on Windows and Linux, and both are in the content index, so Borea can install them for you.
Using StarMap: unzip
Without StarMap:
To uninstall, delete the Oxidizer (or Oxidizer.StarMap) folder. The game runs unmodded again with no further cleanup.
Writing a mod
A mod is a folder in
Rhai: no compiling, just a text file. Save it while the game runs and the new code takes over.
Rust: make a
Keep your Rust library in a
Good to know
What mods can do
- Run code every frame
- Draw their own ImGui windows, using the game's own ImGui
- Read and change game objects (vehicles, sim time, warp speed, …)
- Patch game methods before or after they run, skip the original, or change what it returns
- React to hotkeys and keep their own settings
- Add entries to the game's Mods menu
- Reload Rhai scripts while the game runs

Install
Download from GitHub Releases. Both zips work on Windows and Linux, and both are in the content index, so Borea can install them for you.
Using StarMap: unzip
Oxidizer.StarMap-X.Y.Z.zip into Documents/My Games/Kitten Space Agency/mods/ and start the game through StarMap as usual.Without StarMap:
- Unzip
Oxidizer-X.Y.Z.zipanywhere. - Run
oxidizer.exe(Linux:./oxidizer) instead of the game. If KSA isn't in the default folder, setgame_pathin theoxidizer.tomlit creates next to it.
Documents/My Games/Kitten Space Agency/mods/. The standalone zip includes two example mods in example-mods/ to try. In game, Mods > Oxidizer shows your loaded mods, any errors and the log.To uninstall, delete the Oxidizer (or Oxidizer.StarMap) folder. The game runs unmodded again with no further cleanup.
Writing a mod
A mod is a folder in
mods/ whose mod.toml has an [oxidizer] section:
Code
name = "my_mod"
[oxidizer]
script = "main.rhai" # Rhai mod
# dll = "bin/my_mod" # Rust mod: keep the library in bin/
Code
fn gui(dt) {
if begin("My mod") {
let v = static_get("KSA.Program, KSA", "ControlledVehicle");
text(`vehicle: ${v.get("Id")}`);
if button("Warp x10") {
static_call("KSA.Universe, KSA", "SetSimulationSpeed", [10.0, true]);
}
}
end();
}
cdylib crate and cargo add oxidizer_api (crates.io, docs). Run oxidizer --bindgen src/ksa.rs once to get typed bindings for the whole game, with autocomplete and compile-time checks:
Code
mod ksa;
use ksa::ksa::{Program, Universe};
use oxidizer_api::{Mod, imgui};
struct MyMod;
impl Mod for MyMod {
fn init() -> Self { MyMod }
fn gui(&mut self, _dt: f64) {
if imgui::begin("My mod") {
let v = Program::controlled_vehicle();
imgui::text(&format!("{} at {:.0} s", v.id(), Universe::get_elapsed_seconds()));
}
imgui::end();
}
}
oxidizer_api::oxidizer_mod!(MyMod);
bin/ folder: StarMap tries to load mods/<id>/<id>.dll as a C# mod. The README has the full API, the list of Rhai functions, and how to list your mod in the content index.Good to know
- Windows, Linux and macOS (Apple Silicon, as a StarMap mod with beik's macOS port).
- Works on its own or as a StarMap mod next to C# mods.
- Still early (0.5.0), so the API may still change. A mod built for an older API version is skipped with a message telling you to rebuild it, not crashed.
- Harmony by Andreas Pardeike (MIT), used for patching game methods
- Rhai (MIT or Apache-2.0), the scripting language
- libloading (ISC) and toml (MIT or Apache-2.0)
- Thanks to Klaas (StarMap) and Maxi (content index) for their help
- Source and downloads: https://github.com/SafeShows/Oxidizer
- Bug reports: https://github.com/SafeShows/Oxidizer/issues
- Rust API: https://crates.io/crates/oxidizer_api
Last edited:
