Skip to main content
Inspect the binary crimson.cfg configuration file used by the game.

Usage

crimson config [OPTIONS]

Options

--path
Path
Path to crimson.cfg file.Default: base-dir/crimson.cfg
--base-dir
Path
Base path for runtime files.Default: Per-user OS data directoryOverride with CRIMSON_RUNTIME_DIR environment variable.
--runtime-dir
Path
Alias for --base-dir.

Output Format

The command prints configuration values in human-readable format:
path: /home/user/.local/share/crimsonland/crimson.cfg
screen: 1024x768
windowed: 1
bpp: 32
texture_scale: 1
fields:
screen_width: 1024
screen_height: 768
screen_bpp: 32
windowed_flag: 1
texture_scale: 1
player_name: b'Player\x00\x00...' (len=32)
...

Configuration Fields

The crimson.cfg file is a binary structure containing:
screen_width
int
Window width in pixels.
screen_height
int
Window height in pixels.
screen_bpp
int
Bits per pixel (color depth).Typically 32 for RGBA8888.
windowed_flag
int
Windowed mode flag.
  • 0 = Fullscreen
  • 1 = Windowed
texture_scale
int
Texture scaling factor.
  • 1 = Original resolution
  • 2 = 2x upscaled
player_name
bytes[32]
Player name as null-terminated ASCII string.
Additional fields include audio settings, control bindings, and game preferences.

Examples

Inspect Default Config

crimson config
Output:
path: /home/user/.local/share/crimsonland/crimson.cfg
screen: 1024x768
windowed: 1
bpp: 32
texture_scale: 1
fields:
screen_width: 1024
screen_height: 768
...

Inspect Custom Config

crimson config --path ./custom_crimson.cfg

Inspect with Custom Runtime Dir

crimson config --base-dir $PWD/artifacts/runtime

Config File Location

Default locations by platform: Linux:
~/.local/share/crimsonland/crimson.cfg
macOS:
~/Library/Application Support/crimsonland/crimson.cfg
Windows:
%APPDATA%\crimsonland\crimson.cfg
Override with CRIMSON_RUNTIME_DIR:
export CRIMSON_RUNTIME_DIR="$PWD/artifacts/runtime"
crimson config
# Reads: ./artifacts/runtime/crimson.cfg

Binary Format

The crimson.cfg file uses a fixed binary structure defined in grim.config.CRIMSON_CFG_STRUCT. Key characteristics:
  • Fixed size (varies by version)
  • Little-endian integers
  • Null-terminated strings
  • Padding bytes for alignment
The config is read/written using the Construct library.

Modifying Config

The game writes crimson.cfg automatically when settings change. To manually edit:
  1. Run the game once to generate default config
  2. Modify in-game settings
  3. Config is saved on exit
Direct binary editing is not recommended. Use in-game menus instead.

Missing Config

If crimson.cfg doesn’t exist, the game creates it with defaults:
# First run creates config
crimson
# Config now exists
crimson config

Error Handling

Config Not Found

crimson config --path /nonexistent.cfg
Creates a new config with default values.

Corrupted Config

If the config file is corrupted, delete it and let the game recreate:
rm ~/.local/share/crimsonland/crimson.cfg
crimson  # Creates new default config

See Also

Build docs developers (and LLMs) love