Skip to content

Config variables

fgsfds edited this page Nov 18, 2023 · 24 revisions

The configuration is stored in an INI file called pd.ini, which is by default in the following locations:

  • On Windows: next to pd.exe if the folder is writable, home directory (%APPDATA%/perfectdark) otherwise
  • On Linux: home directory (~/.local/share/perfectdark), unless there was already a pd.ini next to the executable

The file generally follows INI file syntax and consists of the following sections.

[Audio]

Audio backend settings. Generally you only want to mess with these if you're getting choppy audio.

Key Type Range Default Description
BufferSize int 1 - ... 512 Audio buffer size in sample frames.
QueueLimit int 1 - ... 8192 Max size of queued audio in samples.

[Video]

Graphics settings.

Key Type Range Default Description
DefaultWidth int 1 - ... 640 Default width of the game window in windowed mode.
DefaultHeight int 1 - ... 480 Default height of the game window in windowed mode.
DefaultFullscreen int 0 or 1 0 Whether or not to start the game in borderless fullscreen. Alt+Enter switches it at runtime.
VSync int -1 - ... 1 0 - VSync off; 1 - VSync on; -1 - adaptive VSync on (if supported); 2+ - sync every N frames.
FramerateLimit int 0 - ... 0 Hard cap framerate to this value. Actual FPS cap depends on Game.TickRateDivisor and VSync.
TextureFilter int 0, 1, 2 1 0 - disable all texture filtering; 1 - bilinear filter; 2 - N64 three-point filter.
TextureFilter2D int 0 or 1 1 0 - don't filter any UI elements; 1 - filter UI elements like on N64.
MSAA int 0 - 16 0 0 or 1 - no anti-aliasing; 2, 4, 8, 16 - multisample anti-aliasing.

[Game]

Gameplay-related settings.

Key Type Range Default Description
MemorySize int 4 - 1024 16 Main memory heap size in megabytes.
CenterHUD int 0 or 1 0 Draw the HUD in a centered 4:3 area in widescreen resolutions.
ScreenShakeIntensity float 0 - 100 1 Strength multiplier for the explosion screen shake effect.
TickRateDivisor int 0 - 10 1 Divisor for the game tickrate. 1- 60/50 FPS; 2- 30/25 FPS; etc; 0 uncaps the tickrate.
SkipIntro int 0 or 1 0 Always skip the intro sequence on startup.

[Game.PlayerX]

...where X is 1 through 4. Gameplay-related settings for each player.

Key Type Range Default Description
FovY float 1 - 179 60 Vertical field of view for the player.
FovAffectsZoom int 0 or 1 1 Whether increasing FovY should adjust zoomed-in FOVs accordingly.
MouseAimMode int 0 or 1 0 0 - crosshair moves around the screen when mouse aiming; 1 - crosshair is fixed in place.
MouseAimSpeedX float 0 - 10 0.75 Crosshair speed multiplier for MouseAimMode=0.
MouseAimSpeedY float 0 - 10 0.75 Crosshair speed multiplier for MouseAimMode=0.
ClassicCrouch int 0 or 1 0 Allow crouching and uncrouching with movement keys in aim mode.
CrosshairSway float 0 - 10 1 Aim mode crosshair sway multiplier.

[Input]

General input-related settings.

Key Type Range Default Description
MouseEnabled int 0 or 1 1 Enable mouse.
MouseDefaultLocked int 0 or 1 0 Lock mouse to the game window on startup.
MouseSpeedX float any 1.5 Horizontal mouse sensitivity.
MouseSpeedY float any 1.5 Vertical mouse sensitivity.
FirstGamepadNum int 0 - 3 0 Which player number (0-3) to assign the first connected gamepad to.
FakeGamepads int 0 - 4 0 1+ - simulate that many connected gamepads.

[Input.PlayerX]

...where X is 1 through 4. Input-related settings for each player.

Key Type Range Default Description
RumbleScale float 0 - 1 0.5 Controller vibration intensity.
LStickScaleX float -10 - 10 1 Left stick horizontal sensitivity.
LStickScaleY float -10 - 10 1 Left stick vertical sensitivity.
LStickDeadzoneX int 0 - 32767 4096 Left stick horizontal deadzone.
LStickDeadzoneY int 0 - 32767 4096 Left stick vertical deadzone.
RStickScaleX float -10 - 10 1 Right stick horizontal sensitivity.
RStickScaleY float -10 - 10 1 Right stick vertical sensitivity.
RStickDeadzoneX int 0 - 32767 4096 Right stick horizontal deadzone.
RStickDeadzoneY int 0 - 32767 4096 Right stick vertical deadzone.
StickCButtons int 0 or 1 0 1 - left stick simulates C buttons; 0 - it's a separate analog input.
SwapSticks int 0 or 1 1 0 - left stick is N64 stick; 1 - right stick is N64 stick.

[Input.PlayerX.Binds]

...where X is 1 through 4. Control bindings for each player.
Keys are N64 inputs, values are comma-separated lists of real inputs, or NONE if that N64 input is unbound.

Real inputs can be the following:

  • Keyboard keys: LEFT_CTRL, RETURN, A, 1, etc. Names mostly correspond to SDL_GetScancodeName() values.
  • Mouse buttons: MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE, MOUSE_X1, MOUSE_X2.
  • Mouse wheel: MOUSE_WHEEL_UP, MOUSE_WHEEL_DN.
  • Gamepad buttons: JOY1_A, JOY1_START, etc. The 1 usually corresponds to player number, but can be any gamepad number (1-4). Names correspond to SDL_GameControllerButton values and are based on the Xbox controller scheme.
  • NONE. Unbinds this input.
Key Type Range Description
A_BUTTON bind ... N64 A button. Usually use or confirm.
B_BUTTON bind ... N64 B button. Usually use or cancel.
START_BUTTON bind ... N64 Start button. Usually pause or confirm.
Z_TRIG bind ... N64 Z trigger. Usually fire or confirm.
L_TRIG bind ... N64 L button. Usually alt fire mode.
R_TRIG bind ... N64 R button.
U_JPAD bind ... N64 d-pad up.
D_JPAD bind ... N64 d-pad down. Also radial menu.
L_JPAD bind ... N64 d-pad left. Also previous weapon.
R_JPAD bind ... N64 d-pad right.
U_CBUTTONS bind ... N64 C-up. C-buttons are usually movement.
D_CBUTTONS bind ... N64 C-down.
L_CBUTTONS bind ... N64 C-left.
R_CBUTTONS bind ... N64 C-right.
STICK_XNEG bind ... N64 stick left. Stick is usually look.
STICK_XPOS bind ... N64 stick right.
STICK_YNEG bind ... N64 stick up.
STICK_YPOS bind ... N64 stick down.
X_BUTTON bind ... Extra virtual button: reload.
Y_BUTTON bind ... Extra virtual button: next weapon.
CK_2000 bind ... Extra virtual button: full crouch.
CK_4000 bind ... Extra virtual button: half crouch.
CK_8000 bind ... Extra virtual button: cycle crouch.

Clone this wiki locally