About this mod
In case your Game settings keep reverting to default every time you update your NVIDIA graphics drivers, here's a batch file instruction to avoid the pain
- Permissions and credits
- In your save game directory "C:\Users\%username%\Documents\Electronic Arts\The Sims 3" create a file "DefaultSettingsFix.bat" (the name can be anything else, but be sure it has ".bat" extension in the end).
- Copy a game shortcut (the one you use to launch the game) into your save game folder as well and rename it to "TS3" so the script could use it to launch the game instead of you.
- From now on lauch your game usind this bat file. For best experience, create a shortcut of the bat file at your desktop, then in the Properties of the shortcut change icon to TS3 (Properties - Change icon- browse to the game exe)
Batch script looks like this:
====================================================================================
copy "Options.ini_backup2" "Options.ini_backup3"
copy "Options.ini_backup1" "Options.ini_backup2"
copy "Options.ini" "Options.ini_backup1"
@echo off
setlocal enabledelayedexpansion
for /f "tokens=2 delims==" %%a in ('wmic path win32_VideoController where "name like '%%NVIDIA%%'" get DriverVersion /value') do set "driver_ver=%%a"
for %%a in (%driver_ver:.= %) do set "device=%%a"
set "inputFile=Options.ini"
set "tempFile=temp.txt"
set "searchString=lastdevice"
(for /f "usebackq delims=" %%a in ("%inputFile%") do (
set "line=%%a"
if "!line!"=="!line:%searchString%=!" (
echo %%a
) else (
for /f "tokens=1-3 delims=;" %%b in ("%%a") do (
echo %%b;%%c;%%d;%device%
)
)
)) > "%tempFile%"
move /y "%tempFile%" "%inputFile%" > nul
Start "" "TS3"
====================================================================================
How it works:
This batch script rotates through three Options.ini backups before applying any changes.
After backup creation, it checks the current NVIDIA driver version and takes only the number after last period, which is needed for Options.ini.
Then it puts the found number instead of the one in the the line containig "lastdevice" setting in Options.ini, after which it recreates this file with up-to-date lastdevice setting.
After file is created, script launches the game using the shortcut you've put in the folder at step 2.
For other graphic cards:
I don't know how the version numbers look for other vendors so this script might not work even if you change NVIDIA to your vendor since it also alters the received information by bringing it to the needed format. If the driver version looks like "something something.numbers.etc.VERSION", then it'll work, but I don't know. Try it on your own risk - after backuping your saves folder. Good luck!