From 8c5ba7be7419a3a2a49e2433491ea84b49a8e8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 13 Jan 2021 23:55:58 +0100 Subject: [PATCH] Add some one-off scripts --- dotfiles.yml | 2 ++ scripts/fix-aoe2.sh | 12 +++++++++ scripts/install-gothic.sh | 54 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100755 scripts/fix-aoe2.sh create mode 100755 scripts/install-gothic.sh diff --git a/dotfiles.yml b/dotfiles.yml index bef75cb..9ca34e1 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -66,3 +66,5 @@ dotfiles: to: .config/qt5ct/qt5ct.conf - from: screencfg to: .screencfg + - from: scripts + to: scripts diff --git a/scripts/fix-aoe2.sh b/scripts/fix-aoe2.sh new file mode 100755 index 0000000..00fb049 --- /dev/null +++ b/scripts/fix-aoe2.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +cd $(mktemp -d) + +wget "https://aka.ms/vs/16/release/vc_redist.x64.exe" + +cabextract vc_redist.x64.exe + +cabextract a10 + +rm /var/games/steamapps/compatdata/813780/pfx/drive_c/windows/system32/ucrtbase.dll +cp ucrtbase.dll -t /var/games/steamapps/compatdata/813780/pfx/drive_c/windows/system32 diff --git a/scripts/install-gothic.sh b/scripts/install-gothic.sh new file mode 100755 index 0000000..77f9fb0 --- /dev/null +++ b/scripts/install-gothic.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +read -p "Make sure that gothic was installed via Steam! to continue, to abort " + +set -o nounset +set -o xtrace +set -o errexit + +downloaddir=~/download/gothic + +mkdir -p "${downloaddir}" +cd "${downloaddir}" + +curl -L -o gothic_patch_108k.exe "https://www.worldofgothic.de/download.php?id=15" +curl -L -o gothic1_playerkit-1.08k.exe "https://www.worldofgothic.de/download.php?id=61" +curl -L -o Definitive_Edition_1_4_2.exe "https://www.worldofgothic.de/download.php?id=1586" +curl -L -O https://github.com/GothicFixTeam/GothicFix/releases/download/v1.8/G1Classic-SystemPack-1.8.exe +curl -L -O https://github.com/GothicFixTeam/GothicFix/releases/download/v1.8/Gothic1_PlayerKit-2.8.exe + +read -p "During installation, use \"Z:\\var\\games\\steamapps\\common\\Gothic\\\" as the install directory! to continue, to abort " + +export WINEPREFIX=/var/games/steamapps/compatdata/65540/pfx/ + +wine "${downloaddir}"/gothic1_playerkit-1.08k.exe +wine "${downloaddir}"/Gothic1_PlayerKit-2.8.exe +wine "${downloaddir}"/G1Classic-SystemPack-1.8.exe +wine "${downloaddir}"/Definitive_Edition_1_4_2.exe + +read -p "Now run the game once and exit! to continue, to abort " + +cd /var/games/steamapps/common/Gothic + +sed -i 's/^playLogoVideos=.*$/playLogoVideos=0\r/' system/Gothic.ini +sed -i 's/^sightValue=.*$/sightValue=14\r/' system/Gothic.ini +sed -i 's/^modelDetail=.*$/modelDetail=1\r/' system/Gothic.ini +sed -i 's/^subTitles=.*$/subTitles=0\r/' system/Gothic.ini +sed -i 's/^bloodDetail=.*$/bloodDetail=3\r/' system/Gothic.ini +sed -i 's/^zVidResFullscreenX=.*$/zVidResFullscreenX=2560\r/' system/Gothic.ini +sed -i 's/^zVidResFullscreenY=.*$/zVidResFullscreenY=1440\r/' system/Gothic.ini + +sed -i 's/^SimpleWindow=.*$/SimpleWindow=0\r/' system/SystemPack.ini +sed -i 's/^Gothic2_Control=.*$/Gothic2_Control=1\r/' system/SystemPack.ini +sed -i 's/^USInternationalKeyboardLayout=.*$/USInternationalKeyboardLayout=0\r/' system/SystemPack.ini +sed -i 's/^FPS_Limit=.*$/FPS_Limit=144\r/' system/SystemPack.ini +sed -i 's/^VerticalFOV=.*$/VerticalFOV=50.625\r/' system/SystemPack.ini + +sed -i 's/^OutDoorPortalDistanceMultiplier=.*$/OutDoorPortalDistanceMultiplier=3\r/' system/SystemPack.ini +sed -i 's/^InDoorPortalDistanceMultiplier=.*$/InDoorPortalDistanceMultiplier=3\r/' system/SystemPack.ini +sed -i 's/^WoodPortalDistanceMultiplier=.*$/WoodPortalDistanceMultiplier=3\r/' system/SystemPack.ini +sed -i 's/^DrawDistanceMultiplier=.*$/DrawDistanceMultiplier=3\r/' system/SystemPack.ini + +sed -i 's/^HideFocus=.*$/HideFocus=0\r/' system/SystemPack.ini + +sed -i 's/^Scale=.*$/Scale=1.9\r/' system/SystemPack.ini