Rhai Studio is an in-game editor for Oxidizer's Rhai mods. Open a mod's script, change it, press Ctrl+S, and the mod reloads within a second while you keep flying. No compiler, no restarting the game.
Features
- Editor with syntax colors: keywords, strings, numbers, comments, calls and
ksa::game modules each get their own color, with line numbers. Undo, select all, copy and paste work as usual. - Hot reload: SAVE (or Ctrl+S) writes the file and Oxidizer reloads the mod right away. Files changed in another editor show up in the open tab too.
- New mod wizard: type a name and press CREATE. Rhai Studio makes the mod folder with a starter script that opens a window, and it starts running at once.
- Errors where you need them: a mod that fails to load or stops on an error shows it in red above the editor, with the line number.
- Live console: a drawer that slides up from the CONSOLE button, with the log as it comes in and a line that runs Rhai against your current game, e.g.
ksa::Program::controlled_vehicle().id. - Looks like the game: styled after the game's own dialogs.
Requirements
Oxidizer 0.7.0 or later, as the StarMap mod (
Oxidizer.StarMap) or standalone. Windows, Linux and macOS (Apple Silicon, with the macOS port).Install
It's on the content index (https://ksamods.gg/mods/rhai_studio), so a mod manager like Borea installs it with standalone Oxidizer. By hand:
- Install Oxidizer 0.7.0 or later: see its install steps.
- Download
rhai_studio-1.0.0.zipand unzip it intoDocuments/My Games/Kitten Space Agency/mods/, so there's amods/rhai_studio/folder. - Start the game, enable the mod when it asks, and press F9.
Download: https://github.com/SafeShows/oxidizer-rhai-studio/releases/tag/v1.0.0
New to Rhai mods?
Make a mod with the wizard and edit its starter script. What scripts can do (the game as typed modules, ImGui windows, hotkeys, settings, patching game methods) is in Oxidizer's Rhai section.
Source code
https://github.com/SafeShows/oxidizer-rhai-studio
It's a Rust mod and a full example of the Oxidizer API: text fields and tabs, the colored editor drawn over the game's text box, reading the log, and running Rhai from Rust.
License
MIT No Attribution (MIT-0). Use, change and redistribute it freely, no credit required.
Attribution
Built with Oxidizer and its oxidizer_api crate (MIT), plus the toml (MIT/Apache-2.0) and libloading (ISC) crates. Their license texts ship in the zip as
THIRD-PARTY-NOTICES.txt.