Dwarf Fortress: Best init.txt for Graphic vs Classic Performance

The objective is to optimize the Frame Refresh Rate ($G\_FPS$) vs the Calculation Rate ($S\_FPS$). For maximum performance, these two must be decoupled to ensure your CPU doesn’t waste cycles drawing pixels when it should be calculating pathfinding.

Setup & File Navigation

  1. Directory Path: Open your Dwarf Fortress folder and navigate to prefs/ (Steam version) or data/init/ (Classic version).
  2. The Targets: You will need to edit both init.txt (Display) and d_init.txt (Simulation logic).
  3. The Rule: If you are using the Steam version, most “Classic” ASCII settings are ignored, so we will focus on the Print Mode and Texture Compression overrides.

Optimized “Fortress Stability” Configuration Table

Parameter (init.txt)Recommended ValueTechnical Purpose
[PRINT_MODE:TWBT]TWBT / STANDARDThe ASCII Speed King. Uses hardware acceleration for text.
[G_FPS_CAP:60]60 or 30Prevents the GPU from over-rendering static screens.
[FPS_CAP:100]100 (Variable)Sets the target “Simulation Speed” (TPS).
[TEXTURE_PARAM:LINEAR]NEARESTSharpens sprites and reduces texture filtering overhead ($T_{filt}$).
[COMPRESSED_SAVES:YES]YESReduces SSD/HDD write-times during seasonal autosaves.

HowTo: Engineering the Enforced Simulation Pipeline

Follow these GameEngineer.net technical steps to maintain your FPS even with 200+ Dwarves:

  1. The “G_FPS” vs “FPS” Split: This is the most misunderstood setting.
    • [G_FPS_CAP] is how many times the screen draws per second.
    • [FPS_CAP] is how many logic ticks ($T_{tick}$) occur per second.By setting G_FPS to 30 and FPS to 100, your fortress runs at high speed while your GPU takes a break, saving power and CPU thermal headroom.
  2. Culling the Caverns: In d_init.txt, find [CAVERN_LAYER_COUNT:3]. Reducing this to 1 or 2 significantly shrinks the active world-map, lowering the number of pathfinding nodes the engine must check every tick ($N_{nodes}$).
  3. Temperature Frequency ($T_{freq}$): Find [TEMPERATURE_UPDATE_RATE:20] in d_init.txt. Increasing this to 100 or 200 means the game calculates heat less often. Unless you are building a complex magma pump-stack, this provides a massive performance boost with zero gameplay impact.
  4. The “Graphic” VRAM Fix: For the Steam version, ensure [PRINT_MODE:MD] is selected if available in your 2026 build. This uses a specialized DirectX wrapper that handles large sprite-sheets more efficiently than the older OpenGL implementations.
  5. Pathfinding Grid Optimization: Use traffic designations ($High/Normal/Low$) in-game. This acts as a manual weight for the A Search Algorithm*. By designating main hallways as “High” and unused corners as “Restricted,” you guide the CPU to ignore useless paths.

Technical Explanation: Single-Thread Bottlenecking ($T_{main}$)

Dwarf Fortress is famous for its “Death Spiral,” where the simulation slows to a crawl. This happens when the Main Thread ($T_{main}$) cannot finish all tasks within the allocated time slice.

$$Logic\_Delay = \sum (Pawn\_Pathing + Fluid\_Flow + Temperature + Combat)$$

By engineering the init.txt to lower the TEMPERATURE_UPDATE_RATE and capping the G_FPS, you are stripping away non-essential “interrupts” from the CPU. This allows the processor to stay in its high-performance “Turbo” state ($f_{max}$) longer, effectively processing more Dwarf-Ticks per real-world second.

Leave a Comment