Repository navigation
Releases
Releases · SafeShows/Oxidizer
Oxidizer v0.11.0
Added
- Mods > Oxidizer > Performance: what each mod costs per frame, on average and in the worst frame of the last second: its callbacks, hooks, events and services, Rust and Rhai alike. Time is counted once: when a mod calls a game method another mod hooks, the hook's time is the other mod's.
- Breakpoints for Rhai mods:
debug_breakpoints(source, lines),debug_state()anddebug_continue(mod), which Rhai Studio 1.2 uses. A mod that reaches a breakpoint leaves a snapshot of its variables,thisand call stack, finishes that call, and pauses (no frame, windows, menu entries, events or hooks) until it is continued or the breakpoint is removed. The game keeps running.
Changed
- Rhai scripts are named
mod/file.rhai(their source), which some error messages now include.
Oxidizer v0.10.0
Added
- Hot reload for Rust mods: rebuild a mod and copy its library into the mod folder while the game runs, and within about a second Oxidizer runs its
unload, removes its hooks, event subscriptions and services, and starts the new build (init, thenloadedif the game has loaded). If the new build can't load, the running one stays. Works with mods built with anyoxidizer_apiversion.
Changed
- Rust mods run from a copy of their library in
<documents>/oxidizer/loaded/, so the file in the mod folder isn't locked while the game runs.
Oxidizer v0.9.1
Fixed
- The Rhai definition files for editors now give Oxidizer's own functions their parameter names, return types and a line of docs (
fn subscribe(topic: string, function: string) -> ()instead offn subscribe(_: string, _: string) -> EvalAltResult>>). Editors and Rhai Studio's autocomplete show them. The files are rewritten on the next start.
Oxidizer v0.9.0
Added
- Events and services between mods, Rust and Rhai alike. Events:
publish,publish_retained(kept as the topic's current value for later subscribers) andsubscribe, delivered at the start of the next frame. Services:provideandcall_service/call, which return a value. Names start with the owning mod's id, and only that mod publishes on or provides them. Values are JSON: maps in Rhai, serde types in Rust (EventandServicetraits). Mods > Oxidizer has an Event bus section. Examples:bus_rustandbus_rhai. oxidizer_api0.6.0 (API version 5): the bus and services. Each Rust mod gets its own API table, which carries its id. Mods built with older versions keep working.
Oxidizer v0.8.0
Added
loaded(): a callback once the game has loaded its content and mods (afterKSA.ModLibrary.LoadAll, the moment of StarMap'sAllModsLoaded), for Rhai (fn loaded()) and Rust (Mod::loaded,oxidizer_api0.5, API version 4).initstays where it was, before the game'sMain. A Rhai mod that starts later getsloaded()right afterinit().- More ImGui for Rhai:
text_colored,input_text,input_multiline,input_float, tabs (begin_tab_bar,begin_tab),begin_child,set_next_window_sizeandctrl_shortcut. - Dependencies and load order between mods, in
mod.toml's[oxidizer]section:dependencies(each optional or required, with optionalmin/maxversions),load_after, and the mod's ownversion. Mods start in dependency order, Rust and Rhai mods in one order; a mod whose dependencies aren't met doesn't start and Mods > Oxidizer says why. Rhai mods waiting for a dependency start as soon as it's there. oxidizer --bindgen <file>.jsonwrites the game's API as data: every type and member with its C# signature, its Rust binding and its Rhai form. The modding guide's Game API page is built from it.
Oxidizer v0.7.0
Added
- Script mods that appear in the mods folder while the game runs start within a second, without a restart (for example one made by an in-game editor).
oxidizer_api0.4.0 (API version 3): read Oxidizer's log (log_lines,log_next) and mod states (mod_statuses), run Rhai code against the live game (rhai_eval, a console whose variables persist),mods_dir; ImGui text fields (input_text,input_text_multilinewithTextBuffer), tabs andctrl_shortcut. Mods built with it need this Oxidizer or later; older mods keep working.
Changed
- The Rhai engine is built when it is first needed, so a game without Rhai mods doesn't spend the startup time on it.
Oxidizer v0.6.3
Changed
- Rhai editor definitions now carry types for instance members too (
fn get_surface_speed(obj: Obj) -> float), with the game types that have each member in its description. A member that game types define differently keeps?. Types are named as scripts see them:int,float,bool,String, or the game type. - The definitions are rewritten when Oxidizer updates too, not only when the game does.
Oxidizer v0.6.2
Fixed
- Rhai: calling a game method by name is now
obj.invoke(method[, args]). The documentedobj.call(...)never worked, because Rhai keepsx.call(...)for function pointers ("Data type incorrect: string (expecting Fn)"). - Rhai: a method call on a game property (
vehicle.parent.get("MeanRadius")) no longer logs "Property set method not found". Rhai writes such properties back afterwards; an unchanged value is no longer written.
Oxidizer v0.6.1
Added
- Standalone Oxidizer on macOS:
oxidizer-macosfinds the macOS port's app in~/Applications(or/Applications) and restarts itself with the environment the port's launcher sets up (its .NET runtime, GLFW/KTX shims and Metal hooks), so it runs with no setup. Tested on an M3 Pro.
Oxidizer v0.6.0
Added
- Typed game access for Rhai, built from the installed game at startup:
ksa::Program::controlled_vehicle(),vehicle.id,vehicle.throttle = 0.5,ksa::Universe::set_simulation_speed(2.0, false), enum values likeksa::VehicleEngine::MainIgnite. Numbers, bools and strings come back as Rhai values. Takes about 0.4 s at startup for the whole game (about 32,000 functions). - Rhai definition files for editors, written to
<documents>/oxidizer/definitions/on each new game version, so editors with Rhai support can autocomplete the game and Oxidizer's functions. - Overloads can be named with their parameter types in
static_call,callandpatch:"SetSimulationSpeed(double, bool)". Without them, the overload whose parameter types match the arguments is picked, and errors list the overloads.
Changed
- Rhai scripts no longer block each other: a script calling a method that another script hooks now runs that hook (before, it was skipped). Only a script hooking a method it calls itself is still skipped while it runs.
- Patching finds private methods of base classes too.
- The bridge is built against
StarMap.API0.5.2 (compile-only, as before). Tested with StarMap 0.5.2: Oxidizer's Mods menu merges with StarMap 0.5's built-in one, so players see a single menu with both C# and Oxidizer entries.