ReShade + D3DOverrider Helper Script
- brussell
- Topic Author
Less
More
6 years 5 months ago - 6 years 5 months ago #1
by brussell
ReShade + D3DOverrider Helper Script was created by brussell
This is no fancy new shader but a handy little script that helps those that want to run ReShade in combination with D3DOverrider.
In order for D3DOverrider to work, you have to put the same Reshade-dll (e.g. d3d9.dll) of a game folder into the D3DOverrider folder as well. Furthermore D3DOverrider adds a few offset cache entries about it's used dlls in a config file, which have to be deleted before you can use the program with another dll.
To avoid the manual procedure for every game and version of Reshade, I've used windows batch scripting for automation. You need to create three files:
StartGameD3DO.cmd (can be renamed at will)This must be put in the game folder where the Reshade dll resides. It's game specific. You have to specify the executable path (mostly the current one), optional parameters and a workingfolder if necessary. For firsttime use one has to add the D3DOverrider path as well.
After execution the script passes the info to the main script which does all the remaining work:
D3DOverrider.cmdThis must be put into the D3DOverrider folder where D3DOverrider.exe resides. When called from StartGameD3DO.cmd, it deletes existing Reshade dlls, restores the configuration without offset caches and copies the Reshade dll of the game folder into the D3DOverrider directory. It then starts D3DOverrider and the game executable and stops D3DOverrider again after the game has quitted.
Config_TemplateThis must be put in D3DOverrider/Profiles. It's just a clean config file without dll offset entries created by D3Doverrider.
In order for D3DOverrider to work, you have to put the same Reshade-dll (e.g. d3d9.dll) of a game folder into the D3DOverrider folder as well. Furthermore D3DOverrider adds a few offset cache entries about it's used dlls in a config file, which have to be deleted before you can use the program with another dll.
To avoid the manual procedure for every game and version of Reshade, I've used windows batch scripting for automation. You need to create three files:
StartGameD3DO.cmd (can be renamed at will)
@echo off
::####### Configuration #########
set EXECUTABLE=iw3sp.exe
set PARAMS=+set com_introplayed 1 +exec autoexec.cfg
set WORKINGDIR=
::###############################
set D3DOVERRIDERPATH=D:\Games\Tools\D3DOverrider
start "" /B "%D3DOVERRIDERPATH%\D3DOverrider.cmd" startgame
After execution the script passes the info to the main script which does all the remaining work:
D3DOverrider.cmd
@echo off
if NOT "%1" == "startgame" (
echo Program must be called within startgame.cmd! Aborting...
pause
exit 1
)
if "%EXECUTABLE%" == "" (
echo No executable specified! Aborting...
pause
exit 1
)
set RESHADE_DLL_LIST=d3d8.dll d3d9.dll dxgi.dll d3d11.dll
taskkill /F /T /IM D3DOverrider.exe 2>NUL
timeout /t 1 >NUL
for %%a in (%RESHADE_DLL_LIST%) do (
if exist "%D3DOVERRIDERPATH%\%%a" (
del /q /f "%D3DOVERRIDERPATH%\%%a" >NUL
)
if exist %%a (
copy /Y "%%a" "%D3DOVERRIDERPATH%\%%a" >NUL
)
)
copy /Y "%D3DOVERRIDERPATH%\Profiles\Config_Template" "%D3DOVERRIDERPATH%\Profiles\Config" >NUL
start /B "" "%D3DOVERRIDERPATH%\D3DOverrider.exe"
timeout /t 1 >NUL
if "%WORKINGDIR%" == "" (
start /WAIT "" "%EXECUTABLE%" "%PARAMS%"
) else (
start /WAIT /D "%WORKINGDIR%" "" "%EXECUTABLE%" "%PARAMS%"
)
taskkill /F /T /IM D3DOverrider.exe 2>NUL
exit
Config_Template
[Settings]
Skin=default.usf
WindowX=
WindowY=
FirstRun=0
StartMinimized=1
StartWithWindows=
Last edit: 6 years 5 months ago by brussell.
The following user(s) said Thank You: crosire, acknowledge, Qsimil
Please Log in or Create an account to join the conversation.
- e371
Less
More