I've long been a fan of SMW hacks in particular, and have been playing them for years now. I felt that I could make a good contribution to this community with the few coding skills I have, so I made an account and am posting this.
If you are interested on this project and are willing to contribute, hit me up on Github! I'll accept pull requests plenty, and consider adding contributors.
Any Linux and Mac builds are also appreciated.
Hope you enjoy!
What is this?
This is a project I've been working on for about the past week, which, when installed in its entirety, puts a "Play" button below all SMWCentral "Download" buttons, and this allows you to click and play your favorite hacks, with your favorite emulator, in your favorite configuration.
How does the program work?
The program consists of two parts: a Userscript
and an Electron
A userscript is installed in your browser, which only runs when you're browsing SMWCentral, and automatically gets metadata on the hack, and encodes it into an URL of the format "smwcentralplayer://<querystring data>". This URL is put into the "Play" button.
To actually do something with the data, an executable is configured on your system to become the default handler for this URL protocol, which means when you click the link in your browser, the executable will be called with the data necessary to download and run the hack in your favorite emulator!
How to install?
Download a release
, and run the executable best for your system.
A confirmation dialog will appear, suggesting you go to the program settings.
Once there, you can configure where you want your patch files and patched rom files to be stored, as well as the path to your favorite emulator, and the arguments that should be passed to it. These settings are separate for SMW, SM64 and YI hacks.
Once this is done, install a userscript plugin for your browser (Tampermonkey and Greasemonkey are good), and follow this link
, which should prompt you to install the userscript to call the program.
Now all should be working! Enjoy!
What is the license on this?
Thanks to dependencies on this project (Most notably Alcaro's JS-only BPS patch applier), this whole project is under GPL3.0, so feel free to do with it what you want!
Why is this better than previous projects?
1.- Because it is multi-hack. It can run all hacks hosted on SMWCentral, and should be easily expandable to all hacks that can be stored as a .bps file.
2.- Because it is expandable. The Userscript can be modified to fit another site, and the client-side program can be modified or entirely swapped without modifying the Userscript, thanks to the "smwcentralplayer://" URL scheme
3.- Because it doesn't depend on any external servers (Beyond your hack provider) to stay completely functional
4.- It (should be) cross-platform. Thanks to Electron and Userscripts, this project should be executable across all platforms, although I cannot test this yet.
What are the drawbacks then?
Mostly the Electron executable. I am not an expert programmer by any means, and I've used electron as a framework to build this app mostly because I don't know better. This means the program is quite a bit more sluggish than it has to be, however I intend to rewrite this project as time goes on in a faster framework.
Also considering I don't follow best coding practices, the code might be a bit ugly.
Edit 1: I somehow managed to miss the existence of randomdude999's SMWC Preview tool! It seems to currently be a more feature-complete python-written alternative to this program. Check it out!