# LinCity-NG Runtime Config

This is a comprehensive list of configuration options for LinCity-NG.

Most options may be specified on the command line, in a config file, or in the
in-game options menu. A few options may also be set through environment
variables. Changes made in the in-game options menu take effect immediately, and
write the change to the config file to make it persistent. Options given on the
command line have the highest precedence, followed by environment
variables, the config file, and finally, option defaults.

The default config file location is system dependent. Typical locations are:
- Linux: `/home/<user>/.config/lincity-ng.conf`
- Windows: `C:\Users\<user>\AppData\Roaming\lincity-ng.ini`
- Mac: `/Users/<user>/Library/Application Support/appname.conf`


## Config File Location

**Command Line Options:** `-c <file>` or `--config <file>`

**Environment variable:** `LINCITYNG_CONFIG_FILE`

**Config File Elements:** This option may not be specified in the config file.

**Allowed Values:** file path

**Default:** _system-dependent_

Specifies the configuration file location. If this option is specified more than
once, only the last value takes effect. If not specified, then a
system-dependent default location is used. If the file does not exist, then it
is created.

## Video Mode

**Command Line Options:** `-g`, `--gl`, `-s`, or `--sdl`

**Config File Elements:** `<useOpenGL>`

**Allowed Values:** `yes`/`no`/`default`

**Default:** `no`, i.e. SDL mode

Switches between GL or SDL video mode. If specified more than once on the
command line, the last option takes precedence. Not all modes are supported in
all versions/builds.


## Fullscreen/Windowed

**Command Line Options:** `-f`, `--fullscreen`, `-w`, or `--window`

**Config File Elements:** `<fullscreen>`

**Allowed Values:** `yes`/`no`/`default`

**Default:** `yes`, i.e. fullscreen

Toggles fullscreen/windowed display mode. If specified more than once on the
command line, the last option takes precedence.


## Window Size

**Command Line Options:** `-S <width>x<height>` or `--size <width>x<height>`

**Config File Elements:** `<x>` and `<y>`

**Allowed Values:** positive decimal integers

**Default:** 1024x768

Sets the window dimensions for windowed mode. This option has no effect in
fullscreen mode.

## Mute Sound

**Command Line Options:** `-m` or `--mute`

**Config File Elements:** `<soundEnabled>` and `<musicEnabled>`

**Allowed Values:** `yes`/`no`/`default`

**Default:** `yes`, i.e. not muted

Mutes sound effects and/or music.

## Sound Volume

**Command Line Options:** _none_

**Config File Elements:** `<soundVolume>` and `<musicVolume>`

**Allowed Values:** integers 0 to 100

**Default:** `100` for sound FX, `50` for music

Sets the sound/music volume percent.

## Music Theme

**Command Line Options:** _none_

**Config File Elements:** `<musicTheme>`

**Allowed Values:** string

**Default:** `default`

Sets the music theme. Typically, the only available theme is `default`. However,
other music themes may be added.

## Language

**Command Line Options:** _none_

**Config File Elements:** `<language>`

**Allowed Values:** 2-character language code with an optional region ID

**Default:** `autodetect`

Sets the user's preferred language. If the special value `autodetect` is
specified, LinCity-NG will detect the preferred language from the environment.
This option has no effect if native language support is disabled for the build.

## Map Size

**Command Line Options:** _none_

**Config File Elements:** `<WorldSideLen>`

**Allowed Values:** positive integers

**Default:** `100`

Sets the size of newly generated maps. This does not affect the size of
pre-built scenarios.

## Car Animations

**Command Line Options:** _none_

**Config File Elements:** `<carsEnabled>`

**Allowed Values:** `yes`/`no`/`default`

**Default:** `yes`, i.e. car animations enabled

Enables/disables in-game vehicle animations. These animations are purely
cosmetic and do not affect gameplay.


## App Data Directory

**Command Line Options:** `--app-data <directory>`

**Environment variable:** `LINCITYNG_APP_DATA_DIR`

**Config File Elements:** `<appDataDir>`

**Allowed Values:** directory path

**Default:** _build-dependent_

Sets the directory location to search for game assets. The default location is
`<prefix>/share/lincity-ng` where `<prefix>` is the installation prefix
specified at the _configure_ build step.

Typical install prefixes are:
- Unix: `/usr`, `/usr/local`, `/home/<user>/.local`
- Windows: `C:\Program Files\lincity-ng`

## User Data Directory

**Command Line Options:** `--user-data <directory>`

**Environment variable:** `LINCITYNG_USER_DATA_DIR`

**Config File Elements:** `<userDataDir>`

**Allowed Values:** directory path

**Default:** _system-dependent_

Sets the directory location to search for game assets. The default location is
system-dependent.

Typical defaults are:
- Linux: `/home/<user>/.local/share/lincity-ng/`
- Windows: `C:\Users\<user>\AppData\Roaming\lincity-ng-data\`
- Mac: `/Users/<user>/Library/Application Support/lincity-ng-data/`
