Save File Format

This page describes the save file format of Battle For Bikini Bottom.

Structure
If you're editing a GCI file (exported from Dolphin -> Memory Card Manager), it'll begin with the GCI header and banner + icon data. Assuming that's all still the default, the actual save file data should start at offset 0x5880.

Starting at 0x5880 is 512 null (0) bytes, then the string "SPONGEBOB:WHENROBOTSATTACK::RyanNeilDan", followed by 599 more null bytes.

The rest of the save file is structured in blocks, which have the following format:

Blocks are padded with the value 0xBF.

GDAT
blockSize is usually just 1, i'm not sure what that means checksum is calculated using the CRC-32 algorithm on the rest of the save file, starting from the LEDR block. The checksum HAS to be correct or else you'll get a "load failed!" screen. I don't know what the parameters are supposed to be for the algorithm yet, but I made an AR code to disable the bypass the checksum validation altogether (GameCube NTSC version only):

0403ed94 60000000

Use that and you can freely edit your save file without worrying about the checksum

Other Blocks
After this is a bunch of blocks containing "serialized" data, which are the game's way of storing persistent scene states as well as player and global counter states. The format is very weird, and not easily editable with a hex editor because values are sometimes written as single bits, which offsets future values by the number of bits written, which causes values to cross byte boundaries, and yeah it's kind of a mess. I'll explain more of this soon

Scene IDs
These can be B101, DB01, JF01, etc.

Contains saved states for every object with the Persistent flag set (look in Industrial Park). The last value of a counter, the pressed/unpressed state of a button, the enabled/disabled state of a dispatcher, etc.

PLYR
Max health, shinies, spatulas, socks, collectibles

CNTR
Cheats, encountered robots, other stuff

After this is the following block: