Show your live Pokémon party on stream with mGBA

Updated

Updating your team by hand works fine until the stream gets busy. You catch something, swap your lead, level up three times in one fight, and the overlay falls behind. Game Sync fixes that. A small script reads your party from mGBA’s memory and your overlay updates on its own, roughly every two seconds.

Glass Live Party with Game Sync: real HP, levels, moves and abilities for the whole team.

What you need

  • mGBA 0.10 or newer (it has the scripting window this uses).
  • A US copy of FireRed, LeafGreen, Emerald, Ruby or Sapphire. Other regions and other generations aren’t supported yet.
  • Chrome or Edge on the same computer. Firefox and Safari can’t watch a file on your disk.
  • A Pro plan. Game Sync is a Pro feature.

What it reads

Your whole party: species, nickname, level, current and max HP, status (asleep, poisoned and so on), moves, ability, nature, held item, stats and whether it’s shiny. It also picks up your trainer name, badges, money, play time and Pokédex count, which the trainer card templates use.

It only reads. Nothing is ever written back into your game or your save.

Set it up

1. Download the script. In the editor, find the Game Sync box and click Setup Guide, then Download pokemon-reader.lua. You can also grab it here. Put it in a folder you’ll remember. It writes its file next to itself, so a folder like Documents/stream is better than Downloads.

2. Load it in mGBA. Start your game first. Then open Tools → Scripting, and in that window choose File → Load script and pick pokemon-reader.lua. The scripting window should say:

Pokemon Overlay Studio: Game detected! Reading party data...

It also prints where it’s writing party_data.json. That file appears in the same folder as the script.

3. Connect your overlay. Back in the editor or the Control Panel, click Connect to Game and pick that party_data.json file. Chrome will ask if the page can view the file. Allow it. The box switches to Connected and shows how many Pokémon it found.

That’s it. Keep that tab open and visible while you stream. Putting it in its own window on a second screen works well. Chrome slows down tabs you can’t see, so a tab buried behind others can fall behind. If the overlay hears nothing for 30 seconds, it shows that it’s lost the signal instead of pretending your old team is still current.

Every time you stream

The browser forgets file access when you close it, so each session you’ll do steps 2 and 3 again: load the script in mGBA, then click Connect to Game. It takes about ten seconds once you’ve done it before.

Running it without a browser tab

If you’d rather not keep a tab open, or you only have one screen, there’s a small Python script that watches the same file and sends updates straight to your overlay. It’s meant for people who are comfortable with a terminal.

  1. Install Python 3 and download sync.py. It has no other dependencies.
  2. In the editor, copy your API Sync Key. It shows up on templates that use Game Sync. Treat it like a password, since anyone with it can change what your overlay shows.
  3. Run it, using your own project link and key:
python sync.py --url https://pkoverlay.com --slug overlay-a1b2c3 --key YOUR_SYNC_KEY --file "C:path\toparty_data.json"

The slug is the last part of your overlay link, after /o/. Leave the window open while you play.

When it doesn’t work

The scripting window never says “Game detected”. The script only knows the US versions of the five games above. A European or Japanese ROM, a ROM hack with a changed header, or a different game won’t be recognised.

It says “Could not write to” a path. mGBA can’t write in that folder. Move the script somewhere you own, like your Documents folder, and load it again.

“Game Sync requires Chrome or Edge.” You’re in a browser that can’t read local files. Open the editor in Chrome or Edge, or use the Python script instead.

Connected, but the overlay shows the wrong team. In the editor, check that Use Live Game Party is switched on. With it off, the overlay shows the team you typed in by hand. Also check that OBS has the link for the same project.

The overlay drops the signal after a while. The browser tab is probably hidden. Bring it back into view, or switch to the Python script, which doesn’t have this problem.

The party empties when I reset. That’s on purpose. When you soft reset, the script clears the party until the game loads your save again, so the overlay doesn’t show a team you don’t have.

If you’re stuck, post the text from mGBA’s scripting window in our Discord. It usually tells us exactly what went wrong.