Custom Track Tutorial

See here for the making a custom track tutorial.

Introduction

 * Due to this wiki's efforts for accuracy of information, this page is protected so that only administrators can edit it. However, if you would like to make an edit, use this page's Discussion page or contact an administrator on discord.
 * Help for specific issues that you may experience should be asked in the Double Crew server.
 * It is highly recommended that you read all relevant readme files and documentations, as well as look to see what vanilla does, before asking (potentially annoying) questions. This guide will assume that you have read all the relevant material, unless it is especially noteworthy, because I do not wish to copy words that are perfectly written elsewhere.
 * If there is no source of the information listed, then you can assume that I came up with it myself. Anything with blender in this guide was contributed by Double Cherry in the Double Crew Server.

Important notes

 * A lot of the documentations linked, while useful and mostly correct, do leave out some information. I will try to fill in any missing information here.
 * “Vanilla” here refers to an original, unedited / unmodded file from the game.
 * When in doubt, copy from vanilla. This applies to just about everything here.
 * If you already have a program to edit a certain kind of file, that’s great for you, but if you run into difficulty with those problems, this guide won’t help you.
 * A lot of the programs listed give out error messages when something goes wrong - always check for an error message

 A note about the track-making process: Making a custom track is anything but a waterfall process, rather it is incredibly iterative. While aiming to completely finish the graphical model before starting on the collision is admirable, that aspiration is unfortunately unreasonable. Don’t worry if you find yourself going back to previous steps, everyone does that, and so will you.

Preliminary Information
What everyone needs to know for any mod, but repeated here for completeness. This section will be short because the information can be found in other tutorials on the wiki.

Breaking Open an .iso See Breaking open an ISO for more information.

Dealing with .arc files See Extracting and Packing .arc Files for more information.

Dealing with Crashes See Dealing with Crashes for more information.

Step -1: Choosing a Course Slot
The course that you will be replacing is very flexible; files for one course can easily be switched to go over another. Hopefully, as course slots become more fully implemented, this flexibility will remain. There are two main factors to consider when choosing a course slot You do not really need to worry about overriding a course slot that another non-vanilla track has taken. Most vanilla tracks have a non-vanilla track that it is "supposed" to go over.
 * Theme
 * Usually people want to change tracks to fit a certain theme - for example, an imported Rainbow Road might go over Rainbow Road.
 * As more tracks are made and as expanded course slots have not been fully realized, this factor becomes less and less important
 * Particle Effects
 * The particle effects that your track has is determined by the sound id of the course.
 * Changing around sound ids can be hard to organize, so it’s better to get a particle id that matches your track.

Step 0: An Introduction to Course.arc Files
In Filesystem/Course, you will see many different .arc files. Each of these contain the files for a course. Each course (except for Luigi Circuit) has two variants. For example, there is Peach.arc and PeachL.arc. The non-L courses are those that load in single screen mode, including Time Trial and 1-player Grand Prix mode. The L-courses are loaded in split screen mode, like multiplayer and LAN modes. There are no special .arc files for Mirror mode. The Mini .arc files are the battle maps.

A list of file formats commonly found in the main directory of course .arc files can be seen in the tables above.

Step 1: Make the .bmd
Programs: Subtutorials:
 * SuperBMD - for converting to .bmd format
 * 3d CAD software (3dsMax / Blender) - for making the model
 * J3dView - Used for viewing and editing the textures of a .bmd
 * DouBOL Dash by shibboleet (viewing)
 * Using SuperBMD
 * Using J3dView

 A note about modeling software Most of the work will be done in a cadding program such as Blender/3dsmax. While you can use Sketchup, it is not the ideal option. Blender is free and open source, and for custom courses, is good enough to suit your needs. There are plenty of online tutorials for Blender and 3dsMax. In the end, no one can stop or force you to use a specific program.

Starting from scratch
Due to the highly subjective nature of custom track design, there is not much advice that can currently be given. However, there are a few general guidelines that generally improve gameplay experience and visual appeal. None of the following bullet points are in any way necessary for creating a custom track.
 * Import the vanilla .bco (converted to a .obj, as shown below) of the course/map that you wish to replace to make sure that the course model itself, including walls and roads, are about the right size.
 * Roads do not have to be a specific width to be fun to play, and they especially don't need to match the width of any road in the game. However, roads that are too skinny can be frustrating to drive on, and roads that are too wide can seem plain.
 * The purpose of a vanilla .bco is purely as a helpful reference, not as any source of prescriptive design rule.
 * Make sure to design a boundary along the entirety of the course between where the kart can go and any other designs. You can do this with walls or deadzones.
 * If using walls, the boundary should be at most 150 units above the ground below it. This is to prevent the camera from clipping through the boundary.
 * While backface cull is automatic in SuperBMD now, if you are making your own course, it is strongly recommended that you have borders because they look nicer and are the only way to guarantee issues of looking outside the course.
 * Avoid tight, sharp corners at all costs. The game will extend these corners beyond where you want them to be, which can be very, very annoying for players.
 * Do not create any bones in your model.

Texture Tips
 * The largest texture that the game will allow you to use is 1024x1024
 * If you have a texture whose dimensions are not a power of two, you can use it, but you cannot use mipmaps;
 * If the texture dimensions are not a multiple of 8, DouBOLDash’s .bmd viewer cannot show it.
 * The game will still load the .bmd

Starting from a pre-made model
Of course, not everyone is up to making an original design from scratch. A lot of the tips from above can still be applied to this scenario. For example,
 * Importing the vanilla .bco can help with determining the scaling of the track.
 * Boundaries can be created
 * Textures that are too large may need to be downsized
 * Only vertices weighted to the root bone will load in-game. If your pre-made model has vertices weighted to a non-root bone, delete all the bones.

Using SuperBMD
See the tutorial on Using SuperBMD for information.

Editing textures via J3dView
See the tutorial on Using J3dView for information.

Step 2: Make the BCO
Programs: Subtutorials:
 * mkdd collision by Yoshi2 (converting)
 * DouBOL Dash by shibboleet - used for quickly viewing the model
 * Using mkdd-collision

The collision should generally follow the model. Of course, you may need to add deadzones. Do to the subjective nature of the model files, collision files are also subjective.

However, some general tips can still be given to help playability Triangles that are too large can greatly increase file size, but there is a workaround that is seen later in the document.
 * Collision triangles don’t move.
 * Remove ALL doubles and make sure no polygon overlaps. The game will react by taking only one of these overlapping polygons, and completely ignoring the other.
 * Delete all useless triangles. This is basically any triangle that the kart will not interact with and vertical triangles.
 * In fact, vertical triangles will cause the game to bug out and trigger basically and out of bounds.
 * The game does not handle long, steep triangles well. Any very steep section should be cut into smaller triangles.
 * Other triangles do not need to be cut into smaller triangles, in fact, needlessly splitting up triangles is a bad idea.

Collision Flags
A list of all collision flags can be found here. The more common/useful/notable ones will be described in more detail here.

Flags Walls - Flags that stop your movement  Deadzones / Teleportation - Flags that point to respawn points  Boosts - Flags that make you speed up 
 * First two digits give the function of the flag: 0x01__ is normal road, 0x12__ is wall, 0x00__ is mud, and 0x05__ is deadzone. All flags with the same first two digits will have the same properties in terms of driving over them.
 * The second two digits give other properties
 * For roads/walls, it differentiates different triangles for the purposes of sound
 * For deadzones, it determines which respawn point is used.
 * WALLS ARE HORIZONTAL, NOT VERTICAL
 * Wall triangles should extrude at least 200 units from walls.
 * Neither players nor items can go over the edges of 0x02__ flags. Items can go over the edges of 0x12__ flags, but players cannot.
 * If you wish to make a wall that items (like shells) bounce off of, but get thrown over (like bananas), stack a 0x02__ triangle under a 0x12__ triangle.
 * You cannot simply have a big rectangle of 0x0200 flags underneath a course and have them work as regular walls, because it is the edges that matter.
 * As a general rule, below each ledge is a 0x02__ flag. Yoshi Circuit is a great example for this; under the edge triangles on the course, there are 0x02__ triangles. This keeps karts from clipping out of a ledge.
 * Rainbow Road and the bridge on Bowser Castle near the start are examples where there are no underlying 0x02__ triangles. Near the edges, it is possible to go under the course and then back on it due to this.
 * Walls or deadzones should surround the entire course, just like you designed earlier. This is to stop players from seeing outside the course / into the course when their kart is right up against it.
 * Deadzones are not out of bounds - deadzones refer specifically to collision triangles / areas that will put you back at a respawn point.
 * Out of Bounds refers specifically to a lack of collision that will put you back at the starting point.
 * The exact flag (the last two digits) determines which respawn point will be used. 
 * Deadzone Flags - These flags will take away your items.
 * 0x05__: these produce vertical lines when you fall into them / respawn
 * 0x0A__: these produce a circle, and are used when you are falling into air
 * 0x0E__: these produce the sand / falling animations, and are used only in Dry Dry Desert deadzone sand
 * 0x0F__: these are used when you fall into water / lava. They produce a wave line that rises.
 * In vanilla, these triangles are associated with GeoSplash objects in the .bol. However, due to problems with the conversion software, neither the wave lines nor the GeoSplash objects work in custom tracks.
 * 0x11__: these are the flags for Peach Band sand, you don’t die if you go into them, but it determines the respawn point if you get killed by the dark water
 * Teleportation Flags - These flags will let you keep your items
 * 0x09__: Go super fast to the corresponding respawn point.
 * You need a GeoCannon object with the respawn point specified in its object settings in the .bol or the game will crash.
 * Also, the angle that the kart takes during its travel depends on the angle of the GeoCannon object.
 * 0x0D__: instant teleportation to the corresponding respawn point
 * 0x07__/ 0x47__ /0x37__: Zippers linked with a respawn point.
 * While these flags have an associated respawn point, your kart will still function like a normal zipper (0x0800) flag.
 * 0x020__ triangles surround all deadzones to prevent the player from going out of bounds, but this is not necessary for the game to function.
 * 0x08__: The basic boost
 * 0x09__: Explained above
 * 0x07__: Used on ramps - stops the falling animation from playing, (probably)
 * 0x37__/0x47__: Used on ramps - stops the falling animation from playing, (probably)

Step 3: Make the BOL
Programs:
 * mkdd track editor by Yoshi2 - used for viewing and editing the data