Solved OpenDiablo2 engine port

Hello,

I'm a big fan of Diablo I and Diablo II/LoD Blizzard games.

We have devilutionX on ports and this engine works very good for Diablo I.

I've found OpenDiablo2 engine and I'm trying to get it to work on FreeBSD for Diablo II/LoD.

This project uses go and I've started to compile:


Help is welcome.

Thanks,

Nuno Teixeira
 
Can you try again to compile this? Your issue got fixed :)

Hello,

No it's not. I get same error:
Code:
../../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/src/linux_joystick.c:137:23: error: expected ';' after expression
fatal error: too many errors emitted, stopping now [-ferror-limit=]

I did:
Code:
git clone https://github.com/OpenDiablo2/OpenDiablo2
cd OpenDiablo2
go get -d
go run .

Can you test it please?

Thanks
 
Code:
go run .
# github.com/go-gl/glfw/v3.3/glfw
In file included from ../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/native_linbsd.go:10:
In file included from ../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/include/GLFW/glfw3native.h:114:
In file included from /usr/local/include/GL/glx.h:32:
/usr/local/include/GL/gl.h:61:11: warning: 'GLAPIENTRY' macro redefined [-Wmacro-redefined]
../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/include/GLFW/glfw3.h:5863:10: note: previous definition is here
main.go:26: OpenDiablo2 - Open source Diablo 2 engine
d2config.go:42: loading configuration file from /home/Alexander/.config/OpenDiablo2/config.json...
d2config.go:42: loading configuration file from /tmp/go-build421189126/b001/exe/config.json...
d2config.go:64: failed to load configuration file, saving default configuration...
d2config.go:74: saving configuration file to /home/Alexander/.config/OpenDiablo2/config.json...
lstat C:/Program Files (x86)/Diablo II/Patch_D2.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2exp.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xmusic.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xtalk.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xvideo.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2data.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2char.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2music.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2sfx.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2video.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2speech.mpq: no such file or directory
asset_manager.go:159: error loading file stream /data/global/excel/LvlTypes.txt (file not found: /data/global/excel/LvlTypes.txt)
panic: file not found: /data/global/excel/LvlTypes.txt

goroutine 1 [running, locked to thread]:
main.main()
    /home/Alexander/OpenDiablo2/main.go:40 +0x413
exit status 2
$

I currently have no Diablo 2 copy here.

Go still seems to fetch the old glfw where the freebsd fix is not included. I had to replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with these from github.
 
Hello!

I did like you said and got same results as you. Maybe a "go" bug?

Good news is that I own original Diablo II/LoD cds but I don't have a cd-rom to extract those files, but I will find a way :)

Thank you very much,

Nuno
 
I have created an installation script to install Diablo 2 with LoD from blizzards online installer in Wine some months ago. They are in games/homura. So if you still have the both CD keys it should be fine. Dont worry, you can access the files after installation.
 
I have created an installation script to install Diablo 2 with LoD from blizzards online installer in Wine some months ago. They are in games/homura. So if you still have the both CD keys it should be fine. Dont worry, you can access the files after installation.
Hi!

I tested Homura in the past without success to run D2/LoD until today. It runs very good, thanks for your great work :)

Related to OpenDiablo2, it almost running (almost):

https://github.com/OpenDiablo2/OpenDiablo2/issues/775

Nuno
 
Runs fine :)

tw77cbx9.png


Summary for all who also want to try it:

The following packages i had to install: pkgconf, go and glfw

1.
git clone https://github.com/OpenDiablo2/OpenDiablo2
cd OpenDiablo2
go get -d

2.
Replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with the newer glfw from github.

3. Download and install Diablo 2 with LoD with games/homura or alone with emulators/i386-wine-devel

4. Run go run . This will create a config where we have set the path for MPQ files first. It is needed to rename patch_d2.mpq to Patch_D2.mpq.

5. Run go run . again and the game should run too now :)
 
Hello,

Thanks very much for helping me testing OD2. I'm very happy that it runs on FreeBSD!

I will start to do some work on a port and get all dependencies toguether, etc.

I will try to know why Go doesn't fetch glfw correctly.
 
2.
Replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with the newer glfw from github.
I forgot to say that when I've done the port I have to "force" fetch glfw tag that included FBSD fix:
Code:
GH_TUPLE=    \
            go-gl:glfw:5321531:go_gl_glfw_glfw/vendor/github.com/go-gl/glfw
It worked like a charm!

TY!
 
Blizzard is giving out installers for D2/LoD but I had no success downloading anything with them. Anyone has an idea how to do that?
 
Blizzard is giving out installers for D2/LoD but I had no success downloading anything with them. Anyone has an idea how to do that?
Do you have a link? I can't find it, unless you don't need a serial anymore, since you can download freely from battle.net.
 
Aw this is stupid. You need to change the locale in the link to the country you are in, otherwise the download will fail. What locale you are running seems irrelevant.
 
Ok, back on topic. I have 1.14 installed but OpenDiablo2 won't work with it. Does it rely on a certain language version?
 
I am trying to install it with OpenDiablo2 which I installed via pkg. I found most of the mpq files on the disks, with one exception: d2xmusic.mpq
I read on the internet that some people also had this problem, and then renamed d2music.mpq to d2xmusic.mpq and it worked for them.
But when I now start OpenDiablo2 via the command line, it gives the following message:

...
[File Loader][INFO] Loaded /home/firefly/.config/OpenDiablo2/MPQfiles/d2sfx.mpq -> data/global/sfx/cursor\button.wav
[Asset Manager][ERROR] could not load file stream /data/global/music/introedit.wav (file not found: /data/global/music/introedit.wav)
panic: file not found: /data/global/music/introedit.wav

goroutine 36 [running]:
github.com/OpenDiablo2/OpenDiablo2/d2core/d2audio/ebiten.(*AudioProvider).PlayBGM(0x86007aaa0, {0x37f5ea, 0x20})
github.com/OpenDiablo2/OpenDiablo2/d2core/d2audio/ebiten/ebiten_audio_provider.go:73 +0x31d
github.com/OpenDiablo2/OpenDiablo2/d2game/d2gamescreen.(*MainMenu).OnLoad(0x861b7cfc0, {0x861d7dc20})
github.com/OpenDiablo2/OpenDiablo2/d2game/d2gamescreen/main_menu.go:185 +0x45
github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen.(*ScreenManager).Advance.func1()
github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen/screen_manager.go:86 +0x33
created by github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen.(*ScreenManager).Advance
github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen/screen_manager.go:85 +0x33d


I suspect it simply doesn't find this file in any of the mpq files my guess is in this d2xmusic.mpq file. Would it work if I add introedit.wav to d2xmusic.mpq via the MPQ Editor app?
Or am I on the wrong track. I suspect you might have a better understanding of what's going on. Any help would be welcome.
 
It turned out to be the d2xmusic.mpq file that caused this problem.
Once I replaced this file with the correct file, this game suddenly worked perfectly:

2023-02-24-222116_1920x1080_scrot.png

2023-02-24-222512_1920x1080_scrot.jpg
 
Back
Top