[{TableOfContents }]



----
!!!Introduction
----
A custom track is a track created or ported by an individual. This could include retro tracks based on other games, or original tracks designed by the creator. There are many components that a custom track is comprised of. This tutorial aims to provide you, the reader, the resources necessary to create your very own custom track. This tutorial will assume you have a basic knowledge of modelling, as it will be necessary for a number of steps in the creation of a custom track. If you are not familiar with any modelling software, [Blender] is most recommended for both beginners and veterans alike. There are many resources you may find on other platforms that cover the fundamental basics of blender which is all you will need to know to get started. 

!!!Custom Track Directory Contents
----
Custom Tracks must follow a very specific structure that the game expects. You can find the contents of any given track in romfs/data/data/Course. Do not worry if you don't know what this means, it will be further explained later. Many of the track names are fairly cryptic internally, as their names do not represent their final iterations and presumably reflect early placeholder names. Generally speaking, using your own intuition, you can make a safe assumption on what a course may be. For instance, you can safely assume that airship_course is Airship Fortress. 

Most, if not all, courses have two directories inside the Course directory: a course_name_arc folder, and a course_nameTex_arc folder. course_name_arc contains most of the important assets to a track. course_nameTex_arc will contain the textures for the given track. This would include textures you see inside a course, the textures for the skybox, and the minimap you see on the bottom screen. 

The actual contents of a given course is as follows:

*course_name_arc
**MapObj
***map_object.nsbmd - Assets for map objects go here. A map object is any game object placed via the nkm. Some map objects do not require their assets be in this folder, as they will always be loaded with a track, such as the item box. In cases where you require no map objects that necessitate assets in this folder, you can delete it. 
**MissionRun - Alright I'll be blunt, I've never touched this file. If someone else can write this part of the tutorial, that'd be appreciated. For most cases though, this folder is pointless and it can be deleted. 
**course_collision.kcl - This is the part of the course that the player interacts with. It is entirely separate from the course model. This is where you would define how the player will interact with a surface, whether it be grass, wall or what have you. You would also place elements here that aren't visible in the course model like invisible walls. 
**course_map.nkm - This defines where map objects, enemy routes, checkpoints and routes go, among other elements that don't belong elsewhere. 
**course_model.nsbmd - The visual model. This contains the model, materials, and vertex colors. Textures are stored in an archive elsewhere. 
**course_model.nsbta - Texture SRT animations. This is the scroll, rotate and translate animations that affect materials in-game. 
**course_model.nsbtp - Texture pattern animations. This will animate in-game by cycling through textures. 
**course_model_V.nsbmd - The skybox. This is a separate entity from the course model. If anybody else can document the technical differences in the way the game handles skyboxes vs course models here, that'd be great. Otherwise, just use this for the skybox and course_model.nsbmd for the course model. 
**course_model_V.nsbta - The same as course_model.nsbta, but for the skybox. 
**course_model_V.nsbtp - the same as course_model.nsbtp, but for the skybox. 
*course_nameTex_arc
**Map2D - This directory contains the minimap textures. All of them are generated at once by [Nitro Paint] given a texture provided by the user. As such, this will not cover every individual file contained.
**course_model.nsbtx - The textures used by course_model.nsbmd. 
**course_model_V.nsbtx - The same as course_model.nsbtx, but for the skybox. 

Note that this is not a comprehensive description of the entire contents of the Mario Kart DS romfs, but merely brief documentation on only the vital components of a custom track. 

!!!Nitro TGA
----
The Mario Kart DS toolkit requires textures be in a special version of TGA specifically for use with nsbmd files. These can be created with [Nitro Paint]. Usage of this tool can be found on the [Nitro Paint] page. 

!!!NSBMD
----
most custom tracks will start with the NSBMD, or the course model. This tutorial will not cover how to create the course model that you are working with. However, it will explain the processes required by MKDS to get your model in-game and provide some advice specific to Mario Kart DS and track development. 
!!Blender
Most custom track creators will opt to use blender. This is for a wide variety of reasons, such as the software being free, open source, fast to use and most accessible to MKDS with the current toolkit. 
If you are using blender, you will need [nns-blender-plugin]. This can be installed from the blender plugin manager and enables you to export to IMD (An intermediate file for the nsbmd), Texture SRT animations and Texture pattern animations. The IMD is converted to nsbmd with another tool which I'm not sure I can name or link, if someone else can confirm that would be great. 


None of the following is mandatory and some advice may be impossible to follow, such as if you're working with a direct port, where you're given a complete model and must tweak it to work within the confines of MKDS. 
-When iterating on a course, it is recommended not to create the visuals first. Block out your model with basic grey textures as this is easiest to iterate upon.
-Test frequently in-game. This will enable you to verify that turns aren't blind and the scale feels appropriate, among other elements that a good Mario Kart track is composed of.