openOMSI GitHub Discord
Environment variables

Docs / Reference / Environment variables

Setting a variable

1 min readEdit this pagedocs/DEBUG_FLAGS.md

Start openOMSI from a terminal with the variable set. The launcher hands its environment on to the game it starts, so a variable set for the launcher reaches the game too.

Windows (Command Prompt, in the openOMSI folder):

bat
set OMSI_PROFILE=1
openomsi.exe

In PowerShell: $env:OMSI_PROFILE = "1"; .\openomsi.exe

macOS (Terminal):

shell
OMSI_PROFILE=1 /Applications/openOMSI.app/Contents/MacOS/openomsi

Linux (in the openOMSI folder):

shell
OMSI_PROFILE=1 ./openomsi

Android: a phone has no environment to set. Put NAME=value lines, one per line, into openOMSI/env.txt in the content folder. The game sets every OMSI_* line from it at start and notes each name in the log.

How values are read:

  • flag in the tables below: on when the variable is set to anything, even 0 or an empty value. To turn a flag off, unset the variable.
  • number: the whole value is parsed as a number. A value that does not parse counts as unset.
  • default: the setting means that without the variable the matching launcher setting applies.
  • The game reads each variable once per process. Changing it while the game runs has no effect.

The list is kept in crates/omsi-cfg/src/flags.rs. A test there fails when the code reads an OMSI_* name the list lacks, or the list keeps a name no code reads any more.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open