-
Notifications
You must be signed in to change notification settings - Fork 72
Tweaks
All different user writable tweakfiles live in their own subdirectory under TWEAKDIR
("$STLCFGDIR/tweaks")
If a tweak config TWEAKCFG
( SteamAppID.conf
) in GLOBALTWEAKDIR
or USERTWEAKDIR
(overrides global) is found its settings
overrides the settings in the Game Config.
By means of this function it is be possible to contribute tweak configs required to get games to work hazzlefree out of the box to the community.
With CREATETWEAKS
a default template tweak file is auto-generated on game launch, to make creating one a bit easier.
Some system wide tweaks can already be used (see Installation).
If you use/create tweaks make sure to retest your game with later proton versions without the tweak and report upstream if the bug is fixed!
The used proton Version is automatically written into the tweak file when created with CREATETWEAKS
.
User tweak-files in USERTWEAKDIR
override global tweaks in GLOBALTWEAKDIR
, Autotweaks
An example tweakfile looks like this:
stl/tweaks/user/8080.conf:
#########
#GAMENAME=Kane and Lynch Dead Men
#GAMEEXE=Launcher
#GAMEID=8080
#PROTONVERSION=proton-5.0-10-rc4
#########
WINETRICKSPAKS=d3dx9_31 d3dx9_34
PROTON_NO_ESYNC=1
PROTON_NO_FSYNC=1
NOGFWL=1
Explained in detail: When the game "Kane and Lynch Dead Men" is started stl will find its tweakfile (8080.conf = SteamAppId.conf) and apply following configurations:
- d3dx9_31 d3dx9_34 will be installed via wintricks
- PROTON_NO_ESYNC and PROTON_NO_FSYNC will both be set to 1
- gfwl will be removed
This works completely automatically and transparent without any user interaction. (of course the first start will need some time when aditional packages are installed)
It is also possible to define a script under TWEAKCMD
(f.e. in TWEAKCFG
) which should be started before the game launch.
This is especially useful when it is necessary to move or rename game files to get a game working.
When a TWEAKCMD
is defined stl will check if it finds the file
- as absolute path
- in the system tweak directory
- in the user tweak directory
- in the game directory
In case the file was found stl checks if a TWEAKFILE
is defined in the TWEAKCMD
file.
This comes in handy when the script requires a specific file (f.e. a custom game exe) which is not available for everybody.
With this little "dependency check" the tweak file is simply skipped if the file was not found and the tweak can still be shared in the community.
Not exported variables are not available in the script, but usually none should be required (yay might want to check env
for available vars)
-
GPFX="$STEAM_COMPAT_DATA_PATH/pfx"
:can be used as variable for the gamesWINEPREFIX
-
GFD="$(awk -F 'common' '{print $1}' <<< "$PWD")common/$(awk -F 'common' '{print $NF}' <<< "$PWD" | cut -d'/' -f2)"
: can be used for the base game dir
Game specific config files SteamAppID.conf
both in and system-wide (GLOBALSBSTWEAKDIR
) and User Configurations (SBSTWEAKDIR
)
with optimal settings for SBS-VR (f.e. launcher skips using the game exe as custom command).
Here's an example config for trine 2 STLCFGDIR/sbs/35720.conf
#########
#GAMENAME=Trine 2
#GAMEEXE=trine2_launcher
#GAMEID=35720
CUSTOMCMDMODE="always"
CUSTOMCMD=trine2_32bit.exe
ONLY_CUSTOMCMD=1
GAMEWINDOW=Trine 2
Means, when RUNSBSVR
is not 0 in the main Trine2 config file it will autodetect above sbs tweak config and use the defined variables:
Trine 2 won't start it's original launcher (ONLY_CUSTOMCMD=1
), but only the custom command trine2_32bit.exe
and will wait for a Trine 2
window to open in VR
So in general sbs configs are automatically loaded when found and override settings in the main config
so you just have to enable RUNSBSVR
in STLCFGDIR/gamecfgs/35720.conf
and everything else is configured automatically.
Quick Links
- Changelog
- Installation
- Usage
- Main Menu
- Global Menu
- Tray Icon
- Modding
- Platform-Specific Documentation
- Tweaks
- Utilities
- Advanced