Skip to content

Config variables

fgsfds edited this page May 31, 2024 · 18 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; width of resolution in exclusive fullscreen.
DefaultHeight int 1 - ... 480 Default height of the game window in windowed mode; height of resolution in exclusive fullscreen.
DefaultFullscreen int 0 or 1 0 Whether or not to start the game in fullscreen. Alt+Enter switches it at runtime.
ExclusiveFullscreen int 0 or 1 0 0 - fullscreen is borderless; 1 - fullscreen is exclusive, in DefaultWidth x DefaultHeight resolution
AllowHiDpi int 0 or 1 0 Whether to let the OS upscale the window on HiDPI displays. Better disabled when ExclusiveFullscreen = 1.
VSync int -1 - ... 1 0 - VSync off; 1 - VSync on; -1 - adaptive VSync on (if supported); 2+ - sync every N frames.
FramerateLimit int 0 - 200 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.
FramebufferEffects int 0 or 1 1 Enable framebuffer effects (blur, cloak, etc). Resets to 0 if unsupported by GPU.

[Game]

Gameplay-related settings.

Key Type Range Default Description
MemorySize int 4 - 1024 16 Main memory heap size in megabytes.
CenterHUD int 0 - 2 0 0 - draw HUD on the sides of the screen; 1 - center in 4:3 area; 2 - center in ~16:9 area
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.
ExtraSleep int 0 or 1 1 If 1, sleep for a bit in the game loop to further relax CPU load.
SkipIntro int 0 or 1 0 Always skip the intro sequence on startup.
DisableMpDeathMusic int 0 or 1 0 Don't play the death theme in multiplayer.
MenuMouseControl int 0 or 1 1 Enable mouse controls in menus.

[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.
CrouchMode int 0 - 3 3 0 - hold to crouch; 1 - N64 analog crouch; 2 - toggle crouch; 3 - analog and toggle
CrosshairSway float 0 - 10 1 Aim mode crosshair sway multiplier.
ExtendedControls int 0 or 1 1 Whether this player is using the "Ext" extended control scheme.
CrosshairColour uint 0 - ... 16711720 Crosshair colour. Default value is just RGBA 00FF0028 converted to decimal.

[Input]

General input-related settings.

Key Type Range Default Description
MouseEnabled int 0 or 1 1 Enable mouse.
MouseLockMode int 0 - 2 2 0 - never lock mouse to window; 1 - always lock mouse; 2 - unlock automatically when moving the mouse in menus
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.
ControllerIndex int -1 - ... -1 SDL joystick index of last used controller, or -1 if none.

[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.

[Net]

General network-related settings. Only present in the port-net branch.

Key Type Range Default Description
LerpTicks int 0-600 6 If not 0, interpolate player positions over this amount of (60FPS) frames. Makes remote player movement smoother at the cost of them lagging behind their real positions a little bit.

[Net.Server]

Server settings. Only present in the port-net branch.

Key Type Range Default Description
Port int 0-65535 27100 UDP port used by the server.
UpdateFrames int 0-600 1 How many (60FPS) frames to wait between sending position updates. Higher values = less bandwidth, but choppier movement. 2 is recommended for 5+ player Internet games.
InRate int 0-10485760 131072 Hard limit on download bandwidth usage. 0 = no limit.
OutRate int 0-10485760 131072 Hard limit on upload bandwidth usage. 0 = no limit.
AllowInfoQuery int 0 or 1 1 If 1, allow connectionless server info queries.

[Net.Client]

Client settings. Only present in the port-net branch.

Key Type Range Default Description
LastJoinAddr str - - The address of the last server you connected to.
UpdateFrames int 0-600 1 Same as Net.Server.UpdateFrames above, but for the client.
InRate int 0-10485760 131072 See Net.Server.InRate above.
OutRate int 0-10485760 131072 See Net.Server.OutRate above.