Seth Michael Larson: Setting Discord status from physical GameCube console

Seth Michael Larson: Setting Discord status from physical GameCube console

Have you ever seen one of your friends playing a game or listening to music in their Discord “status”? That feature is called “Rich Presence”. What if you want to show your Discord friends that you're playing your GameCube? and I don't mean an emulator like Dolphin, I'm talking about a physical console from 2001. We can do just that with a simple Python script and a Memcard Pro GC.

The Memcard Pro GC is an internet-connected GameCube Memory Card virtualizer. The Memcard Pro GC automatically switches to a virtual Memory Card (VMC) for specific games when launched with a “Game ID”-aware launcher like Swiss or the FlippyDrive. We can use this automatic VMC switching feature to “detect” when a game is being played on a physical GameCube and update Discord with a new Rich Presence.

You can buy a Black or White Memcard Pro GC from 8BitMods for ~$45 USD plus shipping. They are oftentimes sold out, so you may need to be patient for a re-stock.

First-Time Setup

There is a documented first-time setup page. If you're on Ubuntu or Linux like me, you can use mkfs to format the microSD filesystem to exFAT: You should see something like this when you're done:

This will give you access to your new Memcard Pro GC and allow you to complete the initial setup.

Setup for Automatic Detection

Once the device is online, do the setup for connecting the device to WiFi. From here, you can access the “Settings” page on your phone or computer.

To automatic detection to work as expected, we need to create a default memory card that isn't associated with a Game ID (I used MemoryCard1) and disable the “Load Last Card when MemCard Boots” feature. This ensures that the Memcard Pro GC uses the MemoryCard1 instead of whatever your last played game was by default.

Creating VMCs for Games

We can quickly create VMCs for every game using CubeBoot on the FlippyDrive by selecting games in your library one-by-one but not launching into the game completely. This is enough to trigger the Memcard Pro GC to load the VMC for a given Game ID.

Generating Game IDs and Cover Art

If you plan to do anything with the FTP server with the Memcard Pro GC, you need to configure a username and password, enable the server, and crucially power off and power on the console for the FTP server to start on boot. We'll also need two different assets from the GameTDB: a list of valid Game IDs and covers for each region of games that your collection contains.

Download the wiidb.txt database in your preferred language (I am using English) and “Covers” for each region of games that your collection contains. The covers from GameTDB are 160x224 pixels, which is below the minimums required by Discord for Art Assets. We can scale them up with ImageMagick after we've unzipped the images into a directory.

Isolate only the cover artworks for games in our library and save this list into a file and make sure there's a trailing newline. Now, we can use the list to select and resize only the game cover artworks we plan to use.

Uploading Art Assets to Discord

Assuming you have a directory of the original images named covers/ and an empty directory named discord-icons/, we don't want ImageMagick to blur or interpolate the images, so we use -scale instead of -resize. At this point, you should have a directory full of upscaled images to use with your Discord application.

To use “Rich Presence”, you need a Discord application. There are plenty of tutorials on how to create one of these. I named the application “GameCube” so the Discord status will say “Seth is playing GameCube”. You'll need to upload all the newly resized game cover artwork images under the Rich Presence > Art Assets section.

The Script

We can periodically call this API and then, using the pypresence library, we can update our Discord Rich Status. We need to have fairly lax timeouts and retries to avoid unnecessarily setting and clearing the Rich Status due to things like the memory card not responding fast enough.

The above script is open source under the MIT license:

import requests from pypresence import Presence

# Replace with your Discord application ID Application_ID = "YOUR_APPLICATION_ID"

# Replace with the IP address of your Memcard Pro GC IP_ADDRESS = "192.168.0.43"

def get_game_id(): response = requests.get(f"http://{IP_ADDRESS}/api/currentState") return response.json()["game"]["id"]

def update_discord_status(game_id): presence = Presence(Application_ID) presence.update(details=game_id, state="Seth is playing GameCube")

while True: game_id = get_game_id() if game_id: update_discord_status(game_id) time.sleep(60) # Wait for 1 minute

Conclusion

So now when you're playing your GameCube at home, you can run this script, and you should see your Discord status change to the game you are playing. Magic! Let me know what games you still play on your GameCube!

Have thoughts or questions? Send them my way:

Want more articles like this one? Get notified of new posts by subscribing to the RSS feed or the email newsletter.