GithubHelp home page GithubHelp logo

cheatfreak47 / apsa2b-linker-handler Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5.83 MB

a userscript and url handler to automate launching SA2B archipelago games

License: Do What The F*ck You Want To Public License

AutoHotkey 79.59% JavaScript 20.41%

apsa2b-linker-handler's Introduction

SA2B Archipelago Instant Launch thing

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.

Usage:

  • 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.

How it works for people who don't read code

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.

Description for APSA2B Linker JS

Image of Linker in Action

  • 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 the apsa2b:// 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

Description for APSA2B Handler AHK

Image of URL Handler

  • 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 from C:\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

apsa2b-linker-handler's People

Contributors

cheatfreak47 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.