Hi everyone! I decided I wanted to boot up two separate versions of Grim Dawn but I didn’t want the hassle of swapping save folders. I couldn’t find a way to force the game to save to a custom directory via options.txt, so I decided to upgrade my startup script and share in case anyone else needed it. I play with Wine on Linux but I’m sure the idea can be ported to Batch/PowerShell for Windows users.
Make sure to create the folder save in your game directory if it does not exist, prior to launching. This script also sets core affinities to reduce stutters.
#!/bin/sh
_curPath="$(dirname "`realpath "$0"`")"
# Check if save folder is symlink
_stockSave="$HOME/Documents/My Games/Grim Dawn"
if [ ! -h "$_stockSave" ];then
mv "$_stockSave" "${_stockSave}_BAK"
ln -s "$_curPath/save" "$_stockSave"
fi
# Check if save symlink points to here
if [ ! "`readlink "$_stockSave"`" = "$_curPath/save" ];then
unlink "$_stockSave"
ln -s "$_curPath/save" "$_stockSave"
fi
# Start 64-bit game
wine 'Grim Dawn.exe' /x64
# Force best possible multi-threading:
until PID=`pidof 'Grim Dawn.exe'`;do sleep 0.2;done && sleep 2 && taskset -pc 0-$(expr `nproc` - 1) $PID