---
url: https://milthm.cn/wiki/en/manual/technical-reference/configuration.md
---
# Configuration

## Introduction

This feature was introduced in **v3.2**.

Milthm stores user-editable settings in a `config.toml` file. The file is written in
[TOML](https://toml.io/). If the file does not exist, Milthm will create one from the default
configuration and restore settings from older versions when available.

::: danger
Carefully read the documentation below before modifying the configuration file. Invalid TOML or invalid
typed values can make Milthm fall back to a default configuration until the file is fixed.
:::

## Find the Configuration File

Milthm loads `config.toml` from its platform-specific app data storage path.

Common player-build paths are:

| OS or Platform        | Path                                                                                    |
|-----------------------|-----------------------------------------------------------------------------------------|
| Windows               | `%AppData%\..\LocalLow\Morizero\Milthm\config.toml`                                     |
| Linux                 | `~/.config/unity3d/Morizero/Milthm/config.toml`                                         |
| macOS                 | `~/Library/Application Support/Morizero/Milthm/config.toml`                             |
| Android (Google Play) | `/storage/emulated/<userid>/Android/data/com.morizero.milthm/files/config.toml`         |
| Android (TapTap)      | `/storage/emulated/<userid>/Android/data/game.taptap.morizero.milthm/files/config.toml` |
| iOS                   | Use the system [Files](https://support.apple.com/en-us/102570) app and find **Milthm**. |

## Configuration Sections

Milthm writes the following top-level sections:

* `Notice`
* `GeneralSetting`
* `GameplaySetting`
* `AudioSetting`
* `VideoSetting`
* `ExperimentalSetting`
* `NetworkSetting`

`Notice` is a generated localized notice string. Editing it does not change Milthm settings.

## GeneralSetting

| Key      | Type               | Default | Platform | Description                                                                                                                                                                  |
|----------|--------------------|---------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Language | `string \| "auto"` | `auto`  | All      | UI language as a BCP-47 tag. If `auto`, Milthm uses the detected system language list and falls back when no supported language matches.                                      |

## GameplaySetting

| Key                                | Type                                                                                   | Default                   | Platform | Description                                                                                                                                       |
|------------------------------------|----------------------------------------------------------------------------------------|---------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| NoteFlowSpeed                      | `float`                                                                                | `0.25`                    | All      | User flow-speed value. Negative values fall back to the default. Non-negative values are clamped to `[0, 1.25]`; gameplay uses this value + `0.75`. |
| NoteSize                           | `float`                                                                                | `-1`                      | All      | User note-size value. Negative values use the device default: PC `0.1`, Pad `0.25`, Phone `0.45`, otherwise `0.5`. Non-negative values clamp to `[0, 1]`; gameplay scale is `1 + value`. |
| HighlightChord                     | `bool`                                                                                 | `true`                    | All      | Highlight chords.                                                                                                                                 |
| DisableHitSound                    | `bool`                                                                                 | `false`                   | All      | Disable hit sounds.                                                                                                                               |
| HitSoundSetID                      | `int`                                                                                  | `0`                       | All      | Select hit sound set. Milthm recognizes IDs `0` through `4`.                                                                                      |
| EnableHitBiasIndicator             | `bool`                                                                                 | `false`                   | All      | Enable the early/late hit-bias indicator.                                                                                                         |
| EnableAdLibEffect                  | `bool`                                                                                 | `true`                    | All      | Enable the ripple-like ad-lib effect when clicking.                                                                                               |
| BackgroundDim                      | `float`                                                                                | `0`                       | All      | Background dim level, clamped to `[0, 1]`.                                                                                                        |
| TimeSavingRetryPolicy              | `"SingleClick" \| "DoubleClick"`                                                       | `SingleClick`             | All      | Skip the blank portion at the beginning of a chart during retry. `DoubleClick` is case-insensitive; other values behave like single-click. |
| SongTitlePolicy                    | `CultureFriendly \| AlwaysOriginal \| AlwaysLatin \| AlwaysBoth \| CultureGreedy`      | `CultureFriendly`         | All      | Song title display policy. See below.                                                                                                             |
| EnableNotifications                | `bool`                                                                                 | `false`                   | All      | Enable garden notifications. Platform permission is still required on platforms that require notification permission.                              |
| NonexistentDifficultyEntryPriority | `GreaterThanAllValid \| LessThanAllValid \| AlwaysBottom \| AlwaysTop`                 | `GreaterThanAllValid`     | All      | Placement for songs that do not have the currently selected difficulty when the active filter or sort mode cannot compare them directly.           |
| SongListSortingLocale              | `string`                                                                               | `""`                      | All      | Locale passed to ICU `ucol_open` for song-list sorting. If empty, Milthm uses `GeneralSetting.Language` as the default.                            |
| RandomSongSoftmaxTemperature       | `float`                                                                                | `5`                       | All      | Controls how strongly random-song selection favors songs close to the player's current Reality. Invalid, infinite, NaN, or non-positive values fall back to `5`. |

### SongTitlePolicy Options

| Value             | Description                                                                                                      |
|-------------------|------------------------------------------------------------------------------------------------------------------|
| CultureFriendly   | Prefer the original title when it matches the detected/current language; otherwise prefer the Latin title.        |
| AlwaysOriginal    | Always show the original title.                                                                                  |
| AlwaysLatin       | Show the Latin title when one exists; otherwise show the original title.                                          |
| AlwaysBoth        | Show both original and Latin titles when a Latin title exists; otherwise show the original title.                 |
| CultureGreedy     | Like `CultureFriendly`, but shows both original and Latin titles instead of only Latin when the culture differs.  |

## AudioSetting

| Key             | Type                                | Default  | Platform | Description                            |
|-----------------|-------------------------------------|----------|----------|----------------------------------------|
| BGMVolume       | `float`                             | `0.75`   | All      | BGM volume, clamped to `[0, 1.5]`.     |
| HitVolume       | `float`                             | `0.75`   | All      | Hit sound volume, clamped to `[0, 1.5]`. |
| UIVolume        | `float`                             | `0.75`   | All      | UI sound volume, clamped to `[0, 1.5]`. |
| PlayOnFocusLoss | `bool`                              | `true`   | Desktop  | Keep playing when the app loses focus. |
| ActivatedDevice | `AudioSettingActivatedDeviceSettingModel` | See below | Desktop  | Selected output audio device.          |
| DeviceSettings  | `Array<AudioSettingDeviceSettingModel>`    | `[]`     | All      | Per-device historical audio settings.  |

### AudioSettingActivatedDeviceSettingModel

| Key        | Type     | Default | Description                                                                         |
|------------|----------|---------|-------------------------------------------------------------------------------------|
| DeviceType | `string` | `auto`  | Audio backend/API name, such as `CoreAudio`, `ASIO`, `WASAPI`, or `auto`.           |
| DeviceName | `string` | `auto`  | Audio device name as reported by the system or driver, or `auto`.                  |

### AudioSettingDeviceSettingModel

| Key        | Type     | Default | Description                                                                                              |
|------------|----------|---------|----------------------------------------------------------------------------------------------------------|
| DeviceType | `string` | `""`    | Audio backend/API name.                                                                                  |
| DeviceName | `string` | `""`    | Specific audio device name.                                                                              |
| BufferSize | `int`    | `0`     | Audio buffer size in samples.                                                                            |
| Offset     | `double` | `0`     | Visual offset in seconds for this device. Example: `0.01` means a 10 ms delay.                           |

## VideoSetting

| Key                    | Type                             | Default      | Platform       | Description                                                                 |
|------------------------|----------------------------------|--------------|----------------|-----------------------------------------------------------------------------|
| FrameRate              | `int`                            | `0`          | All            | FPS setting. `0` means auto; values below `0` mean unlimited.                |
| EnableVSync            | `bool`                           | `true`       | Desktop        | Enable VSync.                                                               |
| Resolution             | `string`                         | `fullscreen` | Desktop        | `fullscreen` uses the highest detected resolution; `WIDTHxHEIGHT` selects an explicit resolution, such as `1920x1080`. Invalid values fall back to the highest detected resolution, or `1920x1080` if none is detected. |
| RenderWithinSafeArea   | `bool`                           | `false`      | Android / iOS  | Render within the screen safe area.                                         |
| EnableLowResolution    | `bool`                           | `false`      | Android / iOS  | Enable low-resolution rendering.                                            |
| LowResolutionScale     | `float`                          | `0.5`        | Android / iOS  | Low-resolution scale, clamped to `[0.25, 1]`.                               |
| FitGamePlayScreenRatio | `bool`                           | `false`      | Android / iOS  | Fit gameplay screen ratio.                                                  |
| GraphicsBackend        | `"auto" \| "OpenGL" \| "Vulkan"` | `auto`       | Android        | Select Android graphics backend. `OpenGL` and `Vulkan` are accepted case-insensitively; anything else behaves like auto. |

## ExperimentalSetting

| Key              | Type                              | Default   | Platform | Description |
|------------------|-----------------------------------|-----------|----------|-------------|
| ScoreDiagnostics | `Default \| Enabled \| Disabled`  | `Default` | All      | Control the diagnostic text shown during gameplay. `Default` enables it in prerelease builds and disables it in release builds; `Enabled` and `Disabled` override that behavior. |

## NetworkSetting

Since version **v3.0.0**, Milthm requires a network connection for full functionality.

| Key               | Type                                                              | Default | Platform | Description                     |
|-------------------|-------------------------------------------------------------------|---------|----------|---------------------------------|
| GeneralHttpClient | `GeneralHttpClientSettingModel`                                   | See below | All    | Settings for non-Milthm HTTP requests, such as network-environment checks and downloads. |
| MilthmHttpClient  | `MilthmHttpClientSettingModel`                                    | See below | All    | Settings for Milthm HTTP requests, such as Milkloud and online configuration requests. |
| Backend           | `Auto \| SystemNetSocketsHttpHandler \| UnityWebRequest`          | `Auto`  | All      | HTTP client backend selection.  |

### GeneralHttpClientSettingModel

| Key                            | Type              | Default | Platform | Description                                                    |
|--------------------------------|-------------------|---------|----------|----------------------------------------------------------------|
| NetworkEnvironmentCheckTimeout | `Duration string` | `2s`    | All      | Timeout for checking network availability.                     |
| DownloadTimeout                | `Duration string` | `20s`   | All      | Timeout for downloads handled by the general HTTP client.      |

### MilthmHttpClientSettingModel

| Key                                  | Type              | Default | Platform | Description                                                                                  |
|--------------------------------------|-------------------|---------|----------|----------------------------------------------------------------------------------------------|
| GeneralTimeout                       | `Duration string` | `20s`   | All      | General timeout for Milthm HTTP requests.                                                     |
| OnlineConfigurationRetrievingTimeout | `Duration string` | `5s`    | All      | Timeout for fetching online configuration. This should not exceed `GeneralTimeout`.           |

### Duration

Duration values must be TOML strings in the configuration file.

Use a compact sequence of units, for example:

```toml
NetworkEnvironmentCheckTimeout = "2s"
DownloadTimeout = "1m30s"
GeneralTimeout = "20s"
```

Supported units are lowercase `d`, `h`, `m`, and `s`. When combined, they must appear in `d`, `h`, `m`, `s` order. A
non-negative integer string is also accepted and is interpreted as seconds.
