JohnImril / diablo_web

This project is a web-based port of the original Diablo game. The goal of this project is to bring the classic experience of Diablo to the browser with a modern tech stack, including Vite and TypeScript.
https://johnimril.github.io/diablo_web/
16 stars 1 forks source link

how to play retail "easy" #48

Open Benman2785 opened 3 weeks ago

Benman2785 commented 3 weeks ago

Hi,

i want to use this on my personal server - and simply want a "start Diablo Retail" button that reads my "diabdat.mpq" instead of the "spawn.mpq"

how to do that?

JohnImril commented 3 weeks ago

I will be happy to help you with this, it is not really quick to do, some functionality will need to be fixed for this, but I am ready to do it, probably it can help other people too. Thank you very much for your feedback

JohnImril commented 3 weeks ago

how can i contact you to write when i fix this? or if it is convenient for you i can write here

Benman2785 commented 3 weeks ago

we can write here. also if you want you can fork your fork for it - so it doesnt overrides the existing code.

thank you for helping me - i am willing to test as fast as i can :)

JohnImril commented 3 weeks ago

I added this feature to the project (thanks to user a-sync for the fork), now you need to add your diabdat.mpq file to public, replace the line const isRetail = !!(file && !/^spawn\.mpq$/i.test(file.name)); with const isRetail = true; and set up the environment on your server

JohnImril commented 3 weeks ago

I would be very grateful if you write here step by step how you deploy this on your server so that it could help other users. I would like to add this to README.md later

Benman2785 commented 3 weeks ago
  1. download latest diablo_web-main.zip
  2. unpack
  3. open ..\diablo_web-main\src\App.tsx with editor
  4. search: 'const isRetail ='
  5. after "=" add ' true; //' (this sets value true and uncomments rest of line)
  6. save and build
  7. upload build & 'diabdat.mpq' to your server '../diablo_web/' (remember: diabdat.mpq can be "halfed" in size by compressing via mpqcmp
Benman2785 commented 3 weeks ago

btw - it works - but is buggy :)

both Singleplayer & Multiplayer are not working correctly

  1. index*.js gives lots of errors
  2. your character isnt saved for SP & MP
  3. every time you start game it behaves its the first run (plays cinematic)
  4. WebRTC: only host joins game - but no other clients can join
  5. after diabdat.mpq is uploaded you cant load "spawn.mpq" anymore - (when "const isRetail = true" is set)
Benman2785 commented 3 weeks ago

bug1

this should be the the error - as even when i use my local (on desktop) mpq it ALWAYS downloads the mpq from my server

Benman2785 commented 3 weeks ago

error could also be in "load_diabdat.ts" - but its to late here to check this now

Benman2785 commented 3 weeks ago

behaviour of downloading diabdat.mpq (or spawn.mpq if not set isRetail = "true") for second time starting of game is only in Firefox behaviour of not saving single*.sv & multi.sv & spawn_.sv is only present in Firefox = i suspect Firefox has problems with its cache here - but this was NOT present before changes (yes there was an Firefox update today - but i dont think this is at fault here - as Knotschi fork still works fine)

Benman2785 commented 3 weeks ago

when ever you load "diabdat.mpq" the cache in Firefox is altered

JohnImril commented 2 weeks ago

I did this https://github.com/JohnImril/diablo_web_simple I decided to clone the project a little and remove the duplicate functionality so that it does not interfere and does not cause errors. Please check. Now you only need to add the file public/diabdat.mpq and deploy it on your server. I will probably also attach the screen width setting here

Benman2785 commented 1 week ago

https://github.com/JohnImril/diablo_web_simple works but is unusable -> it does not create savegames :/