besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
122 stars 44 forks source link

Add Network framework and Streamerbot support #435

Closed UTDZac closed 7 months ago

UTDZac commented 7 months ago

This PR adds a complete Network framework with connection support to Streamerbot. For now, this is done simply by reading/writing every few seconds to inbound and outbound files (Json). Other connection types may become available in the future as they become officially (and properly) integrated into Bizhawk itself.

The initial goal of this feature is to allow Twitch chat to communicate with the Tracker via chat commands, or by redeeming a channel reward to change something about the tracker, like picking a starter ball or changing the Tracker theme.

Setup

To user first needs to setup the Network through the Steam Connect screen found in the Streaming settings menu. This setup process will be outlined in a wiki page which I'll built out later. Once setup, the tracker will automatically connect when new games are loaded, and disconnect when the tracker resets/closes down.

image

Network Framework Details

Connection Modes

New Core Files

Other Notes

How To Test

  1. Install Streamerbot and log into the application
  2. On Stream Connect, click "Get Code" and follow instructions for importing it
  3. Then set the connection data folder through the tracker to the data folder found in Streamerbot.
  4. Click Connect!

I'm interested in a better way to explain how to connect purely through the Tracker UI if at all possible. As of now, I plan to have instructions on the wiki. I think only step 3 is the hard part to explain that I'm stuck on.

UTDZac commented 7 months ago

I've completed the Stream Connect Guide wiki page if you want to check it out. The developers section is has a few links that won't work yet until this feature is officially released.

UTDZac commented 7 months ago

Finished adding in the resource files for this feature, as well as fixed a tiny bug with HMs displaying as TMs in chat output.