CTDM Tutorial

From Custom Mario Kart
Jump to navigation Jump to search

This is the CTDM Distribution Tutorial. It explains how to create a custom track distribution with the assistance of CTDM.

Installation

To install CTDM, follow these steps:

  1. Download Custom Track Distribution Maker.
  2. Download Wiimms SZS Tools (version 2.33a and newer).
  3. Download Wiimms ISO Tools.
  4. Download FFmpeg.
  5. Add FFmpeg to your PATH by following the instructions here.
  6. Download mpv.io.
  7. Add mpv.io to PATH.

Windows users may need to install Visual C++ Redistributable. You can download the installer here.

Linux users may need to install some additional packages. You can install them using the following command:

sudo apt-get install libgtk-3-0 libblkid1 liblzma5

To verify that everything is installed correctly, you can run the following commands:

wlect --version
wit --version
ffmpeg -version
mpv --version

Setting Up the Workspace

The workspace is the primary folder that CTDM utilizes. Everything, including Custom Tracks, Custom Music, Cheat Codes, and Custom Characters, should be located within this workspace. Files located outside the workspace won't be used, which might lead to issues with the patching process.

To start, create an empty folder and designate it as your workspace. Afterward, you'll be prompted to choose the game ISO. Any game version will work. Keep in mind that the extraction phase might take some time, so please be patient.

Creating a Pack

A pack is a folder that contains the Custom Track Distribution itself and some additional files that CTDM uses for patching the game. To create a pack, click the red plus sign.

The first thing you need to do is go to the navigation menu. It can be accessed by clicking the red icon in the upper left corner. We will discuss the navigation menu later. for the time being, just select "Pack name". The term "pack name" refers to the name of the folder, while "patch id" identifies your Riivoltion patch id. It's important that both values do not have spaces or special characters. For the patch id, it's advisable to opt for a distinctive name to prevent any potential confusion. Names like "test" or "pack" should be avoided. After clicking Save, you will be redirected to the Pack Selection Menu. Simply left-click on your pack to open the editor.

Pack Editor

The Pack Editor is divided into three main parts: the checklist, the button section, and the navigation menu.

The checklist keeps track of the changes you've made. To successfully patch a distribution, you need to complete the four mandatory steps.

In the button section, you'll find four buttons:

  • Check: Updates your checklist.
  • Patch: Patches the pack if the mandatory requirements are met.
  • No Music Patch: Similar to the patch button, this option creates a distribution without custom music. It's useful for debugging since creation the BRSTM files takes time.
  • Export XLSX: Generates an Excel document within your pack. This file contains all track-related information.

Navigation Menu

Located in the upper left corner of the program is the navigation menu. It serves as the means to access specific pages within the program, each with its designated function. We've already covered the Pack name, so we'll proceed to the second option: Track config.

Track Config

This section enables you to add custom cups into your distribution. Additionally, there are two buttons available:

1. Keep Nintendo Tracks: This option includes the default 32 tracks from the original game.

2. Wiimm's cup: This button is activated only after enabling Keep Nintendo Tracks. It introduces an extra cup to your distribution. Wiimm's cup comprises four entries:

  • All Tracks
  • Original Tracks
  • Custom Tracks
  • New Track

The "New Track" entry currently isn't implemented yet in the current version of CTDM and is equivalent to "All Tracks".

This interface bears a strong resemblance to the config.txt of a CT-DEF distribution. This similarity exists because CTDM internally utilizes CT-DEF. While an advanced user can manually edit the config.txt, doing so comes with its own risks. Before we proceed, ensure that you have a folder named myTracks within your workspace. Place the desired custom tracks into this folder; CTDM will search later for the files inside this folder.

To get started, let's create a cup. Adjust the cup's name by editing the text at the top of the table. The label 1.png indicates that the icon for this cup is currently missing. We'll address cup icons later. Every cup must consist of exactly four entries, each of which can be a Track or a Menu.

If you don't click the Save button, CTDM will not save your track configuration.

What is a Track

In CTDM, a track comprises the following components:

  • Name: This is the title that appears in the game.
  • Track slot: This determines the slot assigned to the track. Before we proceed, it's essential to grasp the concept of Slots.
  • File path: This specifies the location of the file inside the myTracks folder you established.
  • Music path: The music path can take the form of a number, similar to the track slot, a file, or a directory. Details about music will be covered later, so don't worry about it for now.

What is a Menu

In the game, a Menu is indistinguishable from a normal Track. A menu is an entry with a name, but it contains multiple hidden tracks. You can add as many hidden tracks as you wish to a menu. When you choose the menu entry in-game, one of the hidden tracks will be randomly selected. For instance, you could label a menu "Random GBA Track" and place all the GBA tracks within it as hidden tracks. Whenever you pick the menu, a random GBA track will be selected. A hidden track follows the same format as a normal track.

Custom Music

There are two music modes available: you can either pick a music slot or opt for a custom file.

Using music slots is straightforward: simply indicate the slot number of the track. For instance, you could assign track slot 11 (Luigi Circuit) while selecting music slot 44 (Rainbow Road). The track will run in slot 1.1 but it will have the Rainbow Road music.

If you prefer custom music files, you can switch modes by clicking on the red directory icon. Before selecting a folder, ensure your music files are placed within the myMusic folder in your workspace.

There are three accepted file types:

  • MP3
  • WAV
  • BRSTM

MP3 and WAV files can be directly placed within the myMusic folder. However, for BRSTM files, they need to be positioned within a subfolder of myMusic. BRSTM files are used in pairs: one for standard laps and another for the final lap. Both files must have identical names, but the final lap version must end with _f.brstm.

Here's an example myMusic folder structure:

  • mySong.mp3
  • sound.wav
  • dk_rap/donkeyKongRap.brstm
  • dk_rap/donkeyKongRap_f.brstm

To select a song, click on select music and choose your file. If you opt for a .brstm file, it doesn't matter whether it's the regular version or the faster one—they both work.

By default, CTDM loops MP3/WAV from the beginning. If you desire more control, you can create your own BRSTM files.

If you don't click the Save button, CTDM will not save your changes.

You can learn about Custom Music here.

LPAR

This section allows you to generate the LPAR config file. You can manually edit the lpar.txt file. Please note that CTDM might take some time to update to the latest LE-CODE binary file, so certain new features might not be available.

Cup Icons

Each must have an associated icon named with a number. Icons must be in the PNG format and measure 128x128 pixels.

You can find these icons in the Icons folder within the pack. While CTDM will automatically generate the first 9 icons, you are welcome to substitute them with your own.

Furthermore, CTDM will generate two icons for the right and left arrow indicators in the menu. You can customize these icons too. When Wiimm's cup is enabled, the icon will consistently be named 9.png.

Gecko Codes

Gecko codes are cheats that modify the game. CTDM uses 2 default gecko codes that are necessary for the distribution to function correctly. These codes are mandatory and cannot be disabled.

To create and edit Gecko codes, access the Code Manager by clicking on it. Create a new cheat by selecting the yellow plus sign.

Your cheats will be saved in JSON format within your workspace's myCodes folder.

If you don't click the Save button, CTDM will not save your changes.

Custom Characters

Custom characters are stored within the workspace in the myCharacters folder. Each character needs to have a specific folder structure. If you wish to include custom characters in your distribution, you can either download character folders designed for CTDM or create your own.

Here's the structure for a character folder:

  • ./icons/icon64.png
  • ./icons/icon32.png
  • ./karts/
  • allkart.szs
  • award.brres
  • driver.brres
  • ctdm_settings.txt
File and Description
File Description
icon64.png The character icon. It should be a 64x64 PNG image.
icon32.png The character's minimap icon. It should be a 32x32 PNG image.
karts This folder holds all the vehicle files. Make sure they're correctly named.
allkart.szs The file containing all the vehicle models for character selection.
award.brres The model used in the /Demo/Award.szs ceremony.
driver.brres The model used in Scene/Model/Driver.szs.
ctdm_settings.txt This file contains character information. Don't create or modify it manually; CTDM will handle it.

In the Character Editor, you can change the character's display name and select the appropriate weight class.

Remember, if you don't click the Save button, CTDM won't save your character edits.

To apply a custom character, click the yellow directory icon and choose the character folder.

Custom Menus

Whenever you press the PATCH! button, the contents within the /Scene/UI folder get deleted. This section allows you to specifically instruct CTDM to seek out modified files. Instead of using default files, CTDM will utilize these as the foundation.

For instance, if you desire a personalized title screen image: 1. Choose Title.szs. 2. Click on Create files.

As a result, a file named Title.szs will be generated within the myUI folder located in the pack folder. You can then edit this file, and CTDM will incorporate it into the distribution.

If you already possess a customized Title.szs, just tick the checkbox and add it to the myUI folder manually.

Multiplayer

CTDM has the capability to patch a distribution for online play using Wiimmfi. To enable this feature: 1. Input the region id. 2. Click on Enable. 3. Remember to click Save.

Before use, ensure you possess the appropriate region.

Sharing a distribution with the wrong region may lead to temporary bans for your players.

To acquire a Wiimmfi region, you can submit an application here.