Mission Mode

From Custom Mario Kart
Jump to: navigation, search

Mission Mode is an unused, incomplete game mode present in Mario Kart Wii. It seems to have been intended to function very similarly to Mario Kart DS's Mission Mode, but was ultimately cancelled before completion and hidden away. It is likely that Competition/Tournament Mode, which shares many similarities with Mission Mode, became its replacement. The leftover code and screens of Mission Mode were discovered by MrBean35000vr on August 3rd, 2017, over 9 years after Mario Kart Wii's release date.

What Still Exists

Because Mission Mode was cancelled from the game and was never intended to be accessed, it is missing a lot of data that it's supposed to have in order to work properly. However, most code elements do still exist and can be accessed via cheat codes. The menu screens that allow a user to pick a level, view the level objective and start the game all still exist, albeit with no text. The gameplay mode itself still exists, meaning that it is possible to play the mode and fulfill various objectives, although the game doesn't seem to have a concept of failing, if you fail your objective, the game acts as though you have won anyway. However, the scenarios that Nintendo created for the mode do not exist anymore, meaning that although we can test out the objectives, we do not know how Nintendo would have originally used them and there are no leftover complete missions available in the game filesystem. However, based on certain similarities between game modes present in Mission Mode and Competition/Tournament Mode, it's very possible that some of the missing scenarios were remade as tournaments.

A look through the menus and some of the objectives can be seen in the following video:

Mission Mode Discovery Video

Gameplay and Features

Had it been completed, Mission Mode would have put the player through a series of 64 challenges with increasing difficulty, where in each the player would have been required to perform a certain objective within a time limit. The player is not given any choice of what character or vehicle they wish to use, and the nature of the objective would vary depending on the level selected. Furthermore, the game could restrict what drift mode you were allowed to use (Automatic/Manual) or let you choose. This is the only game mode in Mario Kart Wii where a player may not have free choice over what drift mode they can select, a concept not applied anywhere else in the game. At the end of each level, the player would be awarded a rank based on how well they performed (3 stars, 2 stars, 1 star, A, B, etc) and this would be displayed next to the level name in the menu. The 8th mission of each major level plays the course introduction camera pan accompanied by the battle introduction music when you load it, indicating that they were probably meant to be levels where you fight bosses, or somewhat special by comparison to the other levels which do not have any introduction pans or music.

Objectives

The known objectives are as follows:

Game Modes
ID Code Name Objective
0x00 Miniturbo Release miniturbos to score points.
0x01 LapRun01 VS Mode. Complete 3 laps before time runs out.
0x02 LapRun02 VS Mode. Complete 3 laps before time runs out. (Seems identical to mode 0x01).
0x03 Drift Perform any drift to score. (Faulty, increments score too quickly, Manual only)
0x04 ItemBox Break item boxes to score points.
0x05 EnemyDown01 Hit enemies with items to score points.
0x06 EnemyDown02 Attack a boss to score points. (E.g. Spiky Topmen, Big Pokey, etc)
0x07 EnemyDown03 Unknown. (Most likely unused or deleted. A piece of text in StaticR.rel, "EnemyDown03" may indicate it used to be related to modes 0x5 and 0x6, attacking something).
0x08 CoinGet01 Gather coins to score points.
0x09 ToGate01 Drive through gates to score points.
0x0A RocketStart Perform any level of boost start to immediately win the mission. (If you miss the boost start, you can no longer win, at all).
0x0B ItemHit Hit CPU opponents with certain items to score points. (All projectiles. Stars, Mushrooms, Mega Mushrooms and Bullet Bills do not score).
0x0C Wheelie Perform wheelies to score. (Faulty, increments score too quickly, increments for wheelies on the spot).
0x0D Slipstream Get slipstreams from CPU opponents to score points. (However, the score also increases if they slipstream someone, too).

Tutorials

In addition to these game modes, the interface for Mission Mode also has a set of screens for tutorials on how to play the game. In certain missions, before starting, you are given the ability to view a tutorial on a gameplay mechanic. This would have taken you to a screen featuring a simple text entry, and a movie clip demonstrating what to do. These tutorials do not match up completely with the objectives shown above, indicating they were probably meant as supplementary information, rather than a direct guide on how to win your objective. While there is no text for the tutorials, and the movie clips are also not present in the game's filesystem, the names of the movie clips can be found in the game's memory, indicating what they would have been about. These tutorial files were supposed to go in the /thp/tutorial/ folder.

Tutorials
Filename Estimation of Contents
00_curve.thp Steering without drifting (?)
01_drift.thp Manual Drifting
02_miniturbo.thp Obtaining miniturbos from Manual Drift
03_autodrift.thp Automatic Drifting
04_jumpaction.thp Performing tricks on ramps
05_halfpipejump.thp Performing tricks on halfpipe ramps
06_wheelie.thp Performing wheelies
07_spinturn.thp Turning on the spot (using A+B)
08_back.thp Reversing (?)
09_startdush.thp Getting a boost start in the countdown
10_jugemdush.thp Getting a boost start after respawning
11_slipstream.thp Getting a slipstream from another racer
12_itemthrow.thp Throwing/using items
13_itemequip.thp Dragging items behind you

Files Used By Mission Mode

The menus for Mission Mode access a few files on the disc to get data for mission setup, among other things. The known files are documented below.

mission_ui_single.bin

mission_ui_single.bin is a leftover file pertaining to Mission Mode that exists within MenuSingle.szs. It is a fairly simplistic file containing some basic data for every selectable mission in the menu. It consists of a series of 0xA length entries, one for each level (thus 0x40 in total), starting with 1-1, then moving to 1-2, etc. The game offsets into the file based on which level it needs data for (0xA * level number), and loads data from there. This file is used almost immediately when the menu is loaded, and referenced as you select different options in the menu.

There is no header for this file, so it purely contains data and the length is considered implicit. This is the format of each entry:

Data format
Offset Type Description
0x00 UInt16 Scenario ID
0x02 UInt16 Level button BMG ID
0x04 UInt16 Objective text BMG ID
0x06 UInt16 Tutorial text BMG ID (this also affects what movie plays)
0x08 UInt16 Drift restriction (0 = Choose, 1 = Manual, 2 = Auto, 3+ = Disables the OK button)

The Scenario ID refers to which entry of mission_single.kmt is supposed to be used (see below).

It is also worth noting that starting at Mission 3-4 and onwards, the Scenario ID in the original file is set to 0xFFFF (or -1), and this causes the game to freeze because of an out of bounds read. To access these later levels, the Scenario ID would need to be manually changed in these cases.

mission_single.kmt

When accessing the leftover menus for Mission Mode, the game attempts to load information from a file called mission_single.kmt, which is supposed to reside in /Race/MissionRun/mission_single.kmt in the game filesystem. This file is not present and presumably permanently lost. Without it, Mission Mode crashes when you try to start a level because it cannot read this file. However, it is possible to get an idea of how it is supposed to work based on a surviving routine in the game's code that is designed to load and parse this file, and thus create a new one that allows the game to continue without crashing.

The file is meant to be a long list of 64 mission objectives, as well as listing supplementary files to load to build the game world. It would have been 0x1C10 bytes long. The first 0x10 bytes are a header of unknown properties, but it doesn't matter what is written in there as it is not checked or validated by the game.

Following on from that, there are a series of 0x70 length entries, one for each level (thus 0x40 in total). The game offsets into the file based on the Scenario ID in menu_ui_single.bin for the level you select at the menu (0x70 * Scenario ID + 0x10), and loads data from there.

The format for these entries is as follows:

KMT Scenario Entry
Offset Type Description
0x00 UInt16 Mission Run file (mrxxxxx.szs, see below)
0x02 UInt16 Game Mode ID (see above)
0x04 Byte Course ID
0x05 Byte Character ID
0x06 Byte Vehicle ID
0x07 Byte Engine class (0 = 50cc, 1 = 100cc, 2 = 150cc, 3 = Battle)
0x08 UInt32 Unknown
0x0C UInt32 Unknown
0x10 Byte Unknown
0x11 Byte Unknown
0x12 Byte Unknown
0x13 Byte Unknown
0x14 Byte Unknown
0x15 Byte Unknown
0x16 Byte Unknown
0x17 Byte Unknown
0x18 Byte Unknown
0x19 Byte Unknown
0x1A Byte Unknown
0x1B Byte Unknown
0x1C UInt32 Unknown
0x20 Byte Unknown
0x21 Byte Unknown
0x22 Byte Unknown
0x23 Byte Unknown
0x24 Byte Unknown
0x25 Byte Unknown
0x26 Byte Unknown
0x27 Byte Unknown
0x28 Byte Unknown
0x29 Byte Unknown
0x2A Byte Unknown
0x2B Byte Unknown
0x2C UInt16 Time limit (seconds)
0x2E Byte Unknown
0x2F Byte Unknown
0x30 UInt32 Score required
0x34 UInt32 Unknown
0x38 UInt32 Unknown
0x3C UInt32 Unknown
0x40 UInt32 Unknown
0x44 UInt32 Unknown
0x48 UInt16 Unknown
0x4A UInt16 Unknown
0x4C UInt16 Unknown
0x4E UInt16 Unknown
0x50 UInt16 Unknown
0x52 UInt16 Unknown
0x54 UInt32 Unknown
0x58 UInt16 Unknown
0x5A Byte Unknown
0x5B Byte Unknown
0x5C Byte Unknown
0x5D Byte Unknown
0x5E Byte Unknown
0x5F Byte Unknown
0x60 Byte Unknown
0x61 Byte Unknown
0x62 Byte Unknown
0x63 Byte Unknown
0x64 Byte Unknown
0x65 Byte Unknown
0x66 Byte Unknown
0x67 Byte Unknown
0x68 Byte Unknown
0x69 Byte Unknown
0x6A Byte Unknown
0x6B Byte Unknown
0x6C Byte Unknown
0x6D Byte Unknown
0x6E Byte Unknown
0x6F Byte Unknown

The "Mission Run" file listed at 0x00 into the entry is a supplementary file to load from the disc, and it can contain things such as alternate KMP files, additional models to load, etc. The number entered is converted to decimal, then appended to the string "mr", and finally ".szs" is appended. If the number is less than ten, one leading zero is added. The game will then seek the file in /Race/MissionRun. So, for example, if it were set to 0x0000, the game will try to load mr00.szs. If set to 0x000F, it would load mr15.szs, etc. If it fails to find the file, the mode will still load, but no file replacements will occur.

It appears to be impossible to define any CPUs to load, which makes fulfilling some mission objectives completely impossible. However, it is possible to add CPUs via cheat codes, which then allows the objectives to be fulfilled.

Accessing Mission Mode

It is not possible to access Mission Mode ordinarily, so in order to access it, you need to use a cheat code. Codes exist for the PAL, NTSC-U and NTSC-J versions of Mario Kart Wii. Please read the instructions carefully to avoid freezes and unexpected outcomes!

Playing the Mode

There are two distinct cheat codes available to load and play Mission Mode. The first one is designed so that you do not need to create mission_single.kmt, and allows you to test a KMT entry by entering it directly into the cheat code. In this case, every single level will load the scenario entered in the cheat code. The second one assumes that you have created mission_single.kmt and therefore does not allow you to enter scenario data into the code; however you can run many different levels in one session because you can select from the level list to load different scenarios. You cannot run both at once. In both cases, to activate the code, load the Single Player menu, and then press START or +, depending on your controller. The Mission Mode Menu will pop up after a brief delay.

Please be aware that completing missions may damage your save file. It apparently overwrites the leaderboard for the current competition/tournament on the system. This is especially important to note if you use Wiimmfi Competitions/Tournaments as the times can end up being submitted to the online leaderboards. So it would be best to use a license that you do not intend to connect to Wiimmfi.

PAL Codes

Mission Mode and KMT Patch [PAL]


Mission Mode without KMT Patch [PAL]


NTSC-U Codes

Mission Mode and KMT Patch [NTSC-U]


Mission Mode without KMT Patch [NTSC-U]


NTSC-J Codes

Mission Mode and KMT Patch [NTSC-J]


Mission Mode without KMT Patch [NTSC-J]


Other Useful Codes

These are some other codes that may be useful when testing Mission Mode, and allow greater functionality of the mode.

The following code allows CPUs to be loaded in Mission Mode:

CPUs in Mission Mode [PAL]


CPUs in Mission Mode [NTSC-U]


CPUs in Mission Mode [NTSC-J]


The following code prevents the game from crashing if a track does not have valid MSPT entries:

MSPT Antifreeze [PAL]


MSPT Antifreeze [NTSC-U]


MSPT Antifreeze [NTSC-J]


The following code replaces the missing text in Mission Mode with text IDs, allowing you to see where text normally renders:

Mission Text ID Labels [PAL]


Mission Text ID Labels [NTSC-U]


Mission Text ID Labels [NTSC-J]


The following code adds a Mission Mode button to the Single Player Menu, circumventing the need to press START/+:

Mission Mode Button [PAL]


Mission Mode Button [NTSC-U]


Mission Mode Button [NTSC-J]


The following code prevents the game from crashing if mission_ui_single.bin contains a Scenario ID set to -1:

Scenario -1 Antifreeze [PAL]


Scenario -1 Antifreeze [NTSC-U]


Scenario -1 Antifreeze [NTSC-J]


All codes were created by MrBean35000vr.

Mission Mode on Wiimmfi

The Mission Mode missions have the same internal track IDs as competitions. This means, that playing on Mission Mode will sometimes cause Mission times to show up on the Wiimmfi leaderboards. If you are embedding Mission Mode into your Custom Track Distribution, you have to make sure this doesn't happen so your users don't get banned for sending wrong times to our leaderboard. The easiest way would be to change the ghost and ranking upload URLs within the StaticR.rel back to the Nintendo servers so they don't reach the Wiimmfi server.

Porting Tournaments/Competitions to Mission Mode

If you can extract the U8 archive out of a tournament, you can in most cases convert it to work with Mission Mode. Save the extracted U8 archive as a Mission Run file (mrxx.szs) for the Race/MissionRun folder (where xx is the number you define in the KMT scenario), open any and all CommonObj files that the tournament usually requires and copy their internal files into the Mission Run file, then set up the KMT with the correct objective, and correct file ID and add mrxx.szs to the filesystem. You will then be able to play the tournament in Mission Mode, though you will be restricted to whatever character/vehicle you specified in the KMT, and you will have a time limit (which you will also need to specify). There do not seem to be any modes in Mission Mode that do not feature a time limit, so it is not possible to remove that.