games:linux:wine:cod_mw2_2009_iw4x_steamcmd
This is an old revision of the document!
Table of Contents
Information
Prerequisites
- Wine (old WoW64)
Dependencies
sudo zypper install 'git-core'
Modern Warfare 2
Restore Files
mkdir -p ~/'Steam/steamapps/common' && gio open ~/'Steam/steamapps'
ls -d ~/'Steam/steamapps/appmanifest_10180.acf' ~/'Steam/steamapps/appmanifest_10190.acf' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2'
Install
~/'Steam/steamcmd/steamcmd.sh' +'login' 'Espionage724' +'@sSteamCmdForcePlatformType' 'windows' +'app_update' '10180' +'quit'
~/'Steam/steamcmd/steamcmd.sh' +'login' 'Espionage724' +'@sSteamCmdForcePlatformType' 'windows' +'app_update' '10190' +'quit'
Validate
~/'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
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine REG ADD 'HKEY_CURRENT_USER\Software\Wine\Drivers' /v 'Graphics' /t 'REG_SZ' /d 'wayland' /f
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine REG ADD 'HKEY_CURRENT_USER\Software\Wine\Direct3D' /v 'renderer' /t 'REG_SZ' /d 'vulkan' /f
IW4x
wget -O ~/'Downloads/IW4x-iw4x-latest.dll' 'https://github.com/iw4x/iw4x-client/releases/latest/download/iw4x.dll' && mv -fv ~/'Downloads/IW4x-iw4x-latest.dll' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.dll'
wget -O ~/'Downloads/IW4x-release-latest.zip' 'https://github.com/iw4x/iw4x-rawfiles/releases/latest/download/release.zip' && unzip -o ~/'Downloads/IW4x-release-latest.zip' -d ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2' && rm -fv ~/'Downloads/IW4x-release-latest.zip'
Settings
Client
mkdir -p ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players' && nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players/iw4x_custom.cfg'
// General seta net_noipx "1" seta sv_lanOnly "1" seta cl_packetdup "0" seta g_log "NUL" seta com_maxfps "0" seta ui_nativeCursor "1" seta r_preloadShaders "1" seta cl_autoRecord "0" seta cl_voice "0" // Graphics seta r_useD3D9Ex "0" seta r_fullscreen "1" seta r_noborder "0" seta r_vsync "0" seta r_mode "640x480" seta r_aspectRatio "standard" seta r_texFilterAnisoMax "16" seta r_texFilterAnisoMin "16" // Player seta name "Espionage724" seta clanName "RoE" seta cl_anonymous "1" seta cl_notifyFriendState "0" bind MOUSE3 "+melee" bind MWHEELDOWN "weapnext" // Bot Warfare seta bots_main_menu "0" seta bots_manage_fill "10" seta bots_main_chat "0" seta bots_skill "5" // End
Server
mkdir -p ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players' && nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players/iw4x_localhost.cfg'
// Server set sv_hostname "IW4x (localhost)" set sv_motd "Welcome to your localhost server!" set net_port "28960" set g_password "" set sv_securityLevel "22" set sv_randomMapRotation "1" // General set net_noipx "1" set sv_lanOnly "1" set g_antilag "0" set cl_packetdup "0" set com_maxfps "0" set g_log "NUL" set cl_voice "0" // TDM set g_gametype "war" set sv_maprotation "gametype war map mp_afghan gametype war map mp_boneyard gametype war map mp_brecourt gametype war map mp_checkpoint gametype war map mp_derail gametype war map mp_estate gametype war map mp_favela gametype war map mp_highrise gametype war map mp_invasion gametype war map mp_nightshift gametype war map mp_quarry gametype war map mp_rundown gametype war map mp_rust gametype war map mp_subbase gametype war map mp_terminal gametype war map mp_underpass" // FFA //set g_gametype "dm" //set sv_maprotation "gametype dm map mp_afghan gametype dm map mp_boneyard gametype dm map mp_brecourt gametype dm map mp_checkpoint gametype dm map mp_derail gametype dm map mp_estate gametype dm map mp_favela gametype dm map mp_highrise gametype dm map mp_invasion gametype dm map mp_nightshift gametype dm map mp_quarry gametype dm map mp_rundown gametype dm map mp_rust gametype dm map mp_subbase gametype dm map mp_terminal gametype dm map mp_underpass" // Bot Warfare set bots_main_firstIsHost "1" set bots_main_waitForHostTime "0" set bots_manage_fill "17" set bots_main_menu "0" set bots_main_chat "0" set bots_skill "5" // End
Bot Warfare
Download Source
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/IW4-Bot-Warfare/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/ineedbots/iw4_bot_warfare.git' ~/'Projects/IW4-Bot-Warfare/src'
Files
cp -Rf ~/'Projects/IW4-Bot-Warfare/src/scriptdata' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw'
IWD
7z a -m'0=Copy' -t'zip' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw/z_svr_bots.iwd' ~/'Projects/IW4-Bot-Warfare/src/maps' ~/'Projects/IW4-Bot-Warfare/src/scripts' && ls ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw/z_svr_bots.iwd'
Libraries
DXVK
master
- Last tested:
dxvk-master-6eddf20c9c4e10093a341971324a819bf5568a24.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
nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/dxvk.conf'
# General dxvk.allowFse = "True" d3d9.dpiAware = "False" d3d9.enumerateByDisplays = "False" dxvk.tearFree = "False" dxvk.disableNvLowLatency2 = "True" dxvk.latencySleep = "False" d3d9.maxFrameLatency = "1" d3d9.maxFrameRate = "-1" d3d9.presentInterval = "0" d3d9.samplerLodBias = "-2.0" # Intel d3d9.hideIntelGpu = "False" dxvk.enableGraphicsPipelineLibrary = "False" dxvk.enableDescriptorBuffer = "False" # Tweaks dxvk.enableMemoryDefrag = "False" dxvk.lowerSinCos = "False" d3d9.deviceLocalConstantBuffers = "True" d3d9.floatEmulation = "False" d3d9.invariantPosition = "False" d3d9.lenientClear = "True" dxvk.useRawSsbo = "True" dxvk.tilerMode = "False" # HUD #dxvk.hud = "devinfo,fps,memory,gpuload,frametimes" #dxvk.hud = "full" # End
Scripts
Server Start
mkdir -p ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)' && nano ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-localhost-server-start.sh' && chmod +x ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-localhost-server-start.sh'
#!/bin/bash cd '/tmp' export WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' -dedicated -disable-notifies -disable-mongoose -disable-rate-limit-check +exec 'iw4x_localhost.cfg' +map_rotate unset 'WINEPREFIX' # End
~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-localhost-server-start.sh'
IW4x Update
mkdir -p ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)' && nano ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-update.sh' && chmod +x ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-update.sh'
#!/bin/bash cd '/tmp' wget -O ~/'Downloads/IW4x-iw4x-latest.dll' -q --show-progress 'https://github.com/iw4x/iw4x-client/releases/latest/download/iw4x.dll' mv -fv ~/'Downloads/IW4x-iw4x-latest.dll' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.dll' wget -O ~/'Downloads/IW4x-release-latest.zip' -q --show-progress 'https://github.com/iw4x/iw4x-rawfiles/releases/latest/download/release.zip' unzip -o ~/'Downloads/IW4x-release-latest.zip' -d ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2' rm -fv ~/'Downloads/IW4x-release-latest.zip' zenity --title 'IW4x Updater' --text 'Client and Rawfiles update complete' --icon ~/'.wine/Icons/IW4x-256.png' --timeout '2' --info # End
~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-update.sh'
Bot Warfare Update
mkdir -p ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)' && nano ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-bot-warfare-update.sh' && chmod +x ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-bot-warfare-update.sh'
#!/bin/bash cd '/tmp' git -C ~/'Projects/IW4-Bot-Warfare/src' reset --hard 'origin/master' git -C ~/'Projects/IW4-Bot-Warfare/src' pull origin 'master' --rebase cp -Rf ~/'Projects/IW4-Bot-Warfare/src/scriptdata' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw' 7z a -m'0=Copy' -t'zip' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/userraw/z_svr_bots.iwd' ~/'Projects/IW4-Bot-Warfare/src/maps' ~/'Projects/IW4-Bot-Warfare/src/scripts' zenity --title 'IW4x Updater' --text 'Bot Warfare update complete' --icon ~/'.wine/Icons/IW4x-256.png' --timeout '2' --info # End
~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-bot-warfare-update.sh'
Profile Back-up
mkdir -p ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)' && nano ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-profile-backup.sh' && chmod +x ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-profile-backup.sh'
#!/bin/bash cd '/tmp' tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-IW4x-Profile.tar.gz' -C ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players' 'iw4x.stat' zenity --title 'IW4x Profile Backup' --text 'Profile Backed-up to Downloads' --icon ~/'.wine/Icons/IW4x-256.png' --timeout '1' --info # End
~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-profile-backup.sh'
Desktop Launcher
IW4x
mkdir -p ~/'.local/share/applications/wine/Programs/IW4x' && nano ~/'.local/share/applications/wine/Programs/IW4x/IW4x.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/wine/Programs/IW4x/IW4x.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry] Name=IW4x Categories=Game; Path='/tmp' Exec='/bin/bash' -c "WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' +exec 'iw4x_custom.cfg' +set 'r_fullscreen 1' +set 'g_antilag 0'" Type=Application StartupNotify=false Icon=/home/CHANGEME/.wine/Icons/IW4x-256.png StartupWMClass=iw4x.exe Actions=Server;Saves;Window;Update-IW4x;Update-Bots;Kill;Notes; [Desktop Action Server] Exec='/bin/bash' -c "kgx --working-directory='/tmp' -T 'IW4x [Server]' -e ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-localhost-server-start.sh'" Name=Local Server [Desktop Action Saves] Exec='/bin/bash' -c "~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-profile-backup.sh'" Name=Profile Back-up [Desktop Action Window] Exec='/bin/bash' -c "WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' +exec 'iw4x_custom.cfg' +set 'r_fullscreen 0' +set 'g_antilag 0'" Name=IW4x (Windowed) [Desktop Action Update-IW4x] Exec='/bin/bash' -c "kgx --working-directory='/tmp' -T 'IW4x [Updater]' -e ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-update.sh'" Name=Update Client + Rawfiles [Desktop Action Update-Bots] Exec='/bin/bash' -c "kgx --working-directory='/tmp' -T 'IW4x [Bot Warfare Updater]' -e ~/'Steam/scripts/Call of Duty Modern Warfare 2 (10180)/iw4x-bot-warfare-update.sh'" Name=Update Bot Warfare [Desktop Action Kill] Exec='/bin/bash' -c "WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wineserver -k" Name=Force-close [Desktop Action Notes] Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games:linux:wine:cod_mw2_2009_iw4x_steamcmd'" Name=Install Notes # End
Icon
mkdir -p ~/'.wine/Icons' && wrestool --output=$HOME/'.wine/Icons/IW4x-256.png' --extract --raw --type='3' --name='6' ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe'
Quick Commands
Winecfg
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' winecfg
Winetricks
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' winetricks
Registry Editor
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' regedit
Kill
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wineserver --kill
Execute
IW4x
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' +exec 'iw4x_custom.cfg' +set 'r_fullscreen 1' +set 'g_antilag 0'
Window
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' +exec 'iw4x_custom.cfg' +set 'r_fullscreen 0' +set 'g_antilag 0'
Server
WINEPREFIX=~/'.wine/Call of Duty Modern Warfare 2 (2009)' wine ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/iw4x.exe' -dedicated -disable-notifies -disable-mongoose -disable-rate-limit-check +exec 'iw4x_localhost.cfg' +map_rotate
Save Restore
players/iw4x.stat
mkdir -p ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players' && gio open ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players'
Main Config
nano ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2/players/iw4x_config.cfg'
Root Folder
gio open ~/'Steam/steamapps/common/Call of Duty Modern Warfare 2'
3)
need to be signed into GitHub, and select the latest
master artifacts package/srv/www/wiki/data/attic/games/linux/wine/cod_mw2_2009_iw4x_steamcmd.1780574077.txt.gz · Last modified: by Sean Rhone
