Synchronize Farclip runtime value with the Tool #15

Merged
Dusk-92 merged 10 commits from test/farclip-config-sync into main 2026-09-06 19:22:45 +00:00
Dusk-92 commented 2026-09-06 18:46:23 +00:00 (Migrated from github.com)

Summary

  • keep the WoW_Modernized.exe Farclip ceiling fixed at 3000 regardless of the selected runtime distance or Safety Limits state
  • synchronize the selected Render Distance to WTF/Config.wtf as SET farclip "<value>"
  • reject runtime Farclip values above 3000 so Config.wtf can never exceed the executable ceiling
  • bump the Vanilla Tweaks normalization marker from 3 to 4 so existing managed v2.3 installs rebuild WoW_Modernized.exe once under the new ceiling policy
  • keep the Farclip policy in setup_tool_dynamic.py rather than the responsive UI layer
  • preserve unrelated Config.wtf settings and use an atomic staged replacement
  • add regression coverage for existing, missing and newly created Farclip configuration plus the migration marker

Why

WoW_Modernized.exe previously stored the selected Render Distance as the executable's maximum Farclip value, while an older higher SET farclip value could remain in Config.wtf. This could leave the runtime CVar above the newly lowered executable ceiling. A reported installation reproduced broken world rendering with an EXE ceiling of 777 and SET farclip "2100"; setting the CVar back to 777 restored normal behavior.

The new policy separates the two roles cleanly: the EXE always permits up to 3000, while the Tool-selected Render Distance is the actual runtime value written to Config.wtf.

Test plan

  • CI unit test suite
  • Windows PyInstaller build
  • verify an existing managed v2.3 install gets one normalization refresh because marker 3 no longer matches marker 4
  • manual test with an existing SET farclip "2100", Apply with Render Distance 777, then verify Config.wtf becomes 777 and the game launches normally through Play Modernized WoW
## Summary - keep the `WoW_Modernized.exe` Farclip ceiling fixed at **3000** regardless of the selected runtime distance or Safety Limits state - synchronize the selected Render Distance to `WTF/Config.wtf` as `SET farclip "<value>"` - reject runtime Farclip values above 3000 so `Config.wtf` can never exceed the executable ceiling - bump the Vanilla Tweaks normalization marker from 3 to 4 so existing managed v2.3 installs rebuild `WoW_Modernized.exe` once under the new ceiling policy - keep the Farclip policy in `setup_tool_dynamic.py` rather than the responsive UI layer - preserve unrelated `Config.wtf` settings and use an atomic staged replacement - add regression coverage for existing, missing and newly created Farclip configuration plus the migration marker ## Why `WoW_Modernized.exe` previously stored the selected Render Distance as the executable's maximum Farclip value, while an older higher `SET farclip` value could remain in `Config.wtf`. This could leave the runtime CVar above the newly lowered executable ceiling. A reported installation reproduced broken world rendering with an EXE ceiling of 777 and `SET farclip "2100"`; setting the CVar back to 777 restored normal behavior. The new policy separates the two roles cleanly: the EXE always permits up to 3000, while the Tool-selected Render Distance is the actual runtime value written to `Config.wtf`. ## Test plan - CI unit test suite - Windows PyInstaller build - verify an existing managed v2.3 install gets one normalization refresh because marker 3 no longer matches marker 4 - manual test with an existing `SET farclip "2100"`, Apply with Render Distance 777, then verify `Config.wtf` becomes 777 and the game launches normally through `Play Modernized WoW`
Sign in to join this conversation.