Skip to content

Latest commit

 

History

History
430 lines (328 loc) · 14.9 KB

configuration.md

File metadata and controls

430 lines (328 loc) · 14.9 KB

Configuration reference

ZachFix.ini lives beside DP.exe.

Startup and F10 Reload INI use the same canonical parser for normal ZachFix settings. Invalid values fall back to the documented safe defaults. PostFX sections use their dedicated runtime parser.

Boolean values accept normal forms such as true/false, yes/no, on/off, and 1/0.

F10 exposes the settings intended for interactive tuning. Save to INI persists editable settings. Reload INI rereads the file. Apply commits settings that support runtime changes; startup-only fields wait for the next launch.

General

[General]
SkipIntro = true

SkipIntro bypasses the publisher/logo startup sequence by changing the supported build's native boot-state immediate from 0xB3 to 0 in memory. The patch is build/signature gated, does not modify DP.exe on disk, and is enabled by default. If the executable was already manually patched with the long-standing community intro-skip byte edit, ZachFix detects the existing 0 state and leaves it alone.

Display

[Display]
Width = 0
Height = 0
Borderless = true
FrameRateLimit = 0
Setting Meaning Runtime behavior
Width, Height Output size. 0/0 resolves to the target monitor. Startup/device creation
Borderless Borderless windowed presentation when the game is windowed. Startup/device creation
FrameRateLimit ZachFix-owned QPC frame limiter. 0 disables it; 30..240 selects the target FPS. 60 matches DP's nominal 60 Hz timing unit. Live on Apply

The limiter paces only the outermost game Present boundary. It does not rewrite DP's timestep or replace the zero-delta stability guard.

Rendering

[Rendering]
InternalWidth = 0
InternalHeight = 0
InternalScale = 1.0
FixPixelOffset = true

If both explicit internal dimensions are non-zero, they take priority over InternalScale.

InternalScale accepts 0.25..4.0; F10 exposes 0.50..4.00.

Internal resolution and pixel-offset changes are live on Apply.

Shadows

[Shadows]
Scale = 4
ImprovePrecision = true
  • Scale: 1..8, live on Apply.
  • ImprovePrecision: selects the shadow depth format at resource creation and requires restart.

Reflections

[Reflections]
Scale = 4
FixWetReflectionNormals = false

FixWetReflectionNormals restores the PC port's native rain-normal source selection using one validated in-memory initializer byte. Opt-in and restart-only, supported on Steam/GOG 1.01b; weather/story callback exceptions are preserved. See rendering.md.

Scale accepts 1..8 and is live on Apply.

DepthOfField

[DepthOfField]
ImproveResolution = true
AdditionalBlur = 0
  • ImproveResolution: live on Apply.
  • AdditionalBlur: 0 Off, 1 Soft, 2 Stronger; immediate from F10.

World

[World]
HighDetailDistanceScale = 1
MainFrustumDistanceMode = 0
ObjectActivationDistanceScale = 1
ObjectLODDistanceScale = 1
Alternate3DDistanceScale = 1
FixInteriorOcclusionBugs = true
  • HighDetailDistanceScale: 1 or 2; applies live, with full visual update as cells transition.
  • MainFrustumDistanceMode: 0 Original (5000/1000/500 for classes 3/4/5), 1 Extended (5000/1000/1000), 2 Extended Plus (5000/5000/5000), 3 Extreme (20000/20000/20000); immediate after Apply. Classes 0/1/2 remain 200000/80000/20000.
  • ObjectActivationDistanceScale: 1 or 2; immediate after Apply.
  • ObjectLODDistanceScale: 1..4; immediate after Apply. It scales native mesh LOD transition distances for type-1 render objects with multi-LOD resource groups and does not alter streaming or activation.
  • Alternate3DDistanceScale: 1..4; immediate after Apply. It extends the near/full range used by the native alternate low-detail 3D residency path (approximately 2500 units per scale step of square half-extent). It does not change the six main-frustum classes or mesh LOD metric.
  • FixInteriorOcclusionBugs: boolean; immediate after Apply.

Filtering

[Filtering]
Mode = Original
MaxAnisotropy = 16

Mode values:

  • Original
  • Bilinear
  • Anisotropic

MaxAnisotropy accepts 2..16 and is also limited by device capabilities. Filtering changes are live on Apply.

Textures

[Textures]
EnableOverride = true
DeveloperMode = false
DimensionMode = DPFix
DumpTextures = false

DimensionMode values are DPFix or Preserve.

  • EnableOverride: applied to the active texture path.
  • DeveloperMode: restart required to enable/disable.
  • DimensionMode: used for new override loads; Developer Mode hot reload uses the applied mode.
  • DumpTextures: Developer Mode only, for new texture loads.

See textures.md.

SaveSafety

[SaveSafety]
Enabled = true
BackupCount = 10

BackupCount accepts 1..100.

These are startup settings. See save-safety.md.

Gamepad

[Gamepad]
NativeGamepad = false
Backend = Auto
InputProfile = Xbox360
RestoreCombatStrafe = false
AnalogVehicleTriggers = true
VehicleTriggerDeadzone = 30
Vibration = true
VibrationStrength = 1.0
  • NativeGamepad: enables the provider-neutral SDL3/XInput controller path; restart required.
  • Backend: Auto, SDL3, or XInput; restart required. Auto tries SDL3 first and falls back to XInput.
  • InputProfile: PC or Xbox360; immediate in F10.
  • RestoreCombatStrafe: restores the original Xbox combat-only LB/RB strafe. Requires Native Gamepad with InputProfile = Xbox360; immediate in F10 and disabled by default.
  • AnalogVehicleTriggers: immediate in F10.
  • VehicleTriggerDeadzone: 0..254 raw 8-bit trigger threshold; immediate in F10.
  • Vibration: immediate while Native Gamepad is active.
  • VibrationStrength: 0.0..1.0; immediate while Native Gamepad is active.

NativeXInput is accepted as a read-only migration alias for NativeGamepad. Saving settings writes the canonical NativeGamepad key and removes the old alias. SDL3 is embedded; an optional ZachFix\SDL3.dll can override the embedded runtime through SDL Dynamic API.

Timing

[Timing]
FixLongUptimeQpcPrecision = true

FixLongUptimeQpcPrecision is a restart-only maintenance fix for a vanilla long-system-uptime timing failure. DP converts absolute QPC values after D3D9 has left the gameplay thread in x87 PC24, so timing resolution becomes coarser as Windows uptime grows. ZachFix runs only the two proven QPC conversion helpers in scoped PC53 and restores the caller's precision-control bits immediately afterward. The fix is enabled by default and build/signature gated.

Input

[Input]
FixLegacyJoystickPolling = true
AutoSwitch = false
LowLatencyInput = false
  • FixLegacyJoystickPolling: restart-only maintenance fix for a pathological WinMM/DirectInput JOYERR_PARMS retry loop. After the first confirmed result for a joystick slot, ZachFix returns the same error without re-entering WinMM until WM_DEVICECHANGE, then revalidates once. JOYERR_UNPLUGGED and successful polling remain native. Enabled by default.
  • AutoSwitch: automatic keyboard/mouse versus controller mode switching. This is a startup setting and is persisted by the F10 save path.
  • LowLatencyInput: removes the PC port's one-tick CInput staging delay by reversing the two verified main-tick calls from commit -> poll to poll -> commit. It is hot-applicable from F10 -> Gamepad, restores the exact vanilla order when disabled, and fails closed on unsupported or signature-mismatched builds.

Audio

[Audio]
FixSurroundAudio = true

FixSurroundAudio is a restart-only compatibility fix for the Director's Cut PC port's broken surround update path. The PC port collapsed original Xbox 360 1x6/2x6/6x6 routing to fixed 2x2 cue matrices, which becomes invalid when XACT is using a 5.1 or 7.1 final mix and can cause looping vehicle sounds to stick or disappear.

When enabled, ZachFix restores the recovered Xbox spatial semantics at the confirmed audio boundaries while preserving the native Windows/XACT output graph. Stereo output stays on the exact vanilla PC path. Supported surround outputs are 5.1 and 7.1; unknown topologies fail closed to the original PC update. The fix is enabled by default and is build/signature gated.

Experimental

[Experimental]
AimFpuPrecisionFix = false
Fullscreen2DEdgeFix = false

AimFpuPrecisionFix is an experimental scoped workaround for the mode-2 aiming edge lock. Forced x87 PC53 precision causally reproduces the restricted edge-follow failure, and PC24 removes that forced failure. The scoped PC24 guard is also known to correct the affected behavior when it occurs. What remains unknown is the trigger/root cause that places a normal gameplay session into this precision-sensitive bad state. When enabled, the option applies PC24 only while DP's native mode-2 aim handler executes and restores the caller precision-control bits afterward. It is disabled by default, build/signature gated, and can be toggled live from F10 -> Gamepad with Apply. Disabling it removes the hook and returns the native handler path.

Fullscreen2DEdgeFix is an experimental, restart-only, opt-in repair for 1-pixel right/bottom seams in scaled fullscreen 2D fills such as transition fades and item-acquisition notifications. It intercepts a single native quad renderer but changes geometry only for three signature-verified Steam/GOG 1.01b call sites (regular fade, one-shot fade, item notification), and only on the real backbuffer with a full viewport, disabled scissor, no transform, and an exact 1280x720 logical rectangle. The right/bottom edges are extended by one output pixel. It leaves unrelated menus, offscreen render targets and ordinary text/image quads untouched. This was visually validated on Steam at 2560x1440; GOG and 3840x2160 still need external testing.

Glyphs

[Glyphs]
DynamicAtlas = false
HotReload = true
KeyboardSet = Native
GamepadSet = Native
  • DynamicAtlas: restart required to enable/disable.
  • HotReload: live once Dynamic Atlas is active.
  • KeyboardSet, GamepadSet: live once Dynamic Atlas is active.

Theme names are file stems under ZachFix\glyphs\keyboard and ZachFix\glyphs\gamepad.

UI

[UI]
Enabled = true
ToggleKey = F10
PauseGameWhileOpen = false

ToggleKey accepts F1-F12, common named keys such as Home/End/Insert/Delete/Pause/ScrollLock/NumLock, a single letter/digit, or a numeric virtual-key code.

PauseGameWhileOpen is applied with Apply and takes effect the next time F10 is opened.

Screenshots and comparison presets

[Screenshots]
Enabled = true
CyclePresetKey = F6
CaptureKey = F7
CaptureAllKey = F8
SettleFrames = 6
AutoCaptureOnSwitch = false
PauseDuringCaptureAll = false
Directory = ZachFix\screenshots
PresetCount = 3
Preset1 = Original
Preset2 = ZachFix
Preset3 = Xbox360

[ScreenshotPreset.Original]
Base = Original

[ScreenshotPreset.ZachFix]
Base = Configured

[ScreenshotPreset.Xbox360]
Base = Configured
ColorMode = Xbox360Full
DisplayGamma = Xbox360HDTV

The screenshot workflow is designed for matched before/after captures without editing or replacing the main INI between shots.

  • CyclePresetKey selects the next preset. The first press selects Preset1.
  • CaptureKey writes the current final backbuffer to a lossless PNG.
  • CaptureAllKey applies every preset in order, waits SettleFrames fully rendered frames after each switch, saves a timestamp-matched PNG set, then restores the exact pre-batch live render/PostFX state.
  • AutoCaptureOnSwitch = true makes the cycle key capture automatically after the settle delay.
  • PauseDuringCaptureAll = true freezes DP's gameplay timers during a batch for tighter normal-gameplay A/B framing. Leave it false for cutscenes because the existing gameplay-timer freeze is not cutscene-safe.
  • Captures are rejected while F10 is open so the settings panel cannot accidentally appear in comparison images.

Base = Configured uses the normal render/PostFX state loaded from ZachFix.ini at process startup. Base = Original switches only settings that ZachFix can safely reverse at runtime: native internal scale, shadow/reflection scale, legacy DoF resolution/blur, pixel-offset correction, world-distance controls, interior-occlusion fix, texture filtering, and ZachFix PostFX/presentation modes. Restart-only state such as shadow depth precision and already-created texture ownership is intentionally preserved.

Each [ScreenshotPreset.<name>] section can optionally override these live values:

  • InternalWidth, InternalHeight, InternalScale
  • ShadowScale, ReflectionScale, ImproveDoFResolution, AdditionalDoFBlur, FixPixelOffset
  • HighDetailDistanceScale, MainFrustumDistanceMode, ObjectActivationDistanceScale, ObjectLODDistanceScale, Alternate3DDistanceScale, FixInteriorOcclusionBugs
  • FilteringMode, MaxAnisotropy
  • AOMode, BloomMode, DoFMode, ExposureMode, ColorMode, DisplayGamma

Up to eight presets are supported. Preset definitions are loaded at startup.

PostFX.AO

[PostFX.AO]
Mode = Off
Radius = 4.0
Strength = 1.0
Bias = 0.04
Thickness = 0.35
Power = 1.0
Resolution = Half

Modes: Off, ShowRaw, ShowFiltered, ShowEnhanced, CompositeHDR.

Resolution: Full, Half, Quarter.

PostFX.Bloom

[PostFX.Bloom]
Mode = Legacy
ThresholdEV = 0.0
SoftKnee = 0.50
Intensity = 0.35
Scatter = 0.70
Levels = 5

Modes: Legacy, Bloom, ShowBloom. BloomNG / NG remain accepted as legacy aliases.

PostFX.DoF

[PostFX.DoF]
Mode = Legacy
MaxRadiusPixels = 12.0
NearStrength = 1.0
FarStrength = 1.0
DepthReject = 1.5
HighlightBoost = 0.25
Resolution = Half

Modes: Legacy, DepthOfField, ShowCoC, ShowNear, ShowFar. DoFNG / DoF / NG remain accepted as legacy aliases.

Resolution: Full, Half, Quarter in the INI parser; current F10 DoF quality control exposes the supported live choices for the active implementation.

PostFX.Color

[PostFX.Color]
Mode = PC
DisplayGamma = PC

Mode values:

  • PC - Director's Cut PC tone/color path.
  • Xbox360Grading - restores the original scene-authored ENV Contrast/Pitch/Chroma/Addsub grading tail.
  • Xbox360Full - grading restoration plus removal of the PC-only final-exposure scaling from the native tone path.

DisplayGamma values:

  • PC - normal PC/sRGB output.
  • Xbox360HDTV - late full-frame Xbox 360 HDTV transfer (sRGB decode -> BT.709 encode) after the complete game frame and before Present.

These controls are live from the F10 PostFX Color tab. Display gamma is separate from tone mapping/color grading and also affects the game's HUD/menu because it runs on the completed backbuffer. The ZachFix F10 UI is drawn after this pass and remains neutral.

PostFX.Exposure

[PostFX.Exposure]
Mode = Legacy
CompensationEV = 0.0
MeterMinEV = -10.0
MeterMaxEV = 6.0
MinExposureEV = -8.0
MaxExposureEV = 4.0
BrightenSpeed = 1.5
DarkenSpeed = 3.0
ShoulderStrength = 1.0
WhitePoint = 4.0

Modes: Legacy, AutoExposure, Shoulder, AutoExposureShoulder.

PostFX controls are live through their F10 page and dedicated runtime parser.