Welcome, Guest.
Username: Password: Remember me

TOPIC: ReShade + D3DOverrider Helper Script

ReShade + D3DOverrider Helper Script 1 year 2 weeks ago #1

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)
@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
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.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
This 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_Template
[Settings]
Skin=default.usf
WindowX=
WindowY=
FirstRun=0
StartMinimized=1
StartWithWindows=
This must be put in D3DOverrider/Profiles. It's just a clean config file without dll offset entries created by D3Doverrider.
Last Edit: 1 year 2 weeks ago by brussell.
The administrator has disabled public write access.
The following user(s) said Thank You: crosire, acknowledge, Qsimil

ReShade + D3DOverrider Helper Script 4 months 4 weeks ago #2

Seems like works great. Thank you!
The administrator has disabled public write access.