Skip to main content

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).
CVarGetInteger
function
int32_t CVarGetInteger(const char* name, int32_t defaultValue);
Returns the integer value of name, or defaultValue if the CVar has not been set.
CVarSetInteger
function
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.
CVarGetFloat
function
float CVarGetFloat(const char* name, float defaultValue);
Returns the float value of name, or defaultValue if unset.
CVarSetFloat
function
void CVarSetFloat(const char* name, float value);
Sets the float CVar name to value.
CVarGetString
function
const char* CVarGetString(const char* name, const char* defaultValue);
Returns the string value of name, or defaultValue if unset.
CVarSetString
function
void CVarSetString(const char* name, const char* value);
Sets the string CVar name to value.
CVarClear
function
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

CVarTypeDefaultDescription
gInterpolationFPSint60Target interpolation framerate for matrix-based frame generation
gMatchRefreshRateint0When 1, locks the interpolation target to the display refresh rate
gVsyncEnabledint11 = VSync on (caps FPS to refresh rate, removes tearing)
gMSAAValueint1MSAA sample count — 1 disables, max 8
gRenderParallelizationint11 = allow CPU to prepare the next frame while GPU renders the previous
gGraphics.GammaModeint00 = gamma boost enabled; 1 = gamma boost disabled (requires restart)
gHUDPointFilteringint11 = apply point (nearest-neighbour) filtering to HUD elements

HUD Aspect Ratio

CVarTypeDefaultDescription
gHUDAspectRatio.Enabledint01 = override HUD aspect ratio with custom X/Y values
gHUDAspectRatio.Xint0Aspect ratio numerator (e.g. 16 for 16:9)
gHUDAspectRatio.Yint0Aspect ratio denominator (e.g. 9 for 16:9)

Audio

CVarTypeDefaultDescription
gAudioChannelsSettingint00 = stereo; 1 = 5.1 surround (requires reload)
gVoiceLanguageint0Voice language — 0 = US English, 1 = EU (Lylat) or JP

Interface

CVarTypeDefaultDescription
gOpenMenuBarint01 = menu bar is open on startup
gNotificationsint0Notifications window open state
gRadioCommBox.Selectionint0Radio comm box display mode — 0 = Original, 1 = Expand
gEnhancements.Mods.AlternateAssetsint01 = load alternate asset pack from mods/

Cheats

CVarTypeDefaultDescription
gInfiniteLivesint01 = player never runs out of lives
gInfiniteBombsint01 = unlimited smart bombs
gInfiniteBoostint01 = unlimited boost/brake gauge
gHyperLaserint01 = hyper laser mode enabled
gRapidFireint01 = hold A to keep firing; release A to charge
gLaserRangeMultint100Laser range as a percentage of the default (15–800)

Developer & Debug

CVarTypeDefaultDescription
gDeveloperTools.LogLevelint1spdlog log level: 0=trace, 1=debug, 2=info, 3=warn, 4=error, 5=critical, 6=off
gDebugPauseint01 = game logic is paused
gLToDebugPauseint01 = press L to toggle debug pause
gLToFrameAdvanceint01 = pressing L while paused advances one frame instead of resuming
gDebugSpeedControlint0Arwing speed control via D-Pad (left/right increase/decrease, down = stop)
gDebugNoCollisionint01 = vehicle collision disabled

Accessibility & Visual Enhancements

CVarTypeDefaultDescription
gFighterOutlinesint01 = draw outlines on Arwing and Wolfen icons in the radar
gEnemyRedRadioint01 = use red background for enemy radio communication boxes

Beta Restoration

CVarTypeDefaultDescription
gRestoreBetaCoinint01 = restore the beta coin that was replaced by the gold ring
gRestoreBetaBoostGaugeint01 = 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.

Build docs developers (and LLMs) love