Skip to content

About

Mario Kart 8 Deluxe save editor

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Mario Kart 8 Deluxe - Web Save Editor

A modern and secure web interface for modifying Mario Kart 8 Deluxe save files on Nintendo Switch.

๐Ÿ—๏ธ Modular Architecture

This project uses a modular architecture with small specialized files for better maintainability and scalability.

โœจ Features

  • ๐Ÿ”’ Secure: Uses official Nintendo checksum algorithm
  • ๐ŸŽฏ Precise: Modification of 16 different statistics
  • ๐ŸŒ Local: No data sent over the internet
  • ๐Ÿ“ฑ Responsive: Interface adapted to all screens
  • โšก Real-time: Instant value validation
  • ๐Ÿ’พ Save: Automatic download of modified files

๐ŸŽฎ Modifiable Statistics

๐Ÿ’ฐ Currency & Items

  • Coins

๐ŸŽ๏ธ Racing Techniques

  • Drifts
  • Mini-Turbos
  • Super Mini-Turbo
  • Ultra Mini-Turbo
  • Jump Sync

๐Ÿ† Points & Rankings

  • Race Points
  • Battle Points

๐Ÿš€ Usage

1. Open the editor

Open the index.html file in your modern web browser.

2. Load your save

  1. Click on "Select userdata.dat"
  2. Choose your Mario Kart 8 Deluxe save file
  3. The editor automatically validates file integrity

3. Modify statistics

  1. Current values are displayed automatically
  2. Modify desired values in the fields
  3. Validation is done in real-time

4. Save

  1. Click on "Save modifications"
  2. The editor automatically recalculates the checksum
  3. Download the modified file

5. Install on your Switch

  1. Copy the modified file to your Switch
  2. Replace the old save file
  3. Enjoy your new statistics!

๐Ÿ› ๏ธ Technical Architecture

File Structure

MK8D-Editors/
โ”œโ”€โ”€ index.html              # Main user interface
โ”œโ”€โ”€ css/                    # Modular styles
โ”‚   โ”œโ”€โ”€ variables.css       # CSS Variables (16 lines)
โ”‚   โ”œโ”€โ”€ base.css           # Reset and base (42 lines)
โ”‚   โ”œโ”€โ”€ header.css         # Header (35 lines)
โ”‚   โ”œโ”€โ”€ cards.css          # Cards (46 lines)
โ”‚   โ”œโ”€โ”€ forms.css          # Forms (71 lines)
โ”‚   โ”œโ”€โ”€ buttons.css        # Buttons (42 lines)
โ”‚   โ”œโ”€โ”€ layout.css         # Layout (54 lines)
โ”‚   โ”œโ”€โ”€ messages.css       # Messages (49 lines)
โ”‚   โ””โ”€โ”€ responsive.css     # Responsive (40 lines)
โ”œโ”€โ”€ js/                    # Modular JavaScript
โ”‚   โ”œโ”€โ”€ crypto.js          # Cryptography (38 lines)
โ”‚   โ”œโ”€โ”€ binary.js          # Binary (50 lines)
โ”‚   โ”œโ”€โ”€ fileUtils.js       # Files (49 lines)
โ”‚   โ”œโ”€โ”€ formatters.js      # Formatting (55 lines)
โ”‚   โ”œโ”€โ”€ validation.js      # Validation (113 lines)
โ”‚   โ”œโ”€โ”€ ui.js              # Interface (105 lines)
โ”‚   โ”œโ”€โ”€ offsets.js         # Offsets (52 lines)
โ”‚   โ”œโ”€โ”€ saveEditorCore.js  # Main class (162 lines)
โ”‚   โ”œโ”€โ”€ saveEditorUtils.js # Extensions (120 lines)
โ”‚   โ””โ”€โ”€ main.js            # Main script (367 lines)
โ””โ”€โ”€ README.md               # Documentation

Technologies Used

  • HTML5: Modern semantic structure
  • CSS3: Responsive design with CSS variables and animations
  • JavaScript ES6+: Business logic and binary manipulation
  • Web APIs: FileReader, Blob, URL for file management
  • Modular architecture: Separation of concerns and maintainability

Modular Architecture Benefits

  • ๐ŸŽฏ Maintainability: Each file has a unique responsibility
  • ๐Ÿš€ Performance: Selective loading and optimized cache
  • ๐Ÿ‘ฅ Collaboration: Parallel development facilitated
  • ๐Ÿ”ง Scalability: Simplified feature addition
  • ๐Ÿงช Testing: Unit testing per module possible

Nintendo Checksum Algorithm

function calculateNintendoChecksum(data) {
    const crc32 = calculateCRC32(data);
    return (crc32 ^ 0xb33778cd) >>> 0;
}

๐Ÿ”ง Development

Prerequisites

  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • Local web server (optional, for development)

Local Installation

# Clone or download files
git clone <repository>

# Simple local server (optional)
python -m http.server 8000
# or
npx serve .

Code Structure

๐Ÿ“Š Statistics Offsets

Statistic Offset Type Size
Coins 0x195c uint32 4 bytes
Drifts 0x1968 uint32 4 bytes
Mini-Turbos 0x1970 uint32 4 bytes
Super Mini-Turbo 0x1974 uint32 4 bytes
Ultra Mini-Turbo 0x1978 uint32 4 bytes
Jump Sync 0x1964 uint32 4 bytes
Race Points 0x1e94 uint32 4 bytes
Battle Points 0x1e98 uint32 4 bytes

โš ๏ธ Important Warnings

  1. Backup: Always make a copy of your original file
  2. Validation: The editor checks integrity but test on a backup
  3. Limits: Respect maximum values to avoid bugs
  4. Compatibility: Tested with Mario Kart 8 Deluxe v3.0.1

๐Ÿ› Troubleshooting

File won't load

  • Check that it's a userdata.dat file
  • Check the size (must be exactly 80,736 bytes)
  • Make sure the file is not corrupted

Modifications don't apply

  • Check that values are within allowed limits
  • Make sure you clicked "Save modifications"
  • Check browser console for errors

Modified file doesn't work on Switch

  • Check that checksum was recalculated (displayed in interface)
  • Make sure you replaced the correct file
  • Test first with small modifications

๐Ÿ“ Changelog

v1.1.2 (2025-06-24)

  • ๐Ÿ› Critical fix: Checksum calculation is now correct. The error came from constant regeneration of the CRC32 table, which has been optimized to be calculated only once.
  • โœจ Improvement: Counter modification logic has been centralized in a setCounter method for more robustness.
  • ๐Ÿงน Refactoring: Duplicate code and erroneous logic have been removed from main.js and saveEditorUtils.js.

v1.1.1 (2025-01-24)

  • ๐Ÿ› Critical fix: validateCurrentFile() function corrected
  • ๐Ÿ”ง Offset corrected: Lakitu Rescue moved from 0x1e98 to 0x197c
  • ๐Ÿงน Optimization: Removal of offset duplicates
  • โœ… Validation: Complete code consistency check
  • ๐Ÿ“š Documentation: README updated with corrections

v1.1.0 (2025-01-22)

  • โœจ Modular architecture added
  • ๐Ÿ“ฆ Specialized CSS files (9 modules)
  • ๐Ÿงฉ Modular JavaScript files (10 modules)
  • ๐ŸŽฏ Improved maintainability
  • ๐Ÿš€ Optimized performance
  • ๐Ÿ‘ฅ Facilitated collaboration

v1.0.0 (2025-01-22)

  • โœจ Complete web interface
  • ๐Ÿ”’ Integrated Nintendo checksum algorithm
  • ๐ŸŽจ Modern and responsive design
  • โšก Real-time validation
  • ๐Ÿ’พ Automatic download

๐Ÿค Contribution

This project is based on reverse engineering of the Mario Kart 8 Deluxe save format. Contributions are welcome for:

  • Adding new statistics
  • Improving user interface
  • Optimizing performance
  • Fixing bugs

About

Mario Kart 8 Deluxe save editor

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages