Listen here. I'm lazy and don't wanna open SA2 Mod Loader every time. I wanna click a button and it all just does it for me.
demo.mp4
So I made this. All the code is pretty well commented and clear about how it works, but do note it's obviously not official or officially supported or anything. Don't go bothering anyone but me in the issues section about it.
- Install Sonic Adventure 2 from Steam
- Install Archipelago
- Set up the SA2B Archipelago Mod
- Install your favorite userscript extension on your default browser. (examples include: Tampermonkey, Violentmonkey, Greasemonkey, Firemonkey, etc) My favorite is FireMonkey on Firefox.
- Install the userscript from this repo.
- Download and un7z the compiled release or compile
APSA2BHandler.ahk
from the repository yourself. - Take the resulting
APSA2BHandler.exe
and put it in the Sonic Adventure 2 install folder or the Archipelago install folder. - Run
APSA2BHandler.exe
and click on Install to install the URL Handler. - That's it. To remove the URL Handler run the program again and choose Uninstall.
Basically it registers a new URL type that when you click on it, runs a program that configures your SA2B_Archipelago mod for you, loads up the Text Client, and Launches the game for you. The new URLs are added to the page by a userscript you install in a userscript browser extension. That's it.
- A fairly basic userscript that should work with all userscript browser extensions
- lazily uses jquery to read the
archipelago://
from the page and makes a new link using theapsa2b://
url that contains the same data, in the download field that is usually unused for Sonic Adventure 2 Battle games - refreshes for you if the archipelago links are directing to port 0, which happens sometimes when you have fast internet
- must be compiled with ahk2exe from AutoHotKey 1.1 to be used because you cannot associate an ahk script with a url, only an executable file.
- if you use ahk2exe manually to compile, you can customize the icon like the release version to use the
icon.ico
fromC:\ProgramData\Archipelago\Data\
. My build script also does this. - has an install/uninstall button for the URL handler when ran on it's own for easy install/uninstall
- has some very basic error handling
- updates the SA2B_Archipelago config.ini file with the needed data passed by the clicked url
- launches the text client for you
- checks if the mod is enabled and opens the mod manager for you if it isn't
- launches the game for you if the mod is already enabled