Terraria: Best config.json for 64-bit TModLoader Performance

The objective is to minimize Instruction Latency ($L_{inst}$) and force the game to prioritize the Main Render Thread over background asset loading.

File Path & Setup

  1. Locate config.json: %USERPROFILE%\Documents\My Games\Terraria\tModLoader\config.json.
  2. Locate runtimeconfig.json: This is found in your Steam install folder: ..\steamapps\common\tModLoader\tModLoader.runtimeconfig.json.
  3. Critical Rule: Always close the game and the Steam client before editing these files to prevent “Value Reset” errors.

Optimized “Calamity-Ready” Configuration Table

Parameter (config.json)Recommended ValueTechnical Purpose
LightingMode1 (Retro)The FPS King. Drastically reduces CPU-side light calculations.
Parallax0Disables background scrolling math to save GPU compute.
Support4KtrueAllows the UI to scale without blurry sub-pixel rendering.
FilterLimit16Limits the number of active screen filters/shaders.
MultiplayerNPCSmoothingRange300Reduces “rubber-banding” lag in modded boss fights.

HowTo: Engineering the TModLoader Runtime

Follow these GameEngineer.net technical steps to unlock the full potential of 64-bit execution:

  1. The Stack Size Hack: Open tModLoader.runtimeconfig.json. Under configProperties, find or add "DEFAULT_STACK_SIZE": "6400000". This increases the memory allocated per thread from the standard 1MB to 6.4MB, which is essential for deep modded logic calculations ($C_{logic}$).
  2. Forcing OpenGL: In Steam Launch Options, add /gldevice:OpenGL. In 2026, many modders have found that the .NET 6/8 environment used by tML handles OpenGL calls with lower driver overhead than DirectX 11.
  3. Low Latency Launch String: Add these arguments to your Steam Launch Options:-high -malloc=system -USEALLAVAILABLECORES
  4. Disabling “Blood and Gore”: In config.json, ensure ShowGore is set to false. In modded Terraria, a single boss kill can spawn 500+ gore particles, creating a massive spike in draw calls ($D_{call}$).
  5. Memory Integrity Check: If you have 32GB of RAM, set your Shader Cache Size in the NVIDIA/AMD panel to Unlimited. Modded Terraria compiles thousands of unique projectile shaders; keeping them in the cache prevents “Frame Freezes” during bullet-hell phases.

Technical Explanation: Thread Stack and Mod Complexity ($M_{comp}$)

In 32-bit Terraria, the stack size was strictly limited, causing crashes when mods tried to calculate complex AI paths.

$$Performance \approx \frac{Stack\_Size}{Active\_Mods} \times CPU\_Clock$$

By engineering the DEFAULT_STACK_SIZE to 6400000, you provide a “buffer” for the 64-bit address space to process large data arrays without hitting a StackOverflowException. This doesn’t necessarily increase your average FPS, but it fundamentally eliminates the “Random Crashes” and “Game Speed Slowdown” that occur when the engine is waiting for a thread to clear its memory queue.

Leave a Comment