Set Farming Simulator 25's texture-streaming memory budget from a plain config file, with an optional Windows helper that derives a conservative value from detected VRAM.
The mod calls FS25's available setTextureStreamingMemoryBudget(bytes) engine function once when the mod loads. The value comes from:
modSettings/FS25_AutoVRAMOptimizer.xml
If that file does not exist, the Lua mod creates it with a 5 GiB default. The optional Windows helper can instead detect installed graphics memory and write a hardware-derived value.
This project changes a local texture-streaming budget. It does not modify vehicle/gameplay state or write multiplayer synchronization data.
On texture-heavy setups, a streaming budget that is too small can increase texture eviction/reloading pressure. Raising the budget can reduce that pressure when the GPU has enough free VRAM.
That does not mean more is always better. Render targets, meshes, shadows, the desktop, and other assets also consume VRAM. Setting the texture budget too close to physical VRAM can make stability worse rather than better.
For that reason the helper deliberately keeps headroom instead of assigning the whole card to texture streaming.
- Download
FS25_AutoVRAMOptimizer.zipfrom a release. - Put it in the FS25
modsdirectory. - Enable it for the savegame.
- Start the game once so the settings file can be created.
Release assets are currently unsigned. Releases include SHA256SUMS; compare the downloaded asset's SHA-256 with the matching entry if you want to verify the file you received.
The release also contains the helper used to choose a budget from detected hardware.
Auto-Set-VRAM.bat
-> configure_vram.py
-> vram.py
-> write modSettings/FS25_AutoVRAMOptimizer.xml
The detector first reads the Windows display-adapter registry class and looks for the largest reported adapter-memory value. If that produces no usable value, NVIDIA systems can fall back to nvidia-smi.
The current formula (FORMULA_GEN = 2) uses:
- 3 GiB fixed headroom, and
- 75% of detected VRAM as a ceiling,
- while also capping the result at the raw detected VRAM value.
Conceptually:
budget = min(75% ceiling, max(2 GiB floor, rounded VRAM - 3 GiB))
budget = min(budget, raw detected VRAM)
Examples with the current defaults:
| Detected / nominal class | Typical computed budget |
|---|---|
| 6 GiB | 3 GiB |
| 8 GiB | 5 GiB |
| 12 GiB | 9 GiB |
| 16 GiB | 12 GiB |
| 24 GiB | 18 GiB |
These are budget inputs, not benchmark claims about frame rate or loading time.
The settings file contains a vramGiB value:
<textureStreamingBudget vramGiB="5.0" ... />You can edit it manually. The Lua side rejects NaN/infinite values and clamps the configured number to its own broad 2..64 GiB sanity range, but a manually entered value is not hardware-aware. It can still be inappropriate for the installed GPU.
If a setting causes instability, lower it or delete the settings file to return to the mod's default.
Implemented / directly inspectable:
- one call to
setTextureStreamingMemoryBudget()on mod load when the engine exposes it; - local XML configuration;
- Windows VRAM detection through the display-adapter registry, with
nvidia-smifallback; - the current headroom/fraction formula;
- no gameplay/savegame synchronization logic in this mod.
Workload-dependent:
- whether a higher texture budget improves visible pop-in, stutter, or loading on a particular map/modpack;
- the best headroom for a specific GPU, resolution, renderer, and mod set.
If you benchmark a configuration, record the card, renderer, map/modpack, before/after budget, and the actual measured symptom. That is more useful than a universal "recommended" number.
The helper includes Python tests under tool/test_vram.py covering detection/budget logic and edge cases.
python -m pytest tool/test_vram.pyGNU GPLv3. Maintained by KeilerHirsch.
