Slang
Iterate faster. Stop writing assembly. Start writing code.
Slang (Stationeers Language) brings modern programming to Stationeers. It allows you to write scripts using a familiar C-style syntax (variables, functions, if/else, loops) directly in the in-game editor. When you hit confirm, Slang compiles your code into IC10 instantly.
NOTE: This project is in BETA. Expect updates and changes!
- In-Game Compilation: No external tools needed. Write Slang directly in the IC editor.
- No More Register Juggling: Define variables with let (e.g., let temp = 200c). The compiler manages r0-r15 for you.
- Control Flow: Write readable logic with if, else, while, loop, break, and continue.
- Functions: Create reusable code blocks with arguments.
- Smart Editor: Get real-time syntax highlighting and error checking (red text) as you type.
- Persistent Source: Your high-level Slang code is saved to the chip, so it’s there when you come back.
- Optimizations: Features like Constant Folding calculate math at compile time to save instructions.
- Device Aliasing: Simple mapping: device sensor = "d0".
- Temperature Literals: Don’t worry about converting Celsius to Kelvin anymore. Define your temperatures as whatever you want and append the proper suffix at the end (ex. 20c, 68f, 293.15k)
- Side-by-side IC10 output: Preview the compiled IC10 alongside the Slang source code. What you see is what you get.
- Compiler Optimizations: Slang now does its best to safely optimize the output IC10, removing labels, unnecessary moves, etc.
This is a StationeersLaunchPad Plugin Mod.
1. Install BepInEx (required).
2. Install StationeersLaunchPad.
3. Subscribe to Slang.
1. Open any IC10 housing or editor in-game.
2. Write your Slang code.
3. Press Confirm. The mod compiles your code to IC10 and loads it onto the chip.
- Stack Access: Direct stack memory access is disabled to prevent conflicts with the compiler’s internal memory management. A workaround is being planned.
- Documentation: In-game tooltips for syscalls (like load, set) are WIP. Check the "Slang" entry in the Stationpedia (F1) for help, or checkout The Docs[github.com] for guides on how to get started.
- Enhanced LSP features (Autocomplete, Go to Definition).
- Full feature parity with all IC10 instructions.
Q: What is the DLL extracted to my temp folder?
A: The Slang compiler is built in Rust for performance and reliability. It is compiled as a native library and bundled with the mod. It must be extracted temporarily to function within the game’s C# environment.
Q: Is this compatible with my current save?
A: Yes! Slang does not modify any existing IC10 code, it is only a compiler. As a matter of fact: if you wish to stop using Slang at any time, your compiled IC10 will still exist on the chip. However: Slang adds a comment at the bottom of your compiled IC10 which is a GZIP and base64 encoded version of your Slang source code. This might break line limits with Slang not installed. If you wish to no longer use Slang, I recommend you remove this comment from the source code after uninstalling Slang.
Q: Does this modify the in-game scripting language
A: No! Slang compiles directly to IC10. Any valid Slang file will produce valid IC10. The goal of this mod is twofold:
- Allow experienced users to quickly iterate on their scripts to get back into base upgrades faster
- Allow newcomers who already know C-style languages (JS/C#/Java/Rust/C/etc) to see how it maps to IC10 so they can get to understand IC10 better
Source Code on GitHub[github.com]
Stationeers Official Discord[discord.gg]
Stationeers Modding Discord[discord.gg]
Getting Started Guide[github.com]