Mario Party Board Randomizer

Reshuffles a Mario Party Superstars board, right on a real Switch.

Role
Developer · Solo
Period
2026
Stack
Python · C++ · Nintendo Switch homebrew · zstd · AES-128-CBC
Runs on
Local only, no cloud

At a glance

Problem
Every Mario Party Superstars board has a fixed layout, so after a few games you know where the risky spaces are.
My contribution
Reverse-engineered the board's encrypted archive format, then built a Python CLI and C++ Switch homebrew on one shared core.
Outcome
Reshuffles one board, Yoshi's Tropical Island, right on a real Switch. Both builds produce byte-identical boards from the same seed.

Context

Every board in Mario Party Superstars has a fixed layout, so after a few games you know where the risky spaces are. This randomizer reshuffles a board's space types into a fresh layout every session, tuned by presets (Balanced, Chaotic, Evil, Competitive), and it runs directly on a Nintendo Switch: pick a preset, press A, and launch the game. No PC in the loop.

What I built

Built it end to end, from reverse-engineering the file format to the Python CLI, the C++ Switch homebrew, and the tests that keep the two in step.

  • Reverse-engineered the board's container: a proprietary SCNE/BEA archive holding a zstd-compressed, AES-128-CBC encrypted map whose padding is not PKCS#7. Round-trip tests confirmed the key, IV, and padding byte for byte.
  • Changed only the space-type column. The board graph, star locations, and game logic stay untouched, and a conservative allow-list protects special spaces.
  • Seeded the shuffle from a SHA-256 hash of board, preset, and seed, so the same 8-character seed produces the same board on any machine.
  • Shipped two builds from one core: a Python CLI that writes a RomFS mod folder for emulators, and a C++ .nro that writes the mod straight to the console's SD card.

Scope

  • One board so far: Yoshi's Tropical Island.
  • The tool ships no game data. Players supply a dump from their own console, and it has to match the installed game version.

The technical article covers the format work and the white-screen hunt in detail.

Decisions and trade-offs

  1. Overwriting the board asset in place, at its original offsetover appending the new payload at the end of the archive and repointing its recordThe appended archive was structurally valid, yet the game white-screened on it: its board loader apparently checks that each asset still sits at its original file offset. Five test archives, each changing one variable and run one at a time on the console, isolated the packing as the cause.cost · The recompressed map must fit the original 2,160-byte slot. An explicit overflow check enforces that, and any new preset or space type has to re-verify it.
  2. A C++ port of CPython's own random.Randomover any standard Mersenne TwisterShareable seeds only work if both builds produce the same shuffle byte for byte. CPython turns an integer seed into an array of 32-bit words and runs it through init_by_array, so the C++ side reimplements that exact path, and a parity suite diffs both outputs for every preset across multiple seeds.
  3. Largest-remainder apportionment for space countsover rounding each preset weight on its ownRounding each weight separately can leave the counts one short or two over the board's number of editable spaces. Flooring every quota and handing the leftover slots to the largest remainders, with stable tie-breaking, always lands exactly on the total and stays deterministic.

Results

  • Runs on a real Switch: pick a preset, press A, and launch the game to a fresh board, with no PC in the loop
  • Byte-identical boards from the Python CLI and the C++ Switch build, held in step by a cross-language parity test suite
  • Crash-safe writes on the console: temp file, verify, back up, then swap into place