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++
.nrothat 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
- 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.
- 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.
- 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