Mario Kart DS Custom Track Tutorial#

Hey! This series is also in video form! Click here to go the playlist or go to the bottom of the page for the video of this part.

This tutorial page outlines the process of creating custom tracks for Mario Kart DS. This will cover everything from modeling to importing the track into the game. If you ever have any questions or comments, do consider joining the Discord server.

Software used#

1. Mario Kart Toolbox

Mario Kart Toolbox is the general program used for editing Mario Kart DS. This is the software you will be using to create collision, edit text, edit character and kart stats, generate a course picture, generate global maps, and more. The current stable version is currently in the process of being superseded.

2. Blender

Blender is a free, open source modelling program with tons of other features to boot. This is the main tool used for making course, character and kart models. While it seems daunting at first, for Mario Kart DS, we only use a small subset of its features, which we will guide you through. The NNS Blender Plugin is currently compatible with Blender 2.8 through 4.0. You can download a compatible version here.

3. NNS Blender Plugin

A plugin for Blender, which lets you export models in the NITRO Intermediate format, from which you will make your files compatible with the game. You can download it here.

4. G3DCVTR

A command line converter for the intermediate formats that converts them into the runtime formats used by Mario Kart DS. It also includes batch files for easy conversion. This software aims to be replaced in the future. You can download it here.

5. NitroPaint

NitroPaint is a general graphics editing program aimed towards the DS. This program is used to create the NNS TGA format textures that the Blender plugin expects. You can download it here.

1. Setting up the NNS Blender Plugin#

Tip: There is an option to import shortcuts from Blender 2.79 here into 2.8 in the splash screen, so if you're used to that version I recommend doing that! It'll make it easier to adjust to 2.8.

1. Go to Edit > Preferences.


2. Open the Addons tab, and click on the Install button at the top right.


3. Look for the addon, and click Install Addon.


4. Once it's done, test it out by selecting the cube and going to the Materials tab. If you see a button called "Create NNS Material", it worked!


Now, let's wrap up by exporting your ROM as a project in MKTB.

2. Exporting your ROM as a project#

While possible to edit a ROM directly, doing so is quite cumbersome. We recommend using Mario Kart Toolbox to create a ROM project from your existing Mario Kart DS ROM file. This will extract all the files and archives and allow you to browse the file system using Windows Explorer.

1. Once your ROM is opened, you will be greeted to this screen. Click on File > Export > Export Project.


2. Select a location to extract the game. (Preferably a brand new/empty folder)


3. It will ask you if you want to unpack archives. Click yes, and wait for it to finish.


Once it's done, check your specified folder and you'll see everything there. Your project resides in this .nkproj file, so don't delete it or anything! Don't delete anything from the filesystem unless you're replacing stuff. After exporting MKTB will ask you if you want to open the project, click yes. You will also notice the Export NDS function will be available, which we will use to build our project back into a ROM once our changes are done!

2. Converting Textures#

To export a model with the NNS Blender Plugin, textures must first be converted to NNS TGA. What is NNS TGA? This is an extension to a standard TGA image with DS texture data embedded. This allows Blender to preview the textures while editing the model.

Textures on the DS have sizes as powers of 2 between 8x8 pixels and 1024x1024 pixels. This means allowed dimensions are 8, 16, 32, 64, 128, 256, 512, and 1024 pixels. Using textures as large as 256x256 is not recommended, as this will consume a lot of VRAM. Use smaller texture sizes wherever appropriate, and bear in mind the DS's screen resolution.

To convert a texture to NNS TGA, you can simply drag and drop an image onto NitroPaint and click "Create Texture." You can now click on the "Convert To..." button on the right hand side. You should now be prompted with the parameters for texture conversion. By default, the converter selects a texture format and palette size it thinks is appropriate for your image. You may edit these, however. The texture formats are outlined below and under what conditions you might use them:

Texture FormatBits per pixelTranslucencyUsage
tex4x4 3 No This is the most common texture format used in Mario Kart DS. It offers generally the best quality/size tradeoff. It uses block compression to achieve its size. They often have quite large palettes. The larger the palette size, the better the quality you can achieve.
palette4 2 No This is the smallest texture format on the DS. Use this when your texture has 4 colors or less and doesn't have translucent pixels. You can have transparent pixels, but you may then only have 3 colors.
palette16 4 No With this format, you have 16 colors and no translucency. You can use transparency, but with 15 colors.
palette256 8 No With this format, you have 256 colors and no translucency. You can use transparency, but with 255 colors.
a3i5 8 Yes This format allows storing translucent pixels. You can use 32 colors, but get 8 levels of translucency.
a5i3 8 Yes This format allows storing translucent pixels. You can use 8 colors, but get 32 levels of translucency.
direct 16 No This format is entirely uncompressed. They are quite huge, so avoid them whenever you can.

4. Modeling#

This video outlines the process of track modeling in accordance with best practices in Mario Kart DS:

5. Exporting the Course Model#

To export the model from Blender, go to File -> Export -> Nitro Intermediate. This will produce an IMD file if everything is correct in your model. With this IMD file, you can now create the final NSBMD and NSBTX files. Included with the g3dcvtr linked above, there is a batch file that converts the IMD to these. You can drag and drop the IMD file onto the mdltex.bat file which should produce these files. You may now replace the course_model.nsbmd in the course archive, and course_model.nsbtx in the course texture archive.

6. Creating the Course Collision#

7. Editing the NKM#

Text version made by AltairYoshi on 09/18/20

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 15-Dec-2024 15:16 by Garhoogin