Custom Character Tutorial

Introduction
-tarsa129
 * 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.

Still in progress!!!

Breaking open the .iso:
You need to break open the .iso in order to access / modify the character files. See the page on breaking open an .iso for detailed information.

Breaking open MRAM.arc:
Most of the edits will take place in root -> MRAM.arc -> driver. To open MRAM.arc, copy and paste MRAM.arc and arcextract.exe into a new folder. Drag MRAM.arc to arcextract.exe, and the files will come out. Then, delete the .arc and arcextract.exe. Now, you have a folder with just the files in MRAM.arc

Images: [on the left] the files of MRAM.arc. The files for character .bmds are in the “driver” folder, which is selected. [on the right] some folders in the “driver” folder.

Folders in MRAM.arc (that are relevant to characters) driver: Each character has their own folder for their driver.bmd and facial animations. There are also “common” folders for common animations among similar characters. The character model is driver.bmd. The .btp files are facial animations. kart Each character has their own folder for their kart + the parade kart Contains models for the body, left and right wheels, and under-body parts. item Contains models for all items, including special items setting Contains setting files for each kart shadow Contains shadow models / animations for all karts CURRENTLY CANNOT BE EDITED race2d.arc Contains various images like: Character select screen image Character minimap icon Icons for the kart / special items Can be opened in the same way as MRAM.arc

Packing up MRAM.arc: To pack up MRAM.arc, drag the folder with the MRAM files into arcpack.exe. A file named MRAM.arc should be in the same directory as arcpack.exe

CAD Software stuff:

Make the model:

Tools Needed: 3dsMax/Blender, Image editing software You can get models from https://www.models-resource.com/, from actual game files, or you can make one yourself. No matter how you get the model, here are some things to keep in mind: Your final character .bmd should be at most 90 kb. This means that you may need to optimize/decimate files or downscale textures. Translucent textures may increase file size, so try to avoid that. Models that are too large will crash the game. Unless you can or are willing to edit bone animations, you should try to sculpt the model around the vanilla model. The body and the face should have different materials, but they can be part of the same mesh. For some reason character models imported into Blender after a SuperBMD are always messed up Get rekt lol Okay time for a theoretical, completely untested idea: Go to https://riidefi.github.io/RiiStudio/ and drag in the vanilla .bmd When selecting each bone, you can see it’s transform data. THEORETICALLY, it should be possible to restore the original pose from the information given You could also try this: https://github.com/niacdoial/blemd I’ve never tried this so idk if it works lol blender makes me cry

Getting the Vanilla Model: Basing your import off the vanilla model is the easiest way to get your character working in-game. To get the vanilla character: Go to MRAM.arc -> driver and find the folder with the character you want to replace. Take the driver.bmd file from that folder, and convert it to .dae using SuperBMD. This provides you with a .dae file (model file),  two .json files that will be used later when using SuperBMD again, plus a .png that is used for shading. Import that .dae into your cad software. This provides you with the bone structure that you should rig your character to I have found that a reference model is helpful when rigging my own character. Also, the .json files (and the highlight file) from the output of this process are very helpful when converting back to .bmd.

Image: the SuperBMD output of Bowsers’s .bmd into .dae.

Bones/Rigging:

To get the vanilla bones to use in rigging: Import the character into your software via the steps above. Delete the meshes that come with the import. Import the mesh that you want to use.

Rigging Tips: Add all the bones to the skin except skeleton root There should be no vertices attached to charactername_all, or any of the hand/feet pose bones Not all other bones have to have vertices weighted for them. When in doubt, refer back to vanilla (especially if you are not going to edit any bone animations) It is okay to have both face and body in one mesh, as long as they have different materials. A face-only mesh should only have the face bone attached. While the game will not crash if you have multiple bones weighted to one vertex, doing so may increase the file size In 3ds max, when you export, you should not get any popup about incorrect bone binding matrices.

Materials and Textures:

The material names and texture names (don’t worry about mesh names) of the body/face on your model should match those of the vanilla model. If not, the game will crash. Usually the body name is: characterfoldername_all_tx And the eye name is: characterfoldername_eye_tx

Texture Tips: The texture names, for your convenience later, should also match the vanilla names.

Faces: Make sure that you have 6 facial textures with the same names as in vanilla. If you do not plan on editing the .btps, it would be wise to try to match the expressions. If you do not have 6 facial textures, you will have to edit the texheader.json file. If one edits the .btps, it is possible to change the number of facial textures needed In the cadding software itself, you only need to load the first eye texture (the one with a 0 in its name)

SuperBMD Stuff:

Once you are done with your model, export as a .dae or .fbx using SuperBMD

Now that the materials are set, it is time to convert the driver.dae file into a new driver.bmd file. The driver_materials.bmd and tex_headers.json files must also be parsed with the .dae/.fbx for the materials to work in-game. You can get these .json files from the output of SuperBMD when converting the vanilla character to .dae. If your texture and material names are the same as in vanilla, you can use these .json files without editing them. If not, you need to edit the .json files to reflect the new texture and material names.

Shading: To achieve the shading, copy the highlight texture from the SuperBMD output of the vanilla model into the folder with your custom textures. Because this texture is used in the .json files from the vanilla model, you don’t need to mess with it.

Texheader: The texheader files is used to specify all the images in the .bmd. You need to convert with a texheader. json file so that the facial animations work in-game. If you are using Mipmaps for a texture, you need to set: MipMap: 1 (instead of 0) MinFilter: “LinearMipmapLinear” (instead of Linear) MaxLOD: # of mipmaps (instead of 0)

Images: The relevant settings, but in the texheader.json file for the character. The important settings are highlighted. The “LinearMipmapLinear” setting can be changed to “Linear” if you did not convert to .bmd with mipmaps.

Note that these settings can also be changed in J3dView.

Images: [on the left] The texture settings for a “character_all” texture. [on the right] The texture setting for each “character_eye.#” texture.

To use SuperBMD: In your SuperBMD folder, type “cmd” into your folder directory, which opens a command prompt. To use SuperBMD, type the following commands: SuperBMD.exe (inputfilepath) (outputfilepath) --mat (materialfilepath) --texheader (texheaderfilepath) To further understand how this works, here is an example: SuperBMD.exe driver.dae driver.bmd --mat driver_materials.json --texheader driver_tex_headers.json TravixMan

Alternatively, you can create a .bat with the text above to make your life easier.

Once you press the enter key, the .dae/.fbx file will be compiled with the json files to create a new .bmd file or replace it if it exists in the same folder as your .dae file.

Post Conversion / Testing:

J3dView: After the new driver.bmd file is created, you may want to check on its textures if you did not do that when editing the driver_materials.json file. Open J3dView and open your new .bmd file. If the textures look strange, try editing the settings in j3dview as seen in the images above.

J3dView is also great for seeing how character select screen animations will look like before putting them in-game. To load a character select animation (located in Scendata -> SelectAnm.arc -> character’s folder), go to File -> Load Animation -> Select animation.

J3dView does not open vanilla character files, but will open modded ones.

Editing the .btp Files: Character facial animations are found in root -> MRAM.ac -> driver -> driver folder .btp files are texture swapping animations that animate facial expressions on characters.

Use BTPxT to convert each .btp file into a .txt file. The number for each frame corresponds to the image of a texture as specified in the texheader.json.

You may need to edit the material names of all the .btp files to match what your new model has.

When you are done editing the .txt file, convert it back to .btp using the same program.

Testing: Be sure to test in all game modes: Time trials, Grand Prix, and 2-player. Some models (those with incorrect material names), will work in time trial mode, but not in grand prix mode. To see the blinking, finish a grand prix course in first place / get a time trial pb with your custom character in the driver’s seat. Note that a character that works in the character select screen is not guaranteed to work in-game.

Custom Voices: no

Okay there’s actually a new tool pinned in #other-formats in the double crew server that you can check out Not patcher compatible tho

Common Errors: (in progress) Crash at the beginning: MRAM.arc is too big / Edit the weights

Won’t load in grand prix mode (will load in time trial mode): Check material names, try dumming out .btps

Necessary Images Name in Scendata -> -> menu.arc -> timg -> chaname_ .bti Dimensions: 156 x 32 Tool: https://github.com/tarsa129/mkdd-text-maker/releases

Select Icon in root -> mram.arc -> race2d.arc -> timg -> .bti (64x64) Should not have an outline Minimap Icon in root -> mram.arc -> race2d.arc -> timg -> _mapicon32.bti (32x32) Should have an outline

How to use wiimms tools: Download and install wiims Make a .bat file (some useful ones can be found here) Use the .bat file as appropriate.

Editing Karts Kart model files are kept in MRAM.arc -> kart It is generally expected that you edit the character’s kart to match the character, because karts are tied directly with characters in this game.

Kart Model Files: body: the main body of the kart tire_l: the left wheel tire_r: the right wheel shock: coil that connects the wheel to the body - typically on the side of the body arm: metal bar that connects the wheel to the body - typically under the body

Just doing a texture hack (J3dview): If you just want to keep it simply and just do a texture change, you can use j3dview. This allows you to swap out textures without disrupting any bones of any models. You can Export / Replace textures by right-clicking on the texture name in the upper left corner of the program.

When using this, remember to take a screenshot of the texture settings before replacing the texture, and then reinputting any settings that may have changed. You will have to import .bti files.

Image: J3dview, with the option to export / replace a texture shown. On the bottom right are the texture settings.

.bti files extracted from J3dview cannot be converted with wimgt (for some reason), but they can be exported via Doubol Dash’s .bti tool, at the very least.

Actually editing the kart model: Follow the steps for converting from .bmd into .dae as shown above, and import the kart model into your cadding program.

You’ll notice that there are some bones: The main bone defines where the front character will sit. There is no bone for the back character, but you can tell where the back character will be by the model The other bones define where the exhaust comes out

As with characters, if you want the vanilla kart shading, you’ll want to match the material name from the vanilla kart into your new kart, and export with the outputted material .json.

Editing Kart Stats (not recommended when releasing): The structure of each .set file is actually very simple - it’s just a bunch of floats. You can edit these with a hex editor or this ***** program I made.

The reason that releasing edited kart stats is not recommended is because they can mess up custom track staff ghosts, which will cause everyone to complain about them, which i do not want to put up with thanks

Other Necessary Images: The indexkarticon is kept in root -> mram.arc -> race2d.arc -> timg ->indexkart .bti (64x64)

Bone Animations: Animations are kept in three places: Character select animations are kept in Scendata -> Selectanm. These are .bck files enter.bck is the animation that plays when you first select a character wait.bck is the idle animation gut.bck is the animation that plays when you confirm the kart gut.btp is the animation that plays alongside gut.bck Frame 0 of the gut.btp is the texture that will be used throughout enter.bck and wait.bck In-game animations are kept in ARAM.arc. These are .bca files. a_drive_a: part of front seat normal a_drive_b: front seat holding item b_dwait_a: backseat hanging off b_dwait_b: backseat hanging off c_wait_b: mushroom pose - no sideways input Some more in-game animations are kept with the driver.bmd. These are .bca files Basically they control the drifting / shifting animations of the back character, as well as the juggle animation

Animation File Details: Documentations: https://wiki.cloudmodding.com/tww/JSYSTEM#Known_JSYSTEM_libraries https://github.com/LordNed/WindEditor/wiki/J3D-Animation .bck (ank1) animates the bones of the model, but only deal with keyframes Program: J3DAnim by masterf0x or BrawlBox Brawlbox can export a .anim, which can be converted to .bck via J3DAnim (you may need to use Maya) pyBCK.py linked by Yoshi2 in the #mkdd-mods-discussion (for editing a nice text file) Video tutorial by TJ/thom: https://vlare.tv/v/yrmB2dLO .bca (anf1) also animates the bones of the model, but deal with all frames Program: bck_to_bca by Yoshi2 (pinned in #bck_and_bca in the Double Crew server) Or this: https://github.com/tarsa129/j3d-animation-editor

Stuff to look out for J3dview plays animations at 30fps, but mkdd runs at 60fps, so imagine all animations sped by a factor of 2 The hand_r and hand_l bones dictate where the hand / mushroom are during gameplay

Why changing some animations can be a bad idea: Some characters share animations with others. For example, mario and luigi, peach and daisy, and the toads + the babies. Changing any shared animation changes the animation for all of the characters. Can you make them un-shared? Maybe???? For a few???? But due to file size concerns, you probably can’t have too many unique animations if they are not always unique It’s just really ***** tedious, okay

Testing animations: Open up J3dview, and open up your model. Then, in File -> Open Animation, select the .bck file, and it will play.