Install and Play Diablo II on Ubuntu

This article teaches you how to install, play and run Diablo II on Ubuntu.

Diablo Diablo II

Diablo Diablo II

If you don’t have Wine installed on your Ubuntu machine, read this post first.

Installing Diablo II

  1. Put your Diablo II Install CD in your cd/dvd drive.
  2. In the shell (Terminal), find out what media bay your Diablo II cd is in. In the shell, type:
    Code:
    wine /media/cdrom[your drive number]/install.exe If you use the tab key it helps locate the path; by tabbing when at "wine /media/" you'll see the different drive numbers; by the "1" and hitting tab, hopefully you'll see a the files on the Diablo II cd. You can also get the drive number from the shortcut on your desktop.
  3. In Diablo II Setup, click through the Diablo II splash screen click until you select "Install Diablo II".
  4. In Choose Installation Size, select "Full Version"- not single player or multi player.
  5. In License Agreement, select "Agree" if you agree to their Terms of Services (ToS).
  6. In Diablo II, enter the name.
  7. Enter your working 16 character Diablo II cd-key. Click "Ok".
  8. When prompted to choose install directory, leave it at the default (c:\Program Files\Diablo II). Click "OK".
  9. In Desktop Shortcut, do not create a desktop shortcut to Diablo II. Click "No".
  10. Install should begin.
  11. When prompted "Please insert the CD labeled 'Play Disc'". Swap out the Install disc with the Play disc.
  12. Close the media bay tray.
  13. Close the new window that just opened up showing the Diablo II Play disk contents.
  14. Click "Ok" in the Insert Disc install window. Your installation should continue.
  15. When prompted "Please insert the CD labeled 'Cinematics Disc'". Swap out the Play disc with the Cinematics disc.
  16. Close the media bay tray.
  17. Click "Ok" in the install window. Your installation should continue.
  18. When prompted "Please insert the CD labeled 'Install Disc". Swap out the Cinematic disc with the Install disc.
  19. Close the media bay tray.
  20. Click "Ok" in the install window. Your installation should continue.
  21. When prompted "Would you like to view the ReadMe now?", select "No".
  22. When prompted with the Register Diablo II Electronically window, click "No". Do not register the game.
  23. Click "Exit Installer". Close out until the Diablo II installation is done. Click "X" on the Diablo II installer window; do not close the WINE window.
  24. Optional: You might get prompted with the "Diablo II Setup- Video Test", click "Cancel". Do not run the video/graphic card test at this time.

Installing Diablo II Expansion

  1. Put your Diablo II Expansion CD in your cd/dvd drive.
  2. In the shell (Terminal), find out what media bay your Diablo II cd is in. Type
    Code:
    wine /media/cdrom[your drive number]/install.exe.
    If you use the tab key it helps locate the path; by tabbing when at "wine /media/" you'll see the different drive numbers; by the "01" and hitting tab, hopefully you'll see a the files on the Diablo II Expansion cd.
  3. Diablo II : Lord of Destruction Setup, when prompted with the Diablo II splash screen, click "Upgrade To Lord Of Destruction (800mb)".
  4. In License Agreement, select "Agree" if you agree to their Terms of Services (ToS).
  5. Enter your working 16 character Diablo II Expansion cd-key, then click "Ok".
  6. When prompted to create a desktop shortcut, select either "Yes".
  7. Install should begin.
  8. When prompted "Please insert the Diablo II CD labeled 'Play Disc'". Swap out the Expansion cd with the Play cd.
  9. Close the media bay tray.
  10. Click "Ok" in the install window. Your installation should.
  11. When prompted "Please insert the Diablo II CD labeled 'Expansion Disc'". Swap out the Play cd with the Expansion cd.
  12. Close the media bay tray.
  13. Click "Ok" in the install window. Your installation should continue.
  14. When prompted "Would you like to view the ReadMe now?", select "No".
  15. When prompted with the Register Diablo II: Lord of Destruction Electronically window, click "No". Do not register the game. Do not register the Game.
  16. Click "Upgrade Installation" in the Diablo II: Lord of Destruction Setup window.
  17. Click "Upgrade from Multi-player to Full".
  18. Click "Exit Installer". The Wine window should close.

Installing Diablo II Expansion patch
There are two ways to patch the Diablo II, either let the game auto update when you first connect to Battle.net or download and install the patch using the shell (Terminal).

To install using the shell (Terminal).

  1. Go to BattleNet
  2. Download the Expansion Windows version 1.11b Upgrade Patch. Save it to your Desktop. Wait until the patch is completely downloaded before proceeding.
  3. In your shell, type:
    Code:
    wine /home/[your username]/Desktop/LODPatch_111b.exe
  4. When the patch is finished installing, click "Ok". The WINE window should close; if it does not close, close it.

Running the Video Test

  1. In your shell, type
    Code:
    wine /home/[your username]/.wine/drive_c/Program\ Files/Diablo\ II/D2VidTst.exe.
  2. When prompted with the Diablo II Setup- Video Test, click "Run Test".
  3. In the Video Test Complete window, click "Ok". Leave whatever radial option was set to. The WINE window should close.

Minor Troubleshooting
Ok, so let's test this out and possibly jump on BattleNet to pown some noobs (j/k I suck at pvp).
To start D2, go to Applications > Wine > Programs > Diablo II. Hopefully, everything starts right up and works for you. If not, here are some problems that I had.

  1. CD-missing
    In the shell (Terminal), type winecfg. In the Drives tab, click "Autodetect".
  2. Poor graphics
    In the shell, type winecfg. In the Graphics tab, check "Emulate a virtual desktop". Depending on you resolution, set it to a standard size (1024x768, 800x600, etc...).
    Another thing you can do is run the D2VidTest.exe. In your shell, type
    Code:
    wine /home/[your username]/.wine/drive_c/Program\ Files/Diablo\ II/D2VidTst.exe
    Click "run", wait for the test and select 2D instead of 3D.
  3. Poor Sound
    In the shell, type winecfg. In the Audio tab, make sure ALSA Driver is the only one checked.
  4. Laggy/jumping sound and graphics and jumpy/slow mouse control.
    After many attempts and conversations in the #winehq, I figured out a solution to this. The video setting for the game were too high, thus causing pc to work overtime. Rerun the Diablo II video test and change the settings to a lower setting. Also in the shell, type winecfg; in the Graphics tab, check "Emulate a virtual desktop". Depending on you resolution, set it to a standard size.
  5. Failed D2VidTst.exe
    In your shell, type
    Code:
    wine /home/[your username]/.wine/drive_c/Program\ Files/Diablo\ II/D2VidTst.exe
    Click "Cancel" and then select the default 2D graphics option.
    If your fail the D2VidTst.exe and you have no option to choose a setting, it means you do not have the drivers for your graphics card working properly. You'll still be able to play D2 even if you fail the D2VidTst.exe.

  6. Install Hangs/Freezes
    The most common problem when installing is when someone says the install hangs or freezes. Most likely the windows informing you to switch CDs is behind another window. To resolve this, you might have to abort your current install. The in the shell type "winecfg", goto the Graphics tab and uncheck "Allow the Window Manager to control windows". Trying reinstalling D2 now.

Getting D2Loader to work

  1. Obtain a copy of D2Loader. I don't know where you can get a copy of it.
  2. In your /home/[your username]/.wine/drive_c/Program Files/Diablo II/ directory, rename Diablo II.exe to Diablo II_orig.exe.
  3. Copy D2Loader into /home/[your username]/.wine/drive_c/Program Files/Diablo II/.
  4. Rename D2Loader to Diablo II.exe

Playing Diablo II without a CD
Requirements: D2Loader properly installed

  1. Copy d2xmusic.mpq from your Diablo II Expansion CD to /home/[your username]/.wine/drive_c/Program Files/Diablo II/ directory.

Playing Multiple instances of Diablo II
I must provide partial credit of this to Murraysw on the Ubuntu forums. Murraysw's original post can be found here: http://ubuntuforums.org/showthread.php?t=438724.

  1. Download a copy of Onlyer's CD Key Refiller. I don't know where you can get a copy of it.
  2. Read the instructions as to how to refill create the mpqs.Mmurraysw's directions might be helpful to you depending on what "version" of Onlyer's you have. Murraysw's directions are straight forward to key refilling as in Windows.
    I had to do the following:
  3. Make a copy of your registry settings. In the shell, type:
    Code:
    cp ~/.wine/user.reg user.reg.backup
  4. I was unable to run the registry file as in the Onlyer's CD Key Refiller so I manually added the settings to the Wine registry. In the shell, type
    Code:
    gedit ~/.wine/user.reg
  5. Look for the Entry similar to [Software\\Blizzard Entertainment\\Diablo II] 1179110567. In that stanza add the registry settings similar to registry settings provided in the Onlyer download and save the file.
    Note how I copied the registry settings to the bottom of the stanza. Mine looked like this:
    Code:
    [Software\\Blizzard Entertainment\\Diablo II] 1179110567
    "AllowHardcore"=dword:00000001
    "Always Run"=dword:00000001
    "AutoMap Left"=dword:00000001
    "AutoMapFade"=dword:00000000
    "AutoMapMode"=dword:00000000
    "Aux Battle.net"="216.148.XXX.XXX"

    "Blended Shadows"=dword:00000000
    "CmdLine"="-skiptobnet"
    "Contrast"=dword:00000064
    "DiabloIICD"="D:"
    "DIFF_LEVEL"=dword:00000002
    "GAMEOVER"=dword:00000000
    "Gamma"=dword:0000009b

    "Help Menu"=dword:00000001
    "InstallPath"="c:\\Program Files\\Diablo II"
    "Last BNet"="the-catalyst"
    "Light Quality"=dword:00000000
    "LVL_REST"=dword:0000029a
    "MAX_PLAYER"=dword:00000004
    "Mini Panel"=dword:00000001

    "Music Volume"=dword:00000000
    "NPC Speech"=dword:00000002
    "Options Music"=dword:00000000
    "PopupHireling"=dword:00000001
    "Preferred Realm"="USWest"
    "Program"="c:\\Program Files\\Diablo II\\Diablo II.exe"
    "Resolution"=dword:00000001

    "Save Path"="c:\\Program Files\\Diablo II\\save\\"
    "Skip To Open"=dword:00000000
    "SmallInstall"=dword:00000000
    "Text Display Beta"=dword:00000001
    "UseCmdLine"=dword:00000000
    "owner"="Erin<3Maynard"

    "d2cdkey"="MYCDKEYWITHOUTDASHES"
    "d2xcdkey"="ANOTHERKEYNODASHES"
    "d2cdkeympq"="cdkey_erin.mpq"
    "d2xcdkeympq"="cdkey_erin.mpq"

  6. Copy the .mpq file provided with Onlyer package to your D2 directory. In the shell, you'll type something similar to:
    Code:
    cp [path]/[name of generic mpq] ~/.wine/drive_c/Program\ Files/Diablo\ II/[name of the file you specified in your registry]
    I typed cp blank.mpq ~/.wine/drive_c/Program\ Files/Diablo\ II/cdkey_erin.mpq.

  7. Copy Onlyer's CD Key Refiller to your D2 directory. In the shell, you'll type something similar to:
    Code:
    cp [path]/[name of Onlyer's CD Key Refiller] ~/.wine/drive_c/Program\ Files/Diablo\ II/
  8. Run Onlyer's CD Key Refiller. In your shell, type:
    Code:
    wine ~/.wine/drive_c/Program\ Files/Diablo\ II/[name of Onlyer's CD Key Refiller]
    I typed wine ~/.wine/drive_c/Program\ Files/Diablo\ II/d2-cdkey.exe.

  9. In the Refiller, select "Refill both CD Keys". It may ask you for what directory Diablo 2 is installed; if it does, navigate it to you C:Program Files/Diablo II directory.
  10. If you've had no problems so far then you need to make a copy of your Wine directory to allow multiple D2 Wine instances to be able to open at the same time. In the shell, type:
    Code:
    cd ~/
    cp -r .wine .wine2
  11. On your desktop, copy your Diablo II Wine launcher.
  12. Right Click on the copy and rename it to "Diablo II- 2".
  13. Now you need to change the properties to it to launch a new Wine instance of it. Right click on the the "Diablo II- 2" and select Launcher.
  14. In the command, change it to
    Code:
    env WINEPREFIX="/home/[your username]/.wine2" wine "C:\Program Files\Diablo II\Diablo II.exe" -d3d9 -mpq [file name].mpq
    I typed: env WINEPREFIX="/home/erin/.wine2" wine "C:\Program Files\Diablo II\Diablo II.exe" -d3d9 -mpq cdkey_erin.mpq
  15. Repeat the steps as necessary for more instances of D2.

As an alternative to using Onlyer's CD Key Refiller and going through all those steps, if you already have the mpq files from a Windows box, just copy them over and change the short-cut to them.

Botting for Diablo II

I know of two well known bots- D2JSP and mmBot- both are geared for Windows. Since D2JSP is detectable, and is the Devil, I have no intention or motivation to discuss it further.

I have tried mmBot .544b8u3 on Wine and was able to get it to sequence through multiple runs. There seems to be two major problems: 1) stand skill not working (even after changing to 'g' instead of 'SHIFT'), and 2) read items on ground key not working (even after changing to 'c' instead of 'ALT'). Minor problems are: very low initiate run when entering room, reading items when selling to Mala and launching and finding the town portal, very long run time for ESP runs- like about 500 seconds per run. The 'END', INSERT' and 'PAUSE' keys don't work. But, like I said, only 2 major problems...

I've left the bot cycle through and basically the merc kills everything. It paths correctly though.

Keep you posted it seems other fellow mmBotters are taking an interest to mmBotting on Linux with Wine.

Maphack for Diablo II
I don't use maphack, but based on DARKGuy's post on the Ubuntu forum I was able to create rough instructions for maphack (I don't even know which maphack it is):

  1. Download d2hackit.
  2. Install and copy all maphack files inside "/home/[your username]/.wine/drive_c/Program\ Files/Diablo\ II/[plugin?]" directory
  3. In the shell. type wine d2hashgen.exe or wine [whatever the file is for generating the MapHack hash using your original CDKey]
  4. Rename D2maphack.dll to d2maphack.vcb.

Stealth.Bot
I have not tried Stealth.bot on Linux yet, as I've always wanted to make a public price bot for it so I imagine I'll try it sometime.

Creating a shortcut to you Diablo II directory

  1. In the shell, type:
    Code:
    cd ~/Desktop
    ln -s ~/.wine/drive_c/Program\ Files/Diablo\ II/

Finding out what IP your in

  1. In the shell, type:
    Code:
    netstat -putan
  2. The line with port 4000 is the IP u look at-i.e. '63.241.83.##:4000'
  3. The last subnet is the IP of the room your in, just like in windows.

Please post suggestions to the guide and I'll try to incorporate them in.

Be Sociable, Share!

About Shi Chuan

I am a web developer.
This entry was posted in Linux and tagged , . Bookmark the permalink.

13 Responses to Install and Play Diablo II on Ubuntu

  1. mmeisinger says:

    I am a big Diablo II fan and Diablo is my favorite role-playing game. I am so glad to know it’s playable on Ubuntu, although I am not using Ubuntu right now. But I have decided to buy my laptop with Ubuntu as the default OS. My only concern was if Ubuntu can get along with Diablo, now I am confident it’s OK to go for Ubuntu!

  2. tango07 says:

    Can you explain a bot more about how you got mm.bot working in Ubuntu?

    I installed it, but I get the 16 pixel resolution error and since is not windows, I haven’t figured out how to deal with it.

  3. Miguel says:

    I installed Diablo II and LOD expansion through Battle.net and this worked perfectly once, but now that I’ve tried again, when I launch the game, it doesn’t fit my screen… What shall I do?

  4. Mat says:

    I found out how to make it work, but when I type the command, even when my disk is in the drive, it tells me to insert the disk labeled “install”. Do you think it still works in Ubuntu 10.10?

  5. Swine Flu says:

    So I am stuck on disc 2 after I put in disc 2 and click on ok all it does it keep popping up as if the disc isn’t really in the drive.

  6. Somebody necessarily assist to make critically posts I would state. This is the first time I frequented your web page and so far? I surprised with the analysis you made to create this particular publish incredible. Wonderful activity!

  7. I’ve been surfing online more than three hours today, yet I never discovered any fascinating article like yours. It’s pretty value sufficient for me. In my opinion, if all webmasters and bloggers made excellent content material as you probably did, the web will probably be much more useful than ever before.

  8. It is truly a great and helpful piece of information. I’m happy that you simply shared this useful info with us. Please stay us informed like this. Thanks for sharing.

  9. Kumor says:

    My D2 LoD runinng just on 800×600 window in winedesktop (wd is on fullsceen, but D2 is just 800×600). Any ideas how to maximalize? When I run it few moths ago it was normal size. Thx

  10. Deusa says:

    i was searching for this, then i found your blog. glad i did that.http://www.jogosdoxmen.com

  11. TheLowLayer says:

    if ABUSE_SOMETHING error come up d2loader works
    link:http://speedy.sh/NQF7D/D2Loader-1.13d.rar

  12. Do you mind if I quote a couple of your posts as long as I provide credit and sources
    back to your webpage? My website is in the exact same niche
    as yours and my visitors would truly benefit from
    some of the information you present here. Please let me know if this ok with you.
    Cheers!

  13. I value the post.Thanks Again. Want more.tangjin3600

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>