Archive Generated December 23rd, 2018
Tutorial - Making Local Bottom Map Screen
Author Posted on 2017/04/28
Louiskovski Making Local Bottom Map Screen

(Note: The guide isn't finished, it needs some grammatically fixes and some other improvements!)

This Tutorial will lead you through the creation of custom Maps for the "Local" Bottom Screen

Needed Tools:
-Mario Kart Toolbox
-Tinke 0.9.0
-ARM9 editor 4 ("ARM9e4")
-Your favourite Paint tool

But before we start, we will take a look at "Tilemaps" and the "Local Map Table":

The Structure

Understanding The Tilemap System

The Bottom map isn't just a picture, it's a "Tilemap", that consist of little "tiles" with a size of 8 pixels. Tilemaps are used by A LOT OF GAMES. Even NES games used Tilemaps. But what exactly is it?

It starts with a pallette, that has a set of collours and a "not so large like the bottom map" picture, that uses the collours from the pallette.

The picture is a set of puzzle pieces (=Tileset). These pieces have a size of 8x8 pixels, that can be putted on the Tilemap.

Multiple tiles can be putted on the tilemap and can be mirrored as well.

It is also possible to give the same tiles a different collour (=pallette). This is used in many old games to give the same graphics a different look (for example, In Super Mario Bros, the Overworld and Underworld has the same ground graphics, but a different collour, so they look different).

Local Map Table

Alright. The next thing, the bottom map consist of, is the "Local Map Table". This table is a list with the positions of the bottom maps. It can be found in the ARM9.bin file inside your ROM.
A track has coordinates for two points: MinX & MinY and MaxX & MaxY. The Min's position is, where the Top-Left corner of the Bottom Map should be on the track and the Max's position is the Bottom-Right corner of the Bottom Map.

Let's Start!

STEP 1: Simplify our model's textures

Since the Map has not so many space for collours, it's the best to simplify the model's texture to get an easy-to-edit picture.
BEFORE WE DO THAT, export your Model and replace the Model from an unneeded course with yours. Then replace the unneeded NKM file with an empty NKM file (All NKMs from the MR_Stages are almost empty).

Open now the course_model.nsbtx file inside your Course_tex.carc with a texture editor (NSMBDSe and MKDSCM can edit textures). Then give your texture less collours:

STEP 2: Noting down the Min and Max

Now we have to decide, where the map should start and end and note the position down for the Map Table.

Open up your ROM with MKToolbox and open the unneeded track with your model. Now create a Path with 4 points. Place the four point in form of a square so, that the area for our bottom map is inside this square. BE SURE THAT THE LENGHT FROM EVERY EDGE HAS THE SAME LENGHT!!!

Now note down the coordinates of the Top Left Point and the Bottom-Right point. You don't have to note the Y Value.

STEP 3: Making a screenshot

Good, the next thing we want to do, is getting a screenshot from our course. So click on the lighthouse on the top right corner in MKToolbox to get a bird's view of your track. Be sure that there is no other object on the track than the path.
Good, now make a screenshot of your pc's screen and insert the screenshot into your paint tool.
Now it gets a little bit tricky...

You have now to cut the picture inside of the blue square from the screenshot. Be sure that the selected area's height and width is the same! The blue edge should also be inside of the picture.

Good, now paste the cutten picture into a new file in your paint.
Now we have to change the size to 512x512 pixels. We can do this in Windows Paint by selecting the scissors option, clicking on the picture with the right button and clicking on "change size". Select "Pixel", change both sizes to 512 pixels and click on OK.

STEP 4: Simplify Your Picture
(This step isn't finish!)

Perfect! We now have our map, but if your picture is still too complex (Too many tiles or collours) we have to simplifiy it. Make more tiles the same, or use less collours.

Tipp: You can reduce the collours in Gimp by going to Image -> Mode -> Indexed.

STEP5: Creating The Tilemap

Cool, we are well done for now. We now have to create the Tilemap.

Close MKToolbox and start Tinke. Open your ROM and go to your Course's texture archive. Click on the .carc file and click on "Unpack". Now click on the appeared carc file (now with a yellow cube) and click again on "Unpack".

We can now see the files from our carc. Open the Map2D folder and click on these files in this order:

This will display the Tilemap of the bottom screen:

Go now to this place and change it like this, then press on "Import" and select your picture.

This will take now a while... It's just 99999% faster than doing it without tools.

If your picture has too many collours, it will freeze for long time until it displays an Error Message.
If anything goes right, your picture will appear on the screen. But don't look forward to early!
Press now on View again and take a look at the picture again. If there are some garbaged areas on the picture, your picture has still too many tiles in it. Here an example:

If your picture looks right, congratulations! Your Picture is now READY!!!

In order to save, click on the carc (the yellow one) and press "Pack", then click on the carc (the gray blue one) and press again on "Pack", then press on "Save ROM".
I'm not sure if Tinke can create clean ROMs, so you can also export the carc and replace the original carc with yours with another ROM browser (EFE, NSMBDSe).

STEP 6: Assigning to the Local Map Table

Perfect! It's almost done. All what we have to do now, is assignen the Min and Max values to the table. So open up your ROM with a ROM browser and export the ARM9.bin file. Start now the ARM9 editor and open the exported file. Now select "Local Map Table" At the upper side:

Now search for your track and enter the values you noted down. Be sure that the Z Value is the Y value in the table!

Then save the file, replace the file in the ROM with yours and save the ROM.

STEP 7: Review and problem solving

Awesome! It's done! Here the result for Noko Noko Beach:

You see, it works! But if you experience any small Inaccuracies, you can fix this by comparing the Min and Max with the Blue Path on the unneeded track. I really recommend you to use simple coordinates, for example 3000 and not 3512,416.

So, that's it! If you have any question, ask me in this thread :)
If there are some mistakes, you can post them also here.

Cooming Soon:

-Editing Sprite Sets
-Larger Maps
-Pallette animation?
-Something else? Tell me ;D