Mario Kart Wii: a custom track
Build a Mario Kart Wii track step by step, from a 3D model to racing it in Dolphin.
Before you start
This tutorial takes a track from nothing to racing it in Dolphin. You need Revolution Editor set up with your key and your Mario Kart Wii disc linked (see Getting started), Dolphin installed, and a 3D model of your track from Blender or any other 3D app, exported as .obj or .dae. Plan on an evening for a first track.
A track is one .szs archive holding six files:
course_model.brres: the model you see.course.kcl: collision, what you drive on.course.kmp: start, paths, checkpoints, respawns, objects and cameras.map_model.brres: the minimap.vrcorn_model.brres: the sky.itembox.brres: the item box model. Every retail track has it.
The game needs all six. A track missing any of them crashes. You make the first five; itembox.brres is copied from your disc (step 4).
1. Make a project
- Make a folder for your track in Finder and open it with File > Open > Folder.
- Export your model as
course_model.obj(or.dae) and copy it, its.mtland its texture images into the folder. The name matters: it's how the next step knows this is the track model. - Keep the road surfaces as their own materials in your 3D app (for example road, grass, wall). Material names drive the collision and minimap steps later.
2. The track model
- In the Project Navigator, right-click
course_model.objand choose Make .brres. You getcourse_model.brreswith the model inside namedtrack, the name the game looks for. (Renaming the file afterwards doesn't rename the model, so name the.objfirst.) - Open it to check the textures. Look at Track Budget in the model view: stay under the retail maximum for triangles, meshes and texture memory, or the track may run slowly or not load on a real Wii.
- Optional, but it makes a big difference: right-click
course_model.brresand choose Mario Kart Wii > Create Shadow Map.... Drag the sun's direction, height, softness and strength and watch the live 3D preview update, then press Create Shadow Map. Undo puts the model back.
More on models and textures in Models & textures.
3. Collision
- Choose File > New > Collision (KCL) from Model... and pick
course_model.obj. Tick Convert Z-up to Y-up only if your model is Z-up (Blender exports can be either; if the track comes in standing on its side, redo it with the other setting). - Save it as
course.kcl. Surface types are guessed from material names: road, grass and sand become road, off-road and so on. - Open it and check every surface type in the list. Select a triangle to retag everything connected to it. Walls must be walls and anything below the track you can fall to should be Fall Boundary, or racers will drive forever under the map.
- Turn on Wireframe Mode to spot holes. A hole in the road drops karts through the world.
4. Course data (KMP)
Choose File > New > Course Data (KMP)..., save it as course.kmp and open it. Load your track model behind the canvas (Auto-Detect finds course_model.brres in the folder) and load course.kcl the same way so points can snap to the ground.
- Start point. Use the + menu, Start Point (KTPT), and drag it onto the start line facing the way you race.
- Enemy path. CPU racers follow it. Pick the pen tool, click along the racing line all the way round and press Finish. Points come out evenly spaced. Right-click any point for Add Point Before, Add Point After, Move Earlier, Move Later, Snap to Ground and Delete.
- Item path. Choose Tools > Enemy Paths to Item Paths... to copy the enemy path. Bullet Bills and shells follow it.
- Checkpoints. Draw a checkpoint path with the pen tool the same way. Each checkpoint is a line across the track; they must span the whole road and never cross. The first is the finish line.
- Respawns. Tools > Respawn Point per Checkpoint adds one respawn for every checkpoint, on the ground and facing forward.
- Item boxes and objects. Add Object (GOBJ) points and set their type (Item Box for item boxes). Right-click empty canvas to add one right where you clicked, and press ⌘D (or right-click, Duplicate) to place rows of them quickly. Once you've placed an item box, a banner offers to copy
itembox.brres(and any other object's missing files) from your disc into the folder: accept it. - Cameras. Tools > Intro Cameras... builds the opening fly-over and lets you play it.
- Snap to ground. Select everything with a marquee and choose Snap to Ground so every point sits on the collision.
- Check it. Run Tools > Check Laps. It drives the CPU route three laps and lists anything that stops a lap counting. Then Tools > Make Testable fills in anything still missing.
5. Minimap
- Right-click
course_model.brresand choose Mario Kart Wii > Minimap Editor.... - Tick only the textures that belong on the map, usually just the road, and pick a shade for each. Keep it to a couple of thousand triangles; a heavy minimap can fail to show in-game.
- It's saved as
map_model.brresbeside the track model.
6. Sky
- Choose File > New > Skybox > From Game... to copy any retail track's sky from your disc, or Custom... to make one from a 2:1 panorama image or your own model.
- Save it as
vrcorn_model.brres.
7. Pack the track
- Make a folder called (for example)
My Trackand move the six files into it. A marked folder is packed into a.szsfor you when you play. - Or choose File > New > SZS Archive... and drag the six files in. Open it and press Verify Archive; every required check must pass.
- Right-click the archive and choose Mario Kart Wii > Edit Track in 3D... to drive round it in the 3D preview before you go near the emulator.
See Archives for more on .szs files.
8. Play it
- Right-click the track and choose Mark for Hot Swap > Mario Kart Wii > Tracks, then a cup and the track yours will replace (Luigi Circuit is a good first choice).
- Press Run. The first time, choose your Mario Kart Wii disc as the base disc.
- Before Dolphin starts, every marked track is checked. Errors are things that are likely to crash the game, each with what to do about it, and the track won't run until they're fixed. Press Auto Correct where it's offered and the app fixes it for you (you can turn this off under Safeguards in Settings > Emulator, but it's there for a reason). Warnings and Suggestions (no item boxes, no cameras) don't stop you playing.
- Pick the cup and track in-game. Your disc image is never changed.
Details in Testing your mod.
If it crashes
- Open
course.kmpand run Check Laps and Make Testable again. - Check the minimap was made with the Minimap Editor; a hand-made one is the most common crash on a real Wii.
- Every item path needs a path leading into it. Make Testable removes unreachable ones.
- Objects that move along a route need one. Verify Archive names any that don't.
- For a real Wii, switch Build for to Hardware-compatible in Settings > Games and rebuild the models. Dolphin forgives things a Wii doesn't.
Next: make a battle arena, or see the FAQ.