Save Data (File Format)

From MK8
Revision as of 12:39, 12 March 2023 by Scutlet (talk | contribs) (Character variants (Yoshi, Shy Guy, Villager))
Jump to navigation Jump to search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.
Platform Notice
This article is about Mario Kart 8 for Wii U. It's likely that Mario Kart 8 Deluxe uses the same or a very similar file format, but this was not verified.

In Mario Kart 8, Save Data is stored in userdata.dat, a type of DAT-file. This file is stored in the user's save folder.

File Format

As of version 4.1 of the game, the size of this file is always 0x6638 bytes. If the game detects an invalid save file (E.g. the header checksum does not match the file contents), it will delete it and create a new one.

Header

Each save file has a 0x48 size header.

Save File Header
Offset Size Description
0x00 4 File magic. CTUS in ASCII. Unknown abbreviation.
0x04 4 Unknown. This value matches the one in the header of a player ghost.
0x08 4 Unknown. Always 00 00 66 38
0x0c 44 Probably Padding. Always 0.
0x38 4 CRC-32 Checksum of everything after the header.
0x3c 12 Probably Padding. Always 0.
0x48 End of save file header

Unknown

It is unknown what the following data means.

Unknown Data
Offset Size Description
0x48 4 File magic. CTUS in ASCII.
0x4c 4 Unknown. Always 00 00 00 01.
0x50 64 Unknown.
0x0c 72 Probably Padding. Always 0.
0xd8 End of unknown

Play Count Statistics

The following data takes count of how many times a character, vehicle part (body, tires, or glider), or track was played. The highest count determines which one of these is the player's favourite. A course only needs to be loaded in order for these values to increase.

Character variants, such as Red Yoshi or Blue Shy Guy are not counted separately but instead count towards their main character's totals. Likewise, Amiibo costumes and each different Mii all count towards the same total for a generic "Mii" favourite.

The order in which characters, vehicle parts, and courses appear depends on their ID value. "Gaps" are left in the save file in the case of vehicle bodies, since no vehicles bodies exist with an ID of 33 or 34.

Play Count Statsistics
Offset Size Description
Favourite Character
0x11fc 2 Times played Mario.
0x11fe 2 Times played Luigi.
0x1200 2 Times played Peach.
0x1202 2 Times played Daisy.
0x1204 2 Times played Yoshi (any colour).
0x1206 2 Times played Toad.
0x1208 2 Times played Toadette.
0x120a 2 Times played Koopa Troopa.
0x120c 2 Times played Bowser.
0x120e 2 Times played Donkey Kong.
0x1210 2 Times played Wario.
0x1212 2 Times played Waluigi.
0x1214 2 Times played Rosalina.
0x1216 2 Times played Metal Mario.
0x1218 2 Times played Pink Gold Peach.
0x121a 2 Times played Lakitu.
0x121c 2 Times played Shy Guy (any colour).
0x121e 2 Times played Baby Mario.
0x1220 2 Times played Baby Luigi.
0x1222 2 Times played Baby Peach.
0x1224 2 Times played Baby Daisy.
0x1226 2 Times played Baby Rosalina.
0x1228 2 Times played Larry.
0x122a 2 Times played Lemmy.
0x122c 2 Times played Wendy.
0x122e 2 Times played Ludwig.
0x1230 2 Times played Iggy.
0x1232 2 Times played Roy.
0x1234 2 Times played Morton.
0x1236 2 Times played Mii (any Mii or Amiibo costume).
0x1238 2 Times played Tanooki Mario.
0x123a 2 Times played Link.
0x123c 2 Times played Male Villager.
0x123e 2 Times played Isabelle.
0x1240 2 Times played Cat Peach.
0x1242 2 Times played Dry Bowser.
0x1244 2 Times played Female Villager.
0x1246 54 Probably Padding. Always 0.
Favourite Vehicle Body
0x127c 2 Times used Standard Kart.
0x127e 2 Times used Pipe Frame.
0x1280 2 Times used Mach 8.
0x1282 2 Times used Steel Driver.
0x1284 2 Times used Cat Cruiser.
0x1286 2 Times used Circuit Special.
0x1288 2 Times used Tri-Speeder.
0x128a 2 Times used Badwagon.
0x128c 2 Times used Prancer.
0x128e 2 Times used Buggybud.
0x1290 2 Times used Landship.
0x1292 2 Times used Bounder.
0x1294 2 Times used Sports Coupé.
0x1296 2 Times used Gold Kart.
0x1298 2 Times used Standard Bike.
0x129a 2 Times used Comet.
0x129c 2 Times used Sports Bike.
0x129e 2 Times used The Duke.
0x12a0 2 Times used Flame Rider.
0x12a2 2 Times used Varmint.
0x12a4 2 Times used Mr Scooty.
0x12a6 2 Times used Jet Bike.
0x12a8 2 Times used Yoshi Bike.
0x12aa 2 Times used Standard Quad.
0x12ac 2 Times used Wild Wiggler.
0x12ae 2 Times used Teddy Buggy.
0x12b0 2 Times used GLA.
0x12b2 2 Times used W 25 Silver Arrow.
0x12b4 2 Times used 300 SL Roadster.
0x12b6 2 Times used Blue Falcon.
0x12b8 2 Times used Tanooki Kart.
0x12ba 2 Times used B Dasher.
0x12bc 2 Times used Master Cycle.
0x12be 2 Probably Padding. No vehicle body with an ID of 33.
0x12c0 2 Probably Padding. No vehicle body with an ID of 34.
0x12c2 2 Times used Streetle.
0x12c4 2 Times used P-Wing.
0x12c6 2 Times used City Tripper.
0x12c8 2 Times used Bone Rattler.
Favourite Tires
0x1372 2 Times used Normal tires.
0x1374 2 Times used Monster tires.
0x1376 2 Times used Roller tires.
0x1378 2 Times used Slim tires.
0x137a 2 Times used Slick tires.
0x137c 2 Times used Metal tires.
0x137e 2 Times used Button tires.
0x1380 2 Times used Off-Road tires.
0x1382 2 Times used Sponge tires.
0x1384 2 Times used Wooden tires.
0x1386 2 Times used Cushion tires.
0x1388 2 Times used Normal Blue tires.
0x138a 2 Times used Funky Monster tires.
0x138c 2 Times used Azure Roller tires.
0x138e 2 Times used Crimson Slim tires.
0x1390 2 Times used Cyber Slick tires.
0x1392 2 Times used Retro Off-Road tires.
0x1394 2 Times used Gold Wheels.
0x1396 2 Times used GLA Wheels.
0x1398 2 Times used Triforce Tyres.
0x139a 2 Times used Leaf Tyres.
0x139c 96 Probably Padding. Always 0.
Favourite Glider
0x13fc 2 Times used Super Glider.
0x13fe 2 Times used Cloud Glider.
0x1400 2 Times used Wario Wing.
0x1402 2 Times used Waddle Wing.
0x1404 2 Times used Peach Parasol.
0x1406 2 Times used Parachute.
0x1408 2 Times used Parafoil.
0x140a 2 Times used Flower Glider.
0x140c 2 Times used Bowser Kite.
0x140e 2 Times used Plane Glider.
0x1410 2 Times used MKTV Parafoil.
0x1412 2 Times used Gold Glider.
0x1414 2 Times used Hylian Kite.
0x1416 2 Times used Paper Glider.
0x1418 4 Probably Padding. Always 0.
0x141c End of play count statistics

Drive Count Statistics

These are statistics related to driving. They count the number of times the player has done something whilst driving. These appear in the summary that is viewable by pressing the "-" button on the game's main screen.

Drive Count Statistics
Offset Size Description
0x1530 4 Total number of coins collected.
0x1534 4 Unknown.
0x1538 4 Total number of jump boosts performed.
0x153c 4 Total number of drifts performed.
0x1540 4 Unknown.
0x1544 4 Total number of Mini-Turbos performed.
0x1548 4 Total number of Super Mini-Turbos performed.
0x154c 4 Total number of Balloons Popped in Battle Mode.
0x1550 4 Total number of Own Balloons Popped in Battle Mode.
0x1554 End of drive count statistics

Online Statistics

Some statistics on online races are kept track of separately. Like race count statistics, these appear on the main screen summary.

Online Statistics
Offset Size Description
0x1a60 4 Total number of online Wins.
0x1a64 4 Total number of online Losses.
0x1a68 4 Total number of online Race Rating (maximum of 99999).
0x1a6c 4 Total number of online Battle Rating (maximum of 99999).
0x1a70 End of online statistics

Unlocked cc Modes

Mirror mode and 200cc mode are unlocked by default. When starting a new save, the player is notified that these modes have unlocked only when they enter the game's main screen for the first time. This message is never shown again after, unless the value below is modified.

Unlocked cc Modes
Offset Size Description
0x1a94 1 Mirror Mode and 200cc Unlock Status. 0x00 for locked, 0x03 for unlocked. 0x01 is treated as 0x00.
0x1a95 End of unlocked cc modes

Character Unlocks

Not all drivers are unlocked when starting a new save file, but this can be done by winning Grand Prix'. Upon doing so, the game will tell the player that they unlocked a new character, which is determined randomly. Only when a player returns to the character select screen will they see which character they actually unlocked (it will play an animation and auto-select), but note that the game has already determined before which character this will be.

To keep track of the unlock status of a character, the game uses three values:

  • 0x00: The character is locked.
  • 0x01: (Unused, is treated as 0x00)
  • 0x02: The character is unlocked, but the player has not yet returned to the character select screen to see this.
  • 0x03: The character is unlocked, and the player was already shown this before.

Like play count statistics, the order in which characters appear depends on their ID value.

Although the 16 starting drivers (like Mario or Bowser) are unlocked by default, they still appear with an 0x03-value in the save file. However, manually editing the save file and locking them will cause the game to reject (and thus reset) the save file.

DLC characters are not part of this since they are unlocked by default.

Character Unlocks
Offset Size Description
0x1a98 1 Mario.
0x1a99 1 Luigi.
0x1a9a 1 Peach.
0x1a9b 1 Daisy.
0x1a9c 1 Yoshi.
0x1a9d 1 Toad.
0x1a9e 1 Toadette.
0x1a9f 1 Koopa Troopa.
0x1aa0 1 Bowser.
0x1aa1 1 Donkey Kong.
0x1aa2 1 Wario.
0x1aa3 1 Waluigi.
0x1aa4 1 Rosalina.
0x1aa5 1 Metal Mario.
0x1aa6 1 Pink Gold Peach.
0x1aa7 1 Lakitu.
0x1aa8 1 Shy Guy.
0x1aa9 1 Baby Mario.
0x1aaa 1 Baby Luigi.
0x1aab 1 Baby Peach.
0x1aac 1 Baby Daisy.
0x1aad 1 Baby Rosalina.
0x1aae 1 Larry.
0x1aaf 1 Lemmy.
0x1ab0 1 Wendy.
0x1ab1 1 Ludwig.
0x1ab2 1 Iggy.
0x1ab3 1 Roy.
0x1ab4 1 Morton.
0x1ab5 1 Mii.
0x1abc End of character unlocks

On-screen Minimap

During a race, the player can press the gamepad's "-" button to toggle an on-screen minimap.

On-screen Minimap
Offset Size Description
0x6628 1 bit On-screen minimap. 0 for enabled, 1 for disabled.
0x6628.1 End of on-screen minimap

Character Variants

The game keeps track of the last used variant colours for Yoshi and Shy Guy, as well as the last selected villager character. The last selected Mii variant is only stored in-memory, and resets back to the default Mii upon reloading the game.

Character Variants
Offset Size Description
0x662d 1 Last used Villager. 0 for Male Villager, 1 for Female Villager.
0x662e 1 Last used Yoshi colour variant.
0x662f 1 Last used Shy Guy colour variant.
0x6630 End of character variants


Tools

The following tools can handle Save Data (DAT) files:

  • (none)