Installer overwatch-connection-error-bat

This script is for reference only and can't be directly used to install the game in the Lutris client. To install the game, download the full script.

files:
- cache-updater: https://lutris.nyc3.cdn.digitaloceanspaces.com/games/overwatch/state-cache-update.sh
- setup:
    filename: Battle.net-Setup.exe
    url: https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP&id=1310538269.1566397192
- dxvkcache: https://lutris.nyc3.cdn.digitaloceanspaces.com/games/overwatch/Overwatch.tar.xz
game:
  arch: win64
  args: --exec="launch Pro"
  exe: drive_c/Program Files (x86)/Battle.net/Battle.net.exe
  prefix: $GAMEDIR
installer:
- task:
    arch: win64
    description: Creating 64bit Wine prefix.
    name: create_prefix
    prefix: $GAMEDIR
- extract:
    description: Extracting DXVK state cache
    dst: $GAMEDIR
    file: dxvkcache
- write_file:
    content: 'dxgi.nvapiHack = False

      [Overwatch.exe]

      dxvk.hud = compiler'
    file: $GAMEDIR/dxvk.conf
- write_file:
    content: "#!/bin/bash \n\nxmodmap -e 'keycode 37 = Control_R'\nxmodmap -e 'keycode\
      \ 105 = Control_L' "
    file: $GAMEDIR/ctrl_fix_start.sh
- write_file:
    content: "#!/bin/bash \n\nxmodmap -e 'keycode 37 = Control_L'\nxmodmap -e 'keycode\
      \ 105 = Control_R' "
    file: $GAMEDIR/ctrl_fix_stop.sh
- merge:
    dst: $GAMEDIR/state-cache-merge
    src: cache-updater
- chmodx: $GAMEDIR/ctrl_fix_start.sh
- chmodx: $GAMEDIR/ctrl_fix_stop.sh
- chmodx: $GAMEDIR/state-cache-merge/state-cache-update.sh
- task:
    app: arial
    arch: win64
    description: Installing Arial font...
    name: winetricks
    prefix: $GAMEDIR
    silent: true
- task:
    arch: win64
    description: Setting Windows 10 mode for Wine
    key: Version
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine
    prefix: $GAMEDIR
    value: win10
- task:
    name: winekill
    prefix: $GAMEDIR
- write_json:
    data:
      Client:
        GameLaunchWindowBehavior: '2'
        GameSearch:
          BackgroundSearch: 'true'
        HardwareAcceleration: 'false'
        Sound:
          Enabled: 'false'
        Streaming:
          StreamingEnabled: 'false'
    description: Writing a Battle.Net config file
    file: $GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config
- write_config:
    description: Enabling Borderless Windowed mode
    file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini
    key: WindowMode
    section: Render.13
    value: '"1"'
- write_config:
    description: Switching to WEBM format for saving Highlights
    file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini
    key: Type
    section: MovieExport.1
    value: '"1"'
- write_config:
    description: Disabling hardware acceleration for saving Highlights
    file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini
    key: UseHardware
    section: MovieExport.1
    value: '"0"'
- task:
    arch: win64
    description: 'Wine Staging: Enabling DXVA2'
    key: backend
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\DXVA2
    prefix: $GAMEDIR
    value: va
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    arch: win64
    description: 'Installing Blizzard App. An installer will open.

      ------------------------------

      To progress, manually continue installation in that window.'
    exclude_processes: Battle.net.exe Agent.exe "Battle.net Helper.exe"
    executable: setup
    name: wineexec
- task:
    name: winekill
    prefix: $GAMEDIR
system:
  env:
    DXVK_CONFIG_FILE: $GAMEDIR/dxvk.conf
    DXVK_STATE_CACHE_PATH: $GAMEDIR
    STAGING_SHARED_MEMORY: 1
    __GL_SHADER_DISK_CACHE: 1
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR
  exclude_processes: Agent.exe "Battle.net Helper.exe"
  manual_command: $GAMEDIR/state-cache-merge/state-cache-update.sh
  postexit_command: $GAMEDIR/ctrl_fix_stop.sh
  prelaunch_command: $GAMEDIR/ctrl_fix_start.sh
wine:
  dxvk: true
  esync: true
  overrides:
    d3d12: disabled
    nvapi: disabled
    nvapi64: disabled
  version: lutris-4.13-x86_64
{
  "wine": {
    "overrides": {
      "nvapi64": "disabled",
      "d3d12": "disabled",
      "nvapi": "disabled"
    },
    "esync": true,
    "dxvk": true,
    "version": "lutris-4.13-x86_64"
  },
  "game": {
    "exe": "drive_c/Program Files (x86)/Battle.net/Battle.net.exe",
    "args": "--exec=\"launch Pro\"",
    "arch": "win64",
    "prefix": "$GAMEDIR"
  },
  "system": {
    "env": {
      "DXVK_CONFIG_FILE": "$GAMEDIR/dxvk.conf",
      "__GL_SHADER_DISK_CACHE_PATH": "$GAMEDIR",
      "DXVK_STATE_CACHE_PATH": "$GAMEDIR",
      "__GL_SHADER_DISK_CACHE": 1,
      "STAGING_SHARED_MEMORY": 1
    },
    "postexit_command": "$GAMEDIR/ctrl_fix_stop.sh",
    "manual_command": "$GAMEDIR/state-cache-merge/state-cache-update.sh",
    "exclude_processes": "Agent.exe \"Battle.net Helper.exe\"",
    "prelaunch_command": "$GAMEDIR/ctrl_fix_start.sh"
  },
  "files": [
    {
      "cache-updater": "https://lutris.nyc3.cdn.digitaloceanspaces.com/games/overwatch/state-cache-update.sh"
    },
    {
      "setup": {
        "filename": "Battle.net-Setup.exe",
        "url": "https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP&id=1310538269.1566397192"
      }
    },
    {
      "dxvkcache": "https://lutris.nyc3.cdn.digitaloceanspaces.com/games/overwatch/Overwatch.tar.xz"
    }
  ],
  "installer": [
    {
      "task": {
        "name": "create_prefix",
        "description": "Creating 64bit Wine prefix.",
        "arch": "win64",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "extract": {
        "dst": "$GAMEDIR",
        "description": "Extracting DXVK state cache",
        "file": "dxvkcache"
      }
    },
    {
      "write_file": {
        "file": "$GAMEDIR/dxvk.conf",
        "content": "dxgi.nvapiHack = False\n[Overwatch.exe]\ndxvk.hud = compiler"
      }
    },
    {
      "write_file": {
        "file": "$GAMEDIR/ctrl_fix_start.sh",
        "content": "#!/bin/bash \n\nxmodmap -e 'keycode 37 = Control_R'\nxmodmap -e 'keycode 105 = Control_L' "
      }
    },
    {
      "write_file": {
        "file": "$GAMEDIR/ctrl_fix_stop.sh",
        "content": "#!/bin/bash \n\nxmodmap -e 'keycode 37 = Control_L'\nxmodmap -e 'keycode 105 = Control_R' "
      }
    },
    {
      "merge": {
        "dst": "$GAMEDIR/state-cache-merge",
        "src": "cache-updater"
      }
    },
    {
      "chmodx": "$GAMEDIR/ctrl_fix_start.sh"
    },
    {
      "chmodx": "$GAMEDIR/ctrl_fix_stop.sh"
    },
    {
      "chmodx": "$GAMEDIR/state-cache-merge/state-cache-update.sh"
    },
    {
      "task": {
        "prefix": "$GAMEDIR",
        "app": "arial",
        "name": "winetricks",
        "description": "Installing Arial font...",
        "arch": "win64",
        "silent": true
      }
    },
    {
      "task": {
        "path": "HKEY_CURRENT_USER\\Software\\Wine",
        "value": "win10",
        "prefix": "$GAMEDIR",
        "name": "set_regedit",
        "description": "Setting Windows 10 mode for Wine",
        "key": "Version",
        "arch": "win64"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "write_json": {
        "description": "Writing a Battle.Net config file",
        "data": {
          "Client": {
            "Sound": {
              "Enabled": "false"
            },
            "GameSearch": {
              "BackgroundSearch": "true"
            },
            "GameLaunchWindowBehavior": "2",
            "HardwareAcceleration": "false",
            "Streaming": {
              "StreamingEnabled": "false"
            }
          }
        },
        "file": "$GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini",
        "key": "WindowMode",
        "value": "\"1\"",
        "section": "Render.13",
        "description": "Enabling Borderless Windowed mode"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini",
        "key": "Type",
        "value": "\"1\"",
        "section": "MovieExport.1",
        "description": "Switching to WEBM format for saving Highlights"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini",
        "key": "UseHardware",
        "value": "\"0\"",
        "section": "MovieExport.1",
        "description": "Disabling hardware acceleration for saving Highlights"
      }
    },
    {
      "task": {
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\DXVA2",
        "value": "va",
        "prefix": "$GAMEDIR",
        "name": "set_regedit",
        "description": "Wine Staging: Enabling DXVA2",
        "key": "backend",
        "arch": "win64"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "executable": "setup",
        "name": "wineexec",
        "description": "Installing Blizzard App. An installer will open.\n------------------------------\nTo progress, manually continue installation in that window.",
        "arch": "win64",
        "exclude_processes": "Battle.net.exe Agent.exe \"Battle.net Helper.exe\""
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    }
  ]
}
Back to game