Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HarbourMasters/Starship/llms.txt
Use this file to discover all available pages before exploring further.
Console Variables (CVars) are Starship’s runtime configuration system, inherited from libultraship. Every option in the menu bar — from FPS targets to cheat codes — is backed by a named CVar that is read and written through a simple C API and persisted automatically to starship.cfg.json.
How CVars Work
- Each CVar has a name (a dot-separated string), a type (
int, float, or string), and a default value that is returned when the variable has not been explicitly set.
- All CVars are stored in
starship.cfg.json in the same directory as the Starship executable.
- Changes made through the menu bar or the developer console are written to
starship.cfg.json on the next frame after the change (via SaveConsoleVariablesNextFrame).
- You can edit
starship.cfg.json directly with a text editor while the game is not running.
C API
The following functions are available anywhere in the codebase (and in mods that link against libultraship).
int32_t CVarGetInteger(const char* name, int32_t defaultValue);
Returns the integer value of name, or defaultValue if the CVar has not been set.
void CVarSetInteger(const char* name, int32_t value);
Sets the integer CVar name to value. The change is held in memory until the next save.
float CVarGetFloat(const char* name, float defaultValue);
Returns the float value of name, or defaultValue if unset.
void CVarSetFloat(const char* name, float value);
Sets the float CVar name to value.
const char* CVarGetString(const char* name, const char* defaultValue);
Returns the string value of name, or defaultValue if unset.
void CVarSetString(const char* name, const char* value);
Sets the string CVar name to value.
void CVarClear(const char* name);
Removes name from the CVar store entirely, so the next Get call returns the default.
Example
// Read the current interpolation FPS target, defaulting to 60
int32_t fps = CVarGetInteger("gInterpolationFPS", 60);
// Override MSAA level and apply it immediately
CVarSetInteger("gMSAAValue", 4);
Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1));
Persistence
CVars are saved to starship.cfg.json (located next to the executable). The file is plain JSON and can be opened in any text editor. Keys use the same dot-separated names as the CVar API.
{
"CVars": {
"gInterpolationFPS": 60,
"gMSAAValue": 2,
"gVoiceLanguage": 1
}
}
Edit starship.cfg.json only while Starship is not running. The game overwrites the file on exit.
CVar Reference
Display & Rendering
| CVar | Type | Default | Description |
|---|
gInterpolationFPS | int | 60 | Target interpolation framerate for matrix-based frame generation |
gMatchRefreshRate | int | 0 | When 1, locks the interpolation target to the display refresh rate |
gVsyncEnabled | int | 1 | 1 = VSync on (caps FPS to refresh rate, removes tearing) |
gMSAAValue | int | 1 | MSAA sample count — 1 disables, max 8 |
gRenderParallelization | int | 1 | 1 = allow CPU to prepare the next frame while GPU renders the previous |
gGraphics.GammaMode | int | 0 | 0 = gamma boost enabled; 1 = gamma boost disabled (requires restart) |
gHUDPointFiltering | int | 1 | 1 = apply point (nearest-neighbour) filtering to HUD elements |
HUD Aspect Ratio
| CVar | Type | Default | Description |
|---|
gHUDAspectRatio.Enabled | int | 0 | 1 = override HUD aspect ratio with custom X/Y values |
gHUDAspectRatio.X | int | 0 | Aspect ratio numerator (e.g. 16 for 16:9) |
gHUDAspectRatio.Y | int | 0 | Aspect ratio denominator (e.g. 9 for 16:9) |
Audio
| CVar | Type | Default | Description |
|---|
gAudioChannelsSetting | int | 0 | 0 = stereo; 1 = 5.1 surround (requires reload) |
gVoiceLanguage | int | 0 | Voice language — 0 = US English, 1 = EU (Lylat) or JP |
Interface
| CVar | Type | Default | Description |
|---|
gOpenMenuBar | int | 0 | 1 = menu bar is open on startup |
gNotifications | int | 0 | Notifications window open state |
gRadioCommBox.Selection | int | 0 | Radio comm box display mode — 0 = Original, 1 = Expand |
gEnhancements.Mods.AlternateAssets | int | 0 | 1 = load alternate asset pack from mods/ |
Cheats
| CVar | Type | Default | Description |
|---|
gInfiniteLives | int | 0 | 1 = player never runs out of lives |
gInfiniteBombs | int | 0 | 1 = unlimited smart bombs |
gInfiniteBoost | int | 0 | 1 = unlimited boost/brake gauge |
gHyperLaser | int | 0 | 1 = hyper laser mode enabled |
gRapidFire | int | 0 | 1 = hold A to keep firing; release A to charge |
gLaserRangeMult | int | 100 | Laser range as a percentage of the default (15–800) |
Developer & Debug
| CVar | Type | Default | Description |
|---|
gDeveloperTools.LogLevel | int | 1 | spdlog log level: 0=trace, 1=debug, 2=info, 3=warn, 4=error, 5=critical, 6=off |
gDebugPause | int | 0 | 1 = game logic is paused |
gLToDebugPause | int | 0 | 1 = press L to toggle debug pause |
gLToFrameAdvance | int | 0 | 1 = pressing L while paused advances one frame instead of resuming |
gDebugSpeedControl | int | 0 | Arwing speed control via D-Pad (left/right increase/decrease, down = stop) |
gDebugNoCollision | int | 0 | 1 = vehicle collision disabled |
Accessibility & Visual Enhancements
| CVar | Type | Default | Description |
|---|
gFighterOutlines | int | 0 | 1 = draw outlines on Arwing and Wolfen icons in the radar |
gEnemyRedRadio | int | 0 | 1 = use red background for enemy radio communication boxes |
Beta Restoration
| CVar | Type | Default | Description |
|---|
gRestoreBetaCoin | int | 0 | 1 = restore the beta coin that was replaced by the gold ring |
gRestoreBetaBoostGauge | int | 0 | 1 = restore the beta-era boost/brake gauge UI |
Reading CVars from Config Directly
You can query the raw JSON value without launching the game using any JSON-capable command-line tool:
# Example: check the current interpolation FPS on Linux / macOS
python3 -c "import json; d=json.load(open('starship.cfg.json')); print(d['CVars'].get('gInterpolationFPS', 60))"
Writing CVars from the Developer Console
Press F1 to open the menu bar, then open Developer → Console. Type CVar commands directly:
CVarSetInteger gInterpolationFPS 120
CVarSetInteger gMSAAValue 4
Changes take effect immediately and are written to starship.cfg.json on the next save frame.