====== Information ======
* Call of Duty: Modern Warfare 2 (2009)
* Steam ((https://store.steampowered.com/app/10180/Call_of_Duty_Modern_Warfare_2_2009/))
* IW4x ((https://iw4x.io/))
===== Prerequisites =====
* [[linux:distros:opensuse_tumbleweed_xfce|openSUSE Tumbleweed (Xfce)]]
* [[linux:notes:wine|Wine]] (old WoW64)
* [[programs:linux:steamcmd|SteamCMD]]
====== SteamCMD ======
* https://steamdb.info/app/10180/info/
===== Restore =====
mkdir -p ~/'Steam/steamapps/common' && gio open ~/'Steam/steamapps'
ls ~/'Steam/steamapps/appmanifest_10180.acf' ~/'Steam/steamapps/appmanifest_10190.acf' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4sp.exe' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4mp.exe'
===== Install/Update =====
~/'Steam/steamcmd/steamcmd.sh' +'login' 'Espionage724' +'@sSteamCmdForcePlatformType' 'windows' +'app_update' '10180' +'quit'
~/'Steam/steamcmd/steamcmd.sh' +'login' 'Espionage724' +'@sSteamCmdForcePlatformType' 'windows' +'app_update' '10190' +'quit'
===== Verify Files =====
****
~/'Steam/steamcmd/steamcmd.sh' +'login' 'Espionage724' +'@sSteamCmdForcePlatformType' 'windows' +'app_update' '10180' 'validate' +'quit'
====== Initial Prefix ======
****
mkdir -p ~/'.wine' && WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' WINEARCH='win32' wine wineboot --init && WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' winecfg /v 'vista' && WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine REG ADD 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v 'winemenubuilder.exe' /t 'REG_SZ' /d '' /f
====== IW4x ======
* https://docs.iw4x.io/get-started/manual-install/linux-guide/#2-using-wine-prefix
* https://github.com/iw4x/iw4x-client/releases
* https://github.com/iw4x/iw4x-rawfiles/releases
wget -O '/tmp/IW4x-iw4x-latest.dll' 'https://github.com/iw4x/iw4x-client/releases/latest/download/iw4x.dll' && mv -fv '/tmp/IW4x-iw4x-latest.dll' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.dll'
wget -O '/tmp/IW4x-release-latest.zip' 'https://github.com/iw4x/iw4x-rawfiles/releases/latest/download/release.zip' && unzip -o '/tmp/IW4x-release-latest.zip' -d ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2' && rm -fv '/tmp/IW4x-release-latest.zip'
====== Launch ======
****
cd ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2' && WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' +set 'com_maxfps 0' +set 'sv_lanOnly 1' +set 'g_antilag 0'
====== Bots ======
* https://docs.iw4x.io/guides/bot-warfare/
* https://github.com/ineedbots/iw4_bot_warfare
===== Install =====
* https://github.com/ineedbots/iw4_bot_warfare/releases
* Last tested: ''iw4bw230.zip'' (May 15, 2024)
unzip -o ~/'Downloads/iw4bw'*'.zip' -d '/tmp/iw4bw' && mkdir -p ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw' && mv -f '/tmp/iw4bw/Move files to root of MW2 folder/mods/mp_bots/'* ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw' && rm -Rf '/tmp/iw4bw'
===== Settings =====
* https://github.com/ineedbots/iw4_bot_warfare#dvars
* https://github.com/ineedbots/iw4_bot_warfare/issues/118
* :?: https://github.com/ineedbots/iw4_bot_warfare/issues/45#issuecomment-1938616252
mkdir -p ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players' && nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players/iw4x_config.cfg'
// Bot Warfare
seta bots_main_menu "0"
seta bots_main_chat "0"
seta bots_manage_fill "10"
seta bots_skill "4"
// BW End
====== Libraries ======
===== DXVK =====
==== master ====
* https://github.com/doitsujin/dxvk/actions ((need to be signed into GitHub, and select the latest ''master'' artifacts package))
* Last tested: ''dxvk-master-6e9b5047218f6a9e720730140cb97c9abd8ed697.zip''
unzip -j -o ~/'Downloads/dxvk-master-'*'.zip' 'x32/d3d9.dll' -d ~/'.wine/Call of Duty Modern Warfare 2 (2009)/drive_c/windows/system32'
==== Dll Override ====
****
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine REG ADD 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v 'd3d9' /t 'REG_SZ' /d 'native' /f
==== dxvk.conf ====
* https://github.com/doitsujin/dxvk/blob/master/dxvk.conf
nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/dxvk.conf'
# General
dxvk.tearFree = "False"
dxvk.latencySleep = "False"
d3d9.dpiAware = "False"
d3d9.enumerateByDisplays = "False"
d3d9.samplerLodBias = "-2.0"
d3d9.maxFrameRate = "85"
# Intel
d3d9.hideIntelGpu = "False"
dxvk.enableGraphicsPipelineLibrary = "False"
# Tweaks
dxvk.enableMemoryDefrag = "False"
dxvk.lowerSinCos = "False"
d3d9.deviceLocalConstantBuffers = "True"
d3d9.floatEmulation = "False"
d3d9.invariantPosition = "False"
d3d9.maxFrameLatency = "1"
# HUD
#dxvk.hud = "full"
# End