A modern and secure web interface for modifying Mario Kart 8 Deluxe save files on Nintendo Switch.
This project uses a modular architecture with small specialized files for better maintainability and scalability.
- ๐ 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
- Coins
- Drifts
- Mini-Turbos
- Super Mini-Turbo
- Ultra Mini-Turbo
- Jump Sync
- Race Points
- Battle Points
Open the index.html file in your modern web browser.
- Click on "Select userdata.dat"
- Choose your Mario Kart 8 Deluxe save file
- The editor automatically validates file integrity
- Current values are displayed automatically
- Modify desired values in the fields
- Validation is done in real-time
- Click on "Save modifications"
- The editor automatically recalculates the checksum
- Download the modified file
- Copy the modified file to your Switch
- Replace the old save file
- Enjoy your new statistics!
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
- 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
- ๐ฏ 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
function calculateNintendoChecksum(data) {
const crc32 = calculateCRC32(data);
return (crc32 ^ 0xb33778cd) >>> 0;
}- Modern web browser (Chrome, Firefox, Safari, Edge)
- Local web server (optional, for development)
# Clone or download files
git clone <repository>
# Simple local server (optional)
python -m http.server 8000
# or
npx serve .js/crypto.js: CRC32 and Nintendo checksum (38 lines)js/binary.js: Binary read/write (50 lines)js/fileUtils.js: File management (49 lines)js/formatters.js: Formatting and utilities (55 lines)js/validation.js: Data validation (113 lines)js/ui.js: User interface (105 lines)js/offsets.js: Statistics offsets (52 lines)js/saveEditorCore.js: Main class (162 lines)js/saveEditorUtils.js: Class extensions (120 lines)js/main.js: Main script (367 lines)
| 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 |
- Backup: Always make a copy of your original file
- Validation: The editor checks integrity but test on a backup
- Limits: Respect maximum values to avoid bugs
- Compatibility: Tested with Mario Kart 8 Deluxe v3.0.1
- Check that it's a
userdata.datfile - Check the size (must be exactly 80,736 bytes)
- Make sure the file is not corrupted
- Check that values are within allowed limits
- Make sure you clicked "Save modifications"
- Check browser console for errors
- Check that checksum was recalculated (displayed in interface)
- Make sure you replaced the correct file
- Test first with small modifications
- ๐ 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
setCountermethod for more robustness. - ๐งน Refactoring: Duplicate code and erroneous logic have been removed from
main.jsandsaveEditorUtils.js.
- ๐ 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
- โจ Modular architecture added
- ๐ฆ Specialized CSS files (9 modules)
- ๐งฉ Modular JavaScript files (10 modules)
- ๐ฏ Improved maintainability
- ๐ Optimized performance
- ๐ฅ Facilitated collaboration
- โจ Complete web interface
- ๐ Integrated Nintendo checksum algorithm
- ๐จ Modern and responsive design
- โก Real-time validation
- ๐พ Automatic download
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