Difference between revisions of "Linux"

From Path of Diablo Wiki
Jump to: navigation, search
(How to install and run PoD with lutris on linux)
(Blanked the page)
Line 1: Line 1:
  
= How to run PoD under linux =
 
 
 
== Requirements ==
 
 
"Path of Diablo" mod works perfectly under Wine (just as vanilla D2:LoD does), but its launcher requires some additional configuration.<br />
 
All you'll need is a 32-bit Wine prefix with dotnet 4.0 on it, and the lib32-gnutls library
 
 
* Install ''lib32-gnutls'' package from your distro repositories to allow the Launcher from updating.
 
 
 
== Preparing prefix ==
 
 
Make sure you're using Xorg, not Wayland - there were issues with the latter.
 
 
* Install ''Wine'' and ''winetricks'' packages from your distro repositories:
 
 
<blockquote>Archlinux: '''pacman -S wine winetricks'''<br />
 
Debian: '''sudo apt install wine winetricks'''</blockquote>
 
 
* Create new win32 prefix with winecfg:
 
 
<blockquote><p>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 winecfg'''</p>
 
<pre style="color: red">Throughfully work out all wine errors it throws at you at this point</pre>
 
For example, ''ntlm_auth was not found'' error means you should install Samba package (in Archlinux, it may vary for other distos)
 
 
 
<p>If the winecfg window pops up, that means it's already configured the "prefix32" prefix folder in your user home directory as a x86 (32-bit) Windows.<br />
 
Ensure you have Windows 7 or higher selected in the drop-down window, as the Path of Diablo installer won't run on Windows XP, and close the window.</p></blockquote>
 
 
* Install dotnet4.0 with winetricks there:
 
 
<blockquote><p>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 winetricks'''</p>
 
<p>Select "Choose default wine prefix" on the first screen</p>
 
<p>Select "install DLL or Windows components" on the '''second''' screen, choose "dotnet40" option and press OK</p></blockquote>
 
 
== Installing the game ==
 
 
* Follow the [https://www.youtube.com/watch?v=yiy8qFtKIn8 download & installation guide here]. Make sure you get the English(US) version of the game from battlenet website.
 
 
<pre style="color: red">To run windows app with wine - always change directory (cd) to those containing exe-file!</pre>
 
 
* Fire up terminal, cd to directory with exe, run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine Downloader_Diablo2_enUS.exe'''</blockquote>
 
 
* same again but for expansion, run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine Downloader_Diablo2_Lord_of_Destruction_enUS.exe'''</blockquote>
 
 
* go to directory where you downloaded the classic game from the first downloader, run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine Installer.exe'''</blockquote>
 
 
* go to directory where you downloaded the expansion game from the second downloader, run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine installer.exe'''</blockquote>
 
 
* Install PoD launcher. As .msi files aren't executables, MAKE SURE TO USE "wine start"
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine start pathofdiablolauncher.msi'''</blockquote>
 
 
== Running Path of Diablo ==
 
 
* In terminal, enter Diablo II directory and then enter Path of Diablo directory which should be inside the Diablo II directory. If this isn't the case you must reinstall pod or you will get an error like "Some or more files are missing from your parent D2 installation". Inside Path of Diablo directory, run PoD launcher
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine Path\ of\ Diablo\ Launcher.exe'''</blockquote>
 
 
* The launcher may download some updates and restart itself. You can download updates from whichever download server when prompted.
 
* Press "Play" to start playing POD mod!
 
 
== Configuring Glide API wrapper ==
 
 
* Install ''lib32-libxinerama'' and ''lib32-libxcomposite'' packages from your distro repositories to allow the game to be played with Glide mode.
 
 
D2 in Glide mode works better and looks fancier. So, go inside Path of Diablo (not vanilla!) directory, run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine D2VidTst.exe'''</blockquote>
 
 
and select Glide. Next, run Glide configuration app
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine glide-init.exe'''</blockquote>
 
 
0. Press "test" - and do that after any settings change, to verify nothing is broken!
 
 
1. Press "English/Deutsch" button to switch language
 
 
2. Press "Query..." on OpenGL-infos tab and wait until you get you graphics subsystem capabilities
 
 
3. Check all boxes at Extensions tab (WGL_ARB_render_texture" should appear after OpenGL query)
 
 
4. On settings tab, uncheck vsync and select fps-limit 100 - game can go up to THOUSAND on modern systems! Remaining boxes on that tab is up to you.
 
 
5. On renderer tab, select maximum values for texture-memory and buffer-texture-size, 32-bit rendering, texture for videos, bilinear filtering, SUPERSAMPLING, and I personally keep shader-gamma/no gamma unchecked. You can also check keep desktop resolution - but it hits performance hard on old weak laptops (together with supersampling)
 
 
6. On wrapper-statistics tab, check "framerate" and select corner to show your game FPS
 
 
7. Press test for a last time, then Quit.
 
 
* Check '''-3dfx''' box in PoD launcher!
 
 
== Loot Filter and QoL settings ==
 
 
If you find your game crashing when interacting with the Settings button and its content, check this Reddit thread at: https://www.reddit.com/r/pathofdiablo/comments/6h2hju/linux_getting_qol_to_work/
 
 
 
== Running the game itself (vanilla D2) ==
 
 
* In terminal, enter Diablo II directory and run
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine D2VidTst.exe'''</blockquote>
 
 
Select any graphics API you want. Run the game
 
 
<blockquote>'''WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine Diablo\ II.exe'''</blockquote>
 
 
Game SHOULD work. If wine throws errors - in most cases you missing some packages. Google those errors, find the packages you need and install them. [https://wiki.archlinux.org/index.php/Wine|Wine-related article] on Archwiki can be helpful too.
 
 
= How to install and run PoD with lutris on linux =
 
 
== Requirements ==
 
 
* Diablo II: Lord of Destruction [https://lutris.net/games/diablo-ii-lord-of-destruction/] must be installed first
 
 
* Install ''lib32-gnutls'' package from your distro repositories to allow the Launcher to update.
 
 
* Install ''lib32-gstreamer'' package from your distro repositories to enable use of 3dfx OpenGL wrapper.
 
 
== Lutris installer technical notes ==
 
 
This will install Path of Diablo on top of Diablo II: Lord of Destruction. It requires the original game to be already installed but it will install in a new prefix and it will NOT touch original game files - PoD will live in its own folder but it will read game files (*.mpq, Game.exe, D2.LNG) from your Diablo II: LoD installation.
 
 
* 1. Diablo II: Lord of Destruction installation must be present and you will be asked to select the folder which contains the installed game files. Relative path symbolic links that point to original game files will be created inside a new wine prefix created for Path of Diablo.
 
* 2. Path of Diablo installer will require you to manually select path of the original game, just point it to "C:\Program Files\Diablo II" (it will look like an empty folder, that's ok).
 
* 3. When installation completes, installer will offer to start the launcher. Uncheck that, do not start yet, and just click "Finish" to complete the installation script.
 
 
When you first start the game from lutris, PoD launcher will download its game files. When it completes, select either -3dfx or -ddraw option and click "Launch" to start the game.
 
 
Installer is automating installation steps described here: https://pathofdiablo.com/wiki/index.php?title=Linux
 
Note: PoD ships with a custom glide3x.dll (upstream source: https://www.svenswrapper.de/english/whatis.html) and with a specific version of cnc-ddraw (upstream source: https://github.com/FunkyFr3sh/cnc-ddraw). The modded game has been tailored to work with those. The modded game is NOT compatible with lutris direct3d or dgvoodo2 and attempting to remove ddraw.dll override and use system's ddraw.dll will result in game crashes.
 
 
== Installation ==
 
 
Open your console and run the command: <code>exo-open lutris:path-of-diablo-online-installer</code>. Lutris should then automatically start, fetch the installer from lutris server and run the installer.
 
 
Alternatively, manually download the lutris script from [https://lutris.net/api/installers/path-of-diablo-online-installer] and open it using lutris GUI.
 
 
For information, the installer yaml script is replicated below:
 
 
    files:
 
    - podinstaller: https://pathofdiablo.com/pathofdiablolauncher.msi
 
    game:
 
      arch: win32
 
      exe: $GAMEDIR/$podpath/Path of Diablo/Path of Diablo Launcher.exe
 
      prefix: $GAMEDIR
 
    installer:
 
    - write_file:
 
        content: '#!/bin/bash
 
   
 
          file="$1"; hash="$2"; echo "[INFO] Verifying $(basename "$file") sha256 checksum...";
 
          if [ $(sha256sum "$file" | cut -c 1-64) = "$hash" ]; then echo "[INFO] ...checksum
 
          OK!"; else echo "[ERROR] ...checksum FAILED!"; exit 1; fi
 
   
 
          '
 
        file: $CACHE/checkhash.sh
 
    - execute:
 
        args: +x $CACHE/checkhash.sh
 
        file: chmod
 
    - execute:
 
        args: podinstaller $podinstaller_sha256
 
        file: $CACHE/checkhash.sh
 
    - execute:
 
        command: mkdir -p "$GAMEDIR/$podpath"
 
    - insert-disc:
 
        message: 'Please select a folder where you have Diablo II: Lord of Distruction
 
          installed (e.g. "~Games/diablo-ii-lord-of-destruction/drive_c/Program Files
 
          (x86)/Diablo II/"). The installer script will then make symbolic links to game
 
          files there, using relative paths, so that they may be read by Path of Diablo.'
 
        requires: d2exp.mpq
 
    - execute:
 
        command: ln -sr -t "$GAMEDIR/$podpath/" "$DISC"/{*.mpq,Game.exe,D2.LNG};
 
    - task:
 
        arch: win32
 
        install_gecko: false
 
        install_mono: false
 
        name: create_prefix
 
        prefix: $GAMEDIR
 
    - task:
 
        app: dotnet40
 
        name: winetricks
 
        silent: true
 
    - task:
 
        arch: win32
 
        executable: podinstaller
 
        name: wineexec
 
        prefix: $GAMEDIR
 
    - task:
 
        key: capturedmouse
 
        name: set_regedit
 
        path: HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
 
        type: REG_DWORD
 
        value: '00000001'
 
    - task:
 
        key: desktopresolution
 
        name: set_regedit
 
        path: HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
 
        type: REG_DWORD
 
        value: '00000001'
 
    - task:
 
        key: english
 
        name: set_regedit
 
        path: HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
 
        type: REG_DWORD
 
        value: '00000001'
 
    variables:
 
      podinstaller_sha256: 5ae13a26dea0507c8aff7da53992e86bd76956f8983d0bc71198d9eb98ea475a
 
      podpath: drive_c/Program Files/Diablo II
 
    wine:
 
      overrides:
 
        ddraw.dll: n
 

Revision as of 18:53, 10 February 2024