Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Modifying App.js To Statically Load diabdat.mpq From Public Folder #144

Open
stshow opened this issue Jun 14, 2020 · 2 comments
Open

Comments

@stshow
Copy link

stshow commented Jun 14, 2020

App version:
DiabloWeb 1.0.39 (Shareware)

Question

In reference to #47 (comment), I am having trouble understanding the modifications to App.js necessary to statically load my own copy of diabdat.mpq via the public folder on the server. @d07RiV appears to indicate that this line must be modified to be True:

const retail = !!(file && file.name.match(/^diabdat\.mpq$/i));

The desired behavior is that my legitimate copy of diabdat.mpq be hosted on my private server, in the public folder, similar to the way that spawn.mpq is hosted here: https://d07riv.github.io/diabloweb/

The author seems to indicate that this is possible in #47 (comment). Can anyone suggest the proper modifications to App.js that would achieve this?

@stshow
Copy link
Author

stshow commented Jun 14, 2020

Setting the PUBLIC_URL appropriately seems to give me the desired behavior without modification to the latest master branch of App.js. For example, if I am running the server on my local host, then I set PUBLIC_URL=http://localhost. This seems to appropriately redirect the hosted diabdat.mpq.

Once this environment variable is set, I choose to start the shareware version. This then loads the full version of the game, since a legitimate diabdat.mpq was present in the public folder at compile.

Additionally, I set the VERSION environment variable to retail--although upon further reading of App.js I am not confident this variable is doing anything at all (see process.env.VERSION in App.js).

Anyway, I would still appreciate a sanity check, if possible.


Update: After further testing, this only seems to work when playing the game on the same host that is hosting diabloweb--which defeats the purpose.

@imneckro
Copy link

imneckro commented Feb 22, 2022

@stshow have you found solution to host instead the diabdat.mpq of spawn ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants