game:
exe: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/WORMS 4 MAYHEM.EXE
prefix: $GAMEDIR
working_dir: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem
installer:
- input_menu:
description: '=== ENGLISH ===
Select your monitors refresh rate
This adjust the game to your desired FPS
You can change this later in game root folder/Default.cfg
=== SPANISH ===
Selecciona la tasa de refresco de tu monitor.
Esto ajusta el juego a los FPS que desees.
Puedes cambiarlo despues en la carpeta raiz del juego/Default.cfg '
id: REFRESH
options:
- '60': 60 Hz
- '75': 75 Hz
- '90': 90 Hz
- '100': 100 Hz
- '120': 120 Hz
- '144': 144 Hz
- '165': 165 Hz
- '240': 240 Hz
preselect: '60'
- input_menu:
description: '=== ENGLISH ===
Select the HUD Aspect Ratio.
This controls ONLY the HUD position, NOT the rendered aspect ratio.
You can change it later in plugins/W4M.Patch.ini
and by copying the files from /Mods/HUD Adapter %x% to /Data2
To change the rendering aspect ratio, you must change the resolution in Default.cfg
and in Lutris, under Game Settings > Advanced > System Options > Game Resolution.
=== SPANISH ===
Selecciona el ratio de aspecto del HUD.
Esto controla SOLAMENTE la posicion del HUD, NO el ratio de aspecto renderizado.
Puedes cambiarlo despues en el archivo /plugins/W4M.Patch.ini
Y copiando los archivos de /Mods/HUD Adapter %x% a /Data2
Para cambiar el ratio de aspecto del renderizado, debes cambiar la resolucion
en Default.cfg y en Lutris > Ajustes del juego > Avanzado > Opciones del sistema
> Resolucion del juego.
'
id: ASPRATIO
options:
- '326': 16:9 safe area / area segura
- '284': 16:10 safe area / area segura
- '468': 21:9 (64:27) full-width HUD / HUD completo
- '753': 32:9 full-width HUD / HUD 32:9 completo
preselect: '326'
- task:
arch: win64
description: Creating Wine prefix.
name: create_prefix
prefix: $GAMEDIR
- insert-disc:
message: Mount or insert a DRM-free Worms 4 Mayhem retail disc ('Mastertronic'
or 'Sold Out Software'), then continue.
requires: mteula.txt
- task:
description: 'Installing Base Game.
Do not change the installation directory or start the game after setup.
Reject GameSpy Arcade and shortcut creation if asked.
'
executable: $DISC/setup.exe
name: wineexec
prefix: $GAMEDIR
- execute:
command: chmod -R u+w "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms
4 Mayhem"
description: Making game directory writable
- execute:
command: 'curl -s "https://api.github.com/repos/heatray/W4MPatch/releases/latest"
\
| grep browser_download_url \
| grep ''W4MPatch.*\.zip'' \
| cut -d ''"'' -f 4 \
| head -n 1 \
| xargs wget --no-check-certificate -O "$CACHE/W4MPatch.zip"
'
description: Downloading newest Anniversary Patch from Heatray's GitHub
- extract:
description: Extracting Anniversary Patch
dst: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem
file: $CACHE/W4MPatch.zip
- execute:
command: "set -euo pipefail\n\nGAME_DIR=\"$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms\
\ 4 Mayhem\"\nMODS_DIR=\"$GAME_DIR/Mods\"\nDATA2_DIR=\"$GAME_DIR/Data2\"\n\n\
HUD_FOLDER=\"\"\n\ncase \"$INPUT_ASPRATIO\" in\n 326)\n echo \"16:9 selected.\
\ Its HUD files are already installed in Data2.\"\n ;;\n 284)\n HUD_FOLDER=\"\
HUD Adapter 16x10\"\n ;;\n 468)\n HUD_FOLDER=\"HUD Adapter 21x9\"\n \
\ ;;\n 753)\n HUD_FOLDER=\"HUD Adapter 32x9\"\n ;;\n *)\n echo\
\ \"Unsupported aspect ratio value: $INPUT_ASPRATIO\" >&2\n exit 1\n ;;\n\
esac\n\nif [ -n \"$HUD_FOLDER\" ]; then\n HUD_SOURCE=\"$MODS_DIR/$HUD_FOLDER\"\
\n\n if [ ! -d \"$HUD_SOURCE\" ]; then\n echo \"HUD adapter folder not found:\
\ $HUD_SOURCE\" >&2\n exit 1\n fi\n\n mkdir -p \"$DATA2_DIR\"\n cp -a\
\ \"$HUD_SOURCE/.\" \"$DATA2_DIR/\"\n\n echo \"Installed HUD adapter: $HUD_FOLDER\"\
\nfi\n"
description: Applying HUD adapter for the selected aspect ratio
- move:
description: Backing up the original Default.cfg
dst: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg.backup
src: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg
- write_file:
content: '/W:$RESOLUTION_WIDTH
/H:$RESOLUTION_HEIGHT
/FS
/WIN
/REFRESH:$INPUT_REFRESH
/TRIGGERSINVISIBLE
/STARTMENU:WXFE.MainMenu
/GAMEOVERMENU:WXFE.MainMenu
////////////////////////////////////////////
//CONFIG:launcher.cfg //_load_settings_from_the_file_launcher.cfg
//commented_because_launcher.cfg_overwrites_Default.cfg_settings
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_MANUAL_CAMERA_AND_SCREENSHOTS
//_MANUAL_CAMERA_TRIGGERED_BY_M_BUTTON
//_SCREENSHOT_TRIGGERED_BY_PRINTSCREEN_BUTTON
//ALLOWSCREENSHOTS
//MANUALCAMERA
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_EXTRA_DEBUGGING_INFO
//NET_LOG
//AITEST
'
description: Configuring widescreen resolution and refresh rate
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg
- write_file:
content: "[Main]\nAspectRatioFix = 1 // [0 = false, 1 = true]\nLandmineLodFix\
\ = 1 // Disables low-poly landmine model [0 = false, 1 = true]\nEnableAllLanguages\
\ = 1 // Allows to switch to more languages [0 = false, 1 = true]\nFrameInterval\
\ = 0 // Interval between frames (ms), experimental [Default = 16 = ~62\
\ FPS]\n\n[Window]\nBorderless = 1 // Creates window without borders\
\ (only in windowed mode) [Default = 0 = false, 1 = true]\n\n[GameSpy]\nHost\
\ = openspy.net // GameSpy server host / [Default = gamespy.com]\nMotdUrl\
\ = http://w4tweaks.gitlab.io/team17/openspy/mayhem/motd/\n \
\ // GameSpy MOTD base URL, previously hosted by Team17\n \
\ // http://www.team17.com/gamespy/mayhem/motd/ - default\n\
\ // http://w4tweaks.gitlab.io/team17/gamespy/mayhem/motd/\
\ - original MOTD content\n // http://localhost \
\ - disable MOTD popup\n \
\ // (GS Team17 stuff repo: https://gitlab.com/w4tweaks/team17)\n\n[HUD]\n\
// Secondary Weapon icon position\nSecondWeapon.Back.PosX = $INPUT_ASPRATIO\
\ // 220 - 4:3 default\n // 284 - 16:10\n \
\ // 326 - 16:9\n // 468 - 21:9\
\ (64:27)\n // 753 - 32:9\nSecondWeapon.Back.PosY\
\ = 200 // 200 - 4:3 default\n"
description: Configuring aspect ratio
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/plugins/W4M.Patch.ini
- write_file:
content: "Worms 4 Mayhem Anniversary Patch\n================================\n\
\nUnofficial patch for Worms 4 Mayhem.\n\nSupported EXE versions:\n- Euro 1.01\
\ No DRM\n- Euro 1.01 RELOADED\n\nW4Tweaks: http://w4tweaks.ucoz.ru\n\
W4Tweaks Discord: https://discord.gg/9Y6rKdBdpS\n\nFeatures\n--------\n\nW4M.Patch\n\
\n- AspectRatioFix - applies aspect ratio patches (Hor+/Vert+)\n- LandmineLodFix\
\ - disables low-poly landmine model\n- EnableAllLanguages - allows to switch\
\ to more languages (menu tweak required\nto include additional languages it\
\ the list)\n- FrameInterval - changes interval between frames to help with\
\ performance\nissues\n- Borderless - creates window without borders (only in\
\ windowed mode)\n- Host - changes GameSpy server address (openspy.net by default)\n\
- MotdUrl - changes GameSpy MOTD URL (preconfigured)\n- Hard-coded HUD tweaks\n\
\nW4M.Loader\n\n- Allows to load modified resources without replacing original\
\ files\nPlace modified XML, XOM or TGA files in the Data2 directory\n\nInstallation\n\
------------\n\nCopy content of archive to the Worms 4 Mayhem game directory.\n\
\nMods 16:9 UI tweaks and all languages select are already installed in the\n\
Data2 directory. If the aspect ratio is different from 16:9, copy files\nfrom\
\ the Mods directory for your aspect ratio to the Data2 directory with\nreplacement.\n\
\nCheck the ini files for available features.\n\n\n---- DEFAULT.CFG file ----\n\
This file gives parameters to the game for working using command line values.\n\
You can go to default.cfg and adjust it with your desired settings. Here are\
\ some command lines explained:\n/W:%NUM% - width\n/H:%NUM% - height\n/REFRESH:%NUM%\
\ - games FPS\n/NOMOVIES - to skip all video cutscenes\n/NOLOGOMOVIE - skip\
\ only the brand logo videos\n/WIN - run the game in borderless mode\n/SHOWOVERLAY\
\ - show FPS, cull, draw, wait, etc\nAll comands: https://gist.github.com/heatray/48fd8a7b45642ce0bb5fb2b4bc4b0b29\n\
\nRECOMMENDED: if your monitors aspect ratio is other than 16:9 go to /plugins/W4M.Patch.ini\n\
Adjust SecondWeapon.Back.PosX to your correct aspect ratio.\nAnd copy the files\
\ inside /Mods/HUD_Adapter_%your-aspect-ratio% to Data2_folder.\n\nBut if you\
\ only have a 16:9 monitor on Linux you ALSO have to do this:\n1- In Lutris,\
\ right click Worms 4 Mayhem \u2192 Settings \u2192 mark \"Advanced\" \u2192\
\ System Settings\n2- Activate \"Gamescope\", then add an Ultrawidescreen resolution\
\ in \"Game Resolution\", e.g: 2560x720\nIMPORTANT: if your monitor is 1080p\
\ 16:9, dont use an Ultrawidescreen 1080p resolution here because it may crash\
\ the game.\nInstead use 720p. Eg: 2560x720 (32:9), 1710x720 or 1706x720 (21:9)\n\
3- Save and play.\n"
description: Configuring README.txt
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/README.txt
wine:
overrides:
dinput8: n,b
description: Worms 4 Mayhem on Linux! *REQUIRES "SOLD OUT SOFTWARE" OR "MASTERTRONIC"
.ISO
game_slug: worms-4-mayhem
gogslug: ''
humblestoreid: ''
installer_slug: worms-4-mayhem-drm-free-dvd-anniver
name: 'Worms 4: Mayhem'
notes: "- Installs the game and applies the Anniversary Patch by Heatray.\r\nThis\
\ patch enables Online Multiplayer with OpenSpy and adds fixes.\r\n- This script\
\ automatically adjust the game to your monitor's resolution and allow you to choose\
\ FPS.\r\n- Sold Out Software release: https://archive.org/details/worms-4-mayhem_202301\r\
\n- Mastertronic release: https://archive.org/details/worms-4-mastertronics\r\n\r\
\n== technical info ==\r\n- Anniversary Patch settings: game folder \u2192 plugins\
\ \u2192 W4M.Patch.ini\r\n- To manually change resolution and fps: go to game folder\
\ \u2192 Default.cfg \u2192 replace the values of /H: and /W: to your desired resolution\
\ and write your desired framerate after /REFRESH:\r\n- To allow LAN multiplayer\
\ go to your Firewall \u2192 add many rules: Allow incoming traffic from any destination\
\ IP address on ports: 5911, 6667, 28900, 29900, 29901, 6500, 13139, 27900. (the\
\ ones listed in PCGamingWiki's page for Worms 4 Mayhem)\r\n- Suggested mod after\
\ installation: Renewation Mod."
runner: wine
script:
game:
exe: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/WORMS 4 MAYHEM.EXE
prefix: $GAMEDIR
working_dir: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem
installer:
- input_menu:
description: '=== ENGLISH ===
Select your monitors refresh rate
This adjust the game to your desired FPS
You can change this later in game root folder/Default.cfg
=== SPANISH ===
Selecciona la tasa de refresco de tu monitor.
Esto ajusta el juego a los FPS que desees.
Puedes cambiarlo despues en la carpeta raiz del juego/Default.cfg '
id: REFRESH
options:
- '60': 60 Hz
- '75': 75 Hz
- '90': 90 Hz
- '100': 100 Hz
- '120': 120 Hz
- '144': 144 Hz
- '165': 165 Hz
- '240': 240 Hz
preselect: '60'
- input_menu:
description: '=== ENGLISH ===
Select the HUD Aspect Ratio.
This controls ONLY the HUD position, NOT the rendered aspect ratio.
You can change it later in plugins/W4M.Patch.ini
and by copying the files from /Mods/HUD Adapter %x% to /Data2
To change the rendering aspect ratio, you must change the resolution in Default.cfg
and in Lutris, under Game Settings > Advanced > System Options > Game Resolution.
=== SPANISH ===
Selecciona el ratio de aspecto del HUD.
Esto controla SOLAMENTE la posicion del HUD, NO el ratio de aspecto renderizado.
Puedes cambiarlo despues en el archivo /plugins/W4M.Patch.ini
Y copiando los archivos de /Mods/HUD Adapter %x% a /Data2
Para cambiar el ratio de aspecto del renderizado, debes cambiar la resolucion
en Default.cfg y en Lutris > Ajustes del juego > Avanzado > Opciones del sistema
> Resolucion del juego.
'
id: ASPRATIO
options:
- '326': 16:9 safe area / area segura
- '284': 16:10 safe area / area segura
- '468': 21:9 (64:27) full-width HUD / HUD completo
- '753': 32:9 full-width HUD / HUD 32:9 completo
preselect: '326'
- task:
arch: win64
description: Creating Wine prefix.
name: create_prefix
prefix: $GAMEDIR
- insert-disc:
message: Mount or insert a DRM-free Worms 4 Mayhem retail disc ('Mastertronic'
or 'Sold Out Software'), then continue.
requires: mteula.txt
- task:
description: 'Installing Base Game.
Do not change the installation directory or start the game after setup.
Reject GameSpy Arcade and shortcut creation if asked.
'
executable: $DISC/setup.exe
name: wineexec
prefix: $GAMEDIR
- execute:
command: chmod -R u+w "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms
4 Mayhem"
description: Making game directory writable
- execute:
command: 'curl -s "https://api.github.com/repos/heatray/W4MPatch/releases/latest"
\
| grep browser_download_url \
| grep ''W4MPatch.*\.zip'' \
| cut -d ''"'' -f 4 \
| head -n 1 \
| xargs wget --no-check-certificate -O "$CACHE/W4MPatch.zip"
'
description: Downloading newest Anniversary Patch from Heatray's GitHub
- extract:
description: Extracting Anniversary Patch
dst: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem
file: $CACHE/W4MPatch.zip
- execute:
command: "set -euo pipefail\n\nGAME_DIR=\"$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms\
\ 4 Mayhem\"\nMODS_DIR=\"$GAME_DIR/Mods\"\nDATA2_DIR=\"$GAME_DIR/Data2\"\n\
\nHUD_FOLDER=\"\"\n\ncase \"$INPUT_ASPRATIO\" in\n 326)\n echo \"16:9\
\ selected. Its HUD files are already installed in Data2.\"\n ;;\n 284)\n\
\ HUD_FOLDER=\"HUD Adapter 16x10\"\n ;;\n 468)\n HUD_FOLDER=\"HUD\
\ Adapter 21x9\"\n ;;\n 753)\n HUD_FOLDER=\"HUD Adapter 32x9\"\n \
\ ;;\n *)\n echo \"Unsupported aspect ratio value: $INPUT_ASPRATIO\"\
\ >&2\n exit 1\n ;;\nesac\n\nif [ -n \"$HUD_FOLDER\" ]; then\n HUD_SOURCE=\"\
$MODS_DIR/$HUD_FOLDER\"\n\n if [ ! -d \"$HUD_SOURCE\" ]; then\n echo \"\
HUD adapter folder not found: $HUD_SOURCE\" >&2\n exit 1\n fi\n\n mkdir\
\ -p \"$DATA2_DIR\"\n cp -a \"$HUD_SOURCE/.\" \"$DATA2_DIR/\"\n\n echo \"\
Installed HUD adapter: $HUD_FOLDER\"\nfi\n"
description: Applying HUD adapter for the selected aspect ratio
- move:
description: Backing up the original Default.cfg
dst: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg.backup
src: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg
- write_file:
content: '/W:$RESOLUTION_WIDTH
/H:$RESOLUTION_HEIGHT
/FS
/WIN
/REFRESH:$INPUT_REFRESH
/TRIGGERSINVISIBLE
/STARTMENU:WXFE.MainMenu
/GAMEOVERMENU:WXFE.MainMenu
////////////////////////////////////////////
//CONFIG:launcher.cfg //_load_settings_from_the_file_launcher.cfg
//commented_because_launcher.cfg_overwrites_Default.cfg_settings
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_MANUAL_CAMERA_AND_SCREENSHOTS
//_MANUAL_CAMERA_TRIGGERED_BY_M_BUTTON
//_SCREENSHOT_TRIGGERED_BY_PRINTSCREEN_BUTTON
//ALLOWSCREENSHOTS
//MANUALCAMERA
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_EXTRA_DEBUGGING_INFO
//NET_LOG
//AITEST
'
description: Configuring widescreen resolution and refresh rate
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg
- write_file:
content: "[Main]\nAspectRatioFix = 1 // [0 = false, 1 = true]\nLandmineLodFix\
\ = 1 // Disables low-poly landmine model [0 = false, 1 = true]\nEnableAllLanguages\
\ = 1 // Allows to switch to more languages [0 = false, 1 = true]\nFrameInterval\
\ = 0 // Interval between frames (ms), experimental [Default = 16 =\
\ ~62 FPS]\n\n[Window]\nBorderless = 1 // Creates window without\
\ borders (only in windowed mode) [Default = 0 = false, 1 = true]\n\n[GameSpy]\n\
Host = openspy.net // GameSpy server host / [Default = gamespy.com]\n\
MotdUrl = http://w4tweaks.gitlab.io/team17/openspy/mayhem/motd/\n \
\ // GameSpy MOTD base URL, previously hosted by Team17\n \
\ // http://www.team17.com/gamespy/mayhem/motd/ \
\ - default\n // http://w4tweaks.gitlab.io/team17/gamespy/mayhem/motd/\
\ - original MOTD content\n // http://localhost \
\ - disable MOTD popup\n \
\ // (GS Team17 stuff repo: https://gitlab.com/w4tweaks/team17)\n\n\
[HUD]\n// Secondary Weapon icon position\nSecondWeapon.Back.PosX = $INPUT_ASPRATIO\
\ // 220 - 4:3 default\n // 284 - 16:10\n \
\ // 326 - 16:9\n // 468\
\ - 21:9 (64:27)\n // 753 - 32:9\nSecondWeapon.Back.PosY\
\ = 200 // 200 - 4:3 default\n"
description: Configuring aspect ratio
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/plugins/W4M.Patch.ini
- write_file:
content: "Worms 4 Mayhem Anniversary Patch\n================================\n\
\nUnofficial patch for Worms 4 Mayhem.\n\nSupported EXE versions:\n- Euro\
\ 1.01 No DRM\n- Euro 1.01 RELOADED\n\nW4Tweaks: http://w4tweaks.ucoz.ru\n\
W4Tweaks Discord: https://discord.gg/9Y6rKdBdpS\n\nFeatures\n--------\n\n\
W4M.Patch\n\n- AspectRatioFix - applies aspect ratio patches (Hor+/Vert+)\n\
- LandmineLodFix - disables low-poly landmine model\n- EnableAllLanguages\
\ - allows to switch to more languages (menu tweak required\nto include additional\
\ languages it the list)\n- FrameInterval - changes interval between frames\
\ to help with performance\nissues\n- Borderless - creates window without\
\ borders (only in windowed mode)\n- Host - changes GameSpy server address\
\ (openspy.net by default)\n- MotdUrl - changes GameSpy MOTD URL (preconfigured)\n\
- Hard-coded HUD tweaks\n\nW4M.Loader\n\n- Allows to load modified resources\
\ without replacing original files\nPlace modified XML, XOM or TGA files in\
\ the Data2 directory\n\nInstallation\n------------\n\nCopy content of archive\
\ to the Worms 4 Mayhem game directory.\n\nMods 16:9 UI tweaks and all languages\
\ select are already installed in the\nData2 directory. If the aspect ratio\
\ is different from 16:9, copy files\nfrom the Mods directory for your aspect\
\ ratio to the Data2 directory with\nreplacement.\n\nCheck the ini files for\
\ available features.\n\n\n---- DEFAULT.CFG file ----\nThis file gives parameters\
\ to the game for working using command line values.\nYou can go to default.cfg\
\ and adjust it with your desired settings. Here are some command lines explained:\n\
/W:%NUM% - width\n/H:%NUM% - height\n/REFRESH:%NUM% - games FPS\n/NOMOVIES\
\ - to skip all video cutscenes\n/NOLOGOMOVIE - skip only the brand logo\
\ videos\n/WIN - run the game in borderless mode\n/SHOWOVERLAY - show FPS,\
\ cull, draw, wait, etc\nAll comands: https://gist.github.com/heatray/48fd8a7b45642ce0bb5fb2b4bc4b0b29\n\
\nRECOMMENDED: if your monitors aspect ratio is other than 16:9 go to /plugins/W4M.Patch.ini\n\
Adjust SecondWeapon.Back.PosX to your correct aspect ratio.\nAnd copy the\
\ files inside /Mods/HUD_Adapter_%your-aspect-ratio% to Data2_folder.\n\n\
But if you only have a 16:9 monitor on Linux you ALSO have to do this:\n1-\
\ In Lutris, right click Worms 4 Mayhem \u2192 Settings \u2192 mark \"Advanced\"\
\ \u2192 System Settings\n2- Activate \"Gamescope\", then add an Ultrawidescreen\
\ resolution in \"Game Resolution\", e.g: 2560x720\nIMPORTANT: if your monitor\
\ is 1080p 16:9, dont use an Ultrawidescreen 1080p resolution here because\
\ it may crash the game.\nInstead use 720p. Eg: 2560x720 (32:9), 1710x720\
\ or 1706x720 (21:9)\n3- Save and play.\n"
description: Configuring README.txt
file: $GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/README.txt
wine:
overrides:
dinput8: n,b
slug: worms-4-mayhem-drm-free-dvd-anniver
steamid: null
version: DRM-free DVD + Anniversary Patch
year: 2005
{
"game_slug": "worms-4-mayhem",
"version": "DRM-free DVD + Anniversary Patch",
"description": "Worms 4 Mayhem on Linux! *REQUIRES \"SOLD OUT SOFTWARE\" OR \"MASTERTRONIC\" .ISO",
"notes": "- Installs the game and applies the Anniversary Patch by Heatray.\r\nThis patch enables Online Multiplayer with OpenSpy and adds fixes.\r\n- This script automatically adjust the game to your monitor's resolution and allow you to choose FPS.\r\n- Sold Out Software release: https://archive.org/details/worms-4-mayhem_202301\r\n- Mastertronic release: https://archive.org/details/worms-4-mastertronics\r\n\r\n== technical info ==\r\n- Anniversary Patch settings: game folder \u2192 plugins \u2192 W4M.Patch.ini\r\n- To manually change resolution and fps: go to game folder \u2192 Default.cfg \u2192 replace the values of /H: and /W: to your desired resolution and write your desired framerate after /REFRESH:\r\n- To allow LAN multiplayer go to your Firewall \u2192 add many rules: Allow incoming traffic from any destination IP address on ports: 5911, 6667, 28900, 29900, 29901, 6500, 13139, 27900. (the ones listed in PCGamingWiki's page for Worms 4 Mayhem)\r\n- Suggested mod after installation: Renewation Mod.",
"name": "Worms 4: Mayhem",
"year": 2005,
"steamid": null,
"gogslug": "",
"humblestoreid": "",
"runner": "wine",
"slug": "worms-4-mayhem-drm-free-dvd-anniver",
"installer_slug": "worms-4-mayhem-drm-free-dvd-anniver",
"script": {
"game": {
"exe": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/WORMS 4 MAYHEM.EXE",
"prefix": "$GAMEDIR",
"working_dir": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem"
},
"installer": [
{
"input_menu": {
"description": "=== ENGLISH ===\nSelect your monitors refresh rate\nThis adjust the game to your desired FPS\n\nYou can change this later in game root folder/Default.cfg\n\n=== SPANISH ===\nSelecciona la tasa de refresco de tu monitor.\nEsto ajusta el juego a los FPS que desees.\n\nPuedes cambiarlo despues en la carpeta raiz del juego/Default.cfg ",
"id": "REFRESH",
"options": [
{
"60": "60 Hz"
},
{
"75": "75 Hz"
},
{
"90": "90 Hz"
},
{
"100": "100 Hz"
},
{
"120": "120 Hz"
},
{
"144": "144 Hz"
},
{
"165": "165 Hz"
},
{
"240": "240 Hz"
}
],
"preselect": "60"
}
},
{
"input_menu": {
"description": "=== ENGLISH ===\nSelect the HUD Aspect Ratio.\nThis controls ONLY the HUD position, NOT the rendered aspect ratio.\n\nYou can change it later in plugins/W4M.Patch.ini\nand by copying the files from /Mods/HUD Adapter %x% to /Data2\n\nTo change the rendering aspect ratio, you must change the resolution in Default.cfg and in Lutris, under Game Settings > Advanced > System Options > Game Resolution.\n\n=== SPANISH ===\nSelecciona el ratio de aspecto del HUD.\nEsto controla SOLAMENTE la posicion del HUD, NO el ratio de aspecto renderizado.\n\nPuedes cambiarlo despues en el archivo /plugins/W4M.Patch.ini\nY copiando los archivos de /Mods/HUD Adapter %x% a /Data2\n\nPara cambiar el ratio de aspecto del renderizado, debes cambiar la resolucion en Default.cfg y en Lutris > Ajustes del juego > Avanzado > Opciones del sistema > Resolucion del juego.\n",
"id": "ASPRATIO",
"options": [
{
"326": "16:9 safe area / area segura"
},
{
"284": "16:10 safe area / area segura"
},
{
"468": "21:9 (64:27) full-width HUD / HUD completo"
},
{
"753": "32:9 full-width HUD / HUD 32:9 completo"
}
],
"preselect": "326"
}
},
{
"task": {
"arch": "win64",
"description": "Creating Wine prefix.",
"name": "create_prefix",
"prefix": "$GAMEDIR"
}
},
{
"insert-disc": {
"message": "Mount or insert a DRM-free Worms 4 Mayhem retail disc ('Mastertronic' or 'Sold Out Software'), then continue.",
"requires": "mteula.txt"
}
},
{
"task": {
"description": "Installing Base Game.\n\nDo not change the installation directory or start the game after setup.\nReject GameSpy Arcade and shortcut creation if asked.\n",
"executable": "$DISC/setup.exe",
"name": "wineexec",
"prefix": "$GAMEDIR"
}
},
{
"execute": {
"command": "chmod -R u+w \"$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem\"",
"description": "Making game directory writable"
}
},
{
"execute": {
"command": "curl -s \"https://api.github.com/repos/heatray/W4MPatch/releases/latest\" \\\n| grep browser_download_url \\\n| grep 'W4MPatch.*\\.zip' \\\n| cut -d '\"' -f 4 \\\n| head -n 1 \\\n| xargs wget --no-check-certificate -O \"$CACHE/W4MPatch.zip\"\n",
"description": "Downloading newest Anniversary Patch from Heatray's GitHub"
}
},
{
"extract": {
"description": "Extracting Anniversary Patch",
"dst": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem",
"file": "$CACHE/W4MPatch.zip"
}
},
{
"execute": {
"command": "set -euo pipefail\n\nGAME_DIR=\"$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem\"\nMODS_DIR=\"$GAME_DIR/Mods\"\nDATA2_DIR=\"$GAME_DIR/Data2\"\n\nHUD_FOLDER=\"\"\n\ncase \"$INPUT_ASPRATIO\" in\n 326)\n echo \"16:9 selected. Its HUD files are already installed in Data2.\"\n ;;\n 284)\n HUD_FOLDER=\"HUD Adapter 16x10\"\n ;;\n 468)\n HUD_FOLDER=\"HUD Adapter 21x9\"\n ;;\n 753)\n HUD_FOLDER=\"HUD Adapter 32x9\"\n ;;\n *)\n echo \"Unsupported aspect ratio value: $INPUT_ASPRATIO\" >&2\n exit 1\n ;;\nesac\n\nif [ -n \"$HUD_FOLDER\" ]; then\n HUD_SOURCE=\"$MODS_DIR/$HUD_FOLDER\"\n\n if [ ! -d \"$HUD_SOURCE\" ]; then\n echo \"HUD adapter folder not found: $HUD_SOURCE\" >&2\n exit 1\n fi\n\n mkdir -p \"$DATA2_DIR\"\n cp -a \"$HUD_SOURCE/.\" \"$DATA2_DIR/\"\n\n echo \"Installed HUD adapter: $HUD_FOLDER\"\nfi\n",
"description": "Applying HUD adapter for the selected aspect ratio"
}
},
{
"move": {
"description": "Backing up the original Default.cfg",
"dst": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg.backup",
"src": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg"
}
},
{
"write_file": {
"content": "/W:$RESOLUTION_WIDTH\n/H:$RESOLUTION_HEIGHT\n/FS\n/WIN\n/REFRESH:$INPUT_REFRESH\n/TRIGGERSINVISIBLE\n/STARTMENU:WXFE.MainMenu\n/GAMEOVERMENU:WXFE.MainMenu\n\n////////////////////////////////////////////\n//CONFIG:launcher.cfg //_load_settings_from_the_file_launcher.cfg\n//commented_because_launcher.cfg_overwrites_Default.cfg_settings\n\n/////////////////////////////////////////////////////////////\n//_UNCOMMENT_LINES_BELOW_FOR_MANUAL_CAMERA_AND_SCREENSHOTS\n//_MANUAL_CAMERA_TRIGGERED_BY_M_BUTTON\n//_SCREENSHOT_TRIGGERED_BY_PRINTSCREEN_BUTTON\n\n//ALLOWSCREENSHOTS\n//MANUALCAMERA\n\n\n/////////////////////////////////////////////////////////////\n//_UNCOMMENT_LINES_BELOW_FOR_EXTRA_DEBUGGING_INFO\n\n//NET_LOG\n//AITEST\n",
"description": "Configuring widescreen resolution and refresh rate",
"file": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/Default.cfg"
}
},
{
"write_file": {
"content": "[Main]\nAspectRatioFix = 1 // [0 = false, 1 = true]\nLandmineLodFix = 1 // Disables low-poly landmine model [0 = false, 1 = true]\nEnableAllLanguages = 1 // Allows to switch to more languages [0 = false, 1 = true]\nFrameInterval = 0 // Interval between frames (ms), experimental [Default = 16 = ~62 FPS]\n\n[Window]\nBorderless = 1 // Creates window without borders (only in windowed mode) [Default = 0 = false, 1 = true]\n\n[GameSpy]\nHost = openspy.net // GameSpy server host / [Default = gamespy.com]\nMotdUrl = http://w4tweaks.gitlab.io/team17/openspy/mayhem/motd/\n // GameSpy MOTD base URL, previously hosted by Team17\n // http://www.team17.com/gamespy/mayhem/motd/ - default\n // http://w4tweaks.gitlab.io/team17/gamespy/mayhem/motd/ - original MOTD content\n // http://localhost - disable MOTD popup\n // (GS Team17 stuff repo: https://gitlab.com/w4tweaks/team17)\n\n[HUD]\n// Secondary Weapon icon position\nSecondWeapon.Back.PosX = $INPUT_ASPRATIO // 220 - 4:3 default\n // 284 - 16:10\n // 326 - 16:9\n // 468 - 21:9 (64:27)\n // 753 - 32:9\nSecondWeapon.Back.PosY = 200 // 200 - 4:3 default\n",
"description": "Configuring aspect ratio",
"file": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/plugins/W4M.Patch.ini"
}
},
{
"write_file": {
"content": "Worms 4 Mayhem Anniversary Patch\n================================\n\nUnofficial patch for Worms 4 Mayhem.\n\nSupported EXE versions:\n- Euro 1.01 No DRM\n- Euro 1.01 RELOADED\n\nW4Tweaks: http://w4tweaks.ucoz.ru\nW4Tweaks Discord: https://discord.gg/9Y6rKdBdpS\n\nFeatures\n--------\n\nW4M.Patch\n\n- AspectRatioFix - applies aspect ratio patches (Hor+/Vert+)\n- LandmineLodFix - disables low-poly landmine model\n- EnableAllLanguages - allows to switch to more languages (menu tweak required\nto include additional languages it the list)\n- FrameInterval - changes interval between frames to help with performance\nissues\n- Borderless - creates window without borders (only in windowed mode)\n- Host - changes GameSpy server address (openspy.net by default)\n- MotdUrl - changes GameSpy MOTD URL (preconfigured)\n- Hard-coded HUD tweaks\n\nW4M.Loader\n\n- Allows to load modified resources without replacing original files\nPlace modified XML, XOM or TGA files in the Data2 directory\n\nInstallation\n------------\n\nCopy content of archive to the Worms 4 Mayhem game directory.\n\nMods 16:9 UI tweaks and all languages select are already installed in the\nData2 directory. If the aspect ratio is different from 16:9, copy files\nfrom the Mods directory for your aspect ratio to the Data2 directory with\nreplacement.\n\nCheck the ini files for available features.\n\n\n---- DEFAULT.CFG file ----\nThis file gives parameters to the game for working using command line values.\nYou can go to default.cfg and adjust it with your desired settings. Here are some command lines explained:\n/W:%NUM% - width\n/H:%NUM% - height\n/REFRESH:%NUM% - games FPS\n/NOMOVIES - to skip all video cutscenes\n/NOLOGOMOVIE - skip only the brand logo videos\n/WIN - run the game in borderless mode\n/SHOWOVERLAY - show FPS, cull, draw, wait, etc\nAll comands: https://gist.github.com/heatray/48fd8a7b45642ce0bb5fb2b4bc4b0b29\n\nRECOMMENDED: if your monitors aspect ratio is other than 16:9 go to /plugins/W4M.Patch.ini\nAdjust SecondWeapon.Back.PosX to your correct aspect ratio.\nAnd copy the files inside /Mods/HUD_Adapter_%your-aspect-ratio% to Data2_folder.\n\nBut if you only have a 16:9 monitor on Linux you ALSO have to do this:\n1- In Lutris, right click Worms 4 Mayhem \u2192 Settings \u2192 mark \"Advanced\" \u2192 System Settings\n2- Activate \"Gamescope\", then add an Ultrawidescreen resolution in \"Game Resolution\", e.g: 2560x720\nIMPORTANT: if your monitor is 1080p 16:9, dont use an Ultrawidescreen 1080p resolution here because it may crash the game.\nInstead use 720p. Eg: 2560x720 (32:9), 1710x720 or 1706x720 (21:9)\n3- Save and play.\n",
"description": "Configuring README.txt",
"file": "$GAMEDIR/drive_c/Program Files (x86)/Codemasters/Worms 4 Mayhem/README.txt"
}
}
],
"wine": {
"overrides": {
"dinput8": "n,b"
}
}
}
}