Difference between revisions of "RKC (File Format)"

From Custom Mario Kart
Jump to navigation Jump to search
(→‎RKCO: Dry Dry Desert is the MKDD one)
Line 147: Line 147:
 
<li>The bats from Warios Gold Mine</li>
 
<li>The bats from Warios Gold Mine</li>
 
<li>Bomb cars (no normal cars!) from Moonview Highway</li>
 
<li>Bomb cars (no normal cars!) from Moonview Highway</li>
<li>Pokeys from DS Desert Hills / Dry Dry Desert</li>
+
<li>Pokeys from DS Desert Hills / Dry Dry Ruins</li>
 
<li>and probably some more which I forgot</li>
 
<li>and probably some more which I forgot</li>
 
</ul>
 
</ul>
  
There are a few more game modes (the ones which do not appear in the list of game modes above), but their meaning and usage is unknown.  
+
There are a few more game modes (the ones which do not appear in the list of game modes above), but their meaning and usage is unknown.
  
 
=== RKCS ===
 
=== RKCS ===

Revision as of 13:17, 21 May 2016

RKC Files are files downloaded by Mario Kart Wii using the WC24 download engine. The RKC file contains data and an SZS file with a new KMP for the competition. The RKC file is part of the DISTMAP.BIN file, which is stored inside the wc24dl.vff file in the savegame.

Known editors:


Header

The RKC Files contain multiple headers, they are all explained here.

RKCT

The RKCT, or main header, is 0x10 in length.

Offset Type Description
0x00 char[4] 'RKCT' in ASCII; File identifier
0x04 int Length of the data in bytes.
0x08 int Length of all file headers. (offset to the beginning of the Yaz0 file)
0x0C int Unknown (always 0x640 = 1600), maybe a version number?

RKCO

The RKCO Header contains all information for the competition. Stuff like course id, CommonObj that gets loaded and other information. This header is 0x3C in length

Offset Type Description
0x00 char[4] 'RKCO' in ASCII; File identifier
0x04 short Game mode - laps or points. Possible values:
0: TT without CPU, 1: TT with CPU, 11: VS without CPU, 12: VS with CPU,
3: many different objects, see the list below,
4: Spikey Topmen, 5: Coins, 6: Stargates
0x06 byte Course ID
0x07 byte Engine class. 0: 50cc, 1: 100cc, 2: 150cc, 3: battle
0x08 byte Amount of laps (laps, so triggered with checkpoints, not scores)
0x09 byte (always empty, unused)
0x0A short Vehicle restriction (0: karts only, 1: bikes only, 2: no restriction)
0x0C short Camera angle (3: normal camera, 7: camera from above)
0x0E short Minimap object. Defines an object to be shown on the minimap
0x10 short (always empty)
0x12 short (always empty)
0x14 short Cannon flag. If a track has no cannon, this is set to 0. If a track has a cannon and its
setting is 0xffff, it is set to 0, too. Otherwise, it is set to the value of the cannon setting.
0x16 short Amount of CPU players
0x18 short[11] Driver and vehicle settings for CPU players. First byte driver, second byte vehicle.
0xFF for random driver / vehicle or unused slots
0x2E byte Controller. 0x00 for "free choice", 0x01 for "Wii-Wheel-only"
0x2F byte (always empty, unused)
0x30 short Common object files to load. Bit field for the different files.
0x32 short Score (amount of gates, amount of coins, ...)
0x34 byte Intro settings. Between 0x00 and 0x03, 0x00: no intro video
0x35 byte (always empty, unused)
0x36 short Unknown, either 18,000 for tracks with laps, or 36,000 for tracks with a score.
Not used by the game
0x38 short (always empty, unused)
0x3A short This seems to be a checksum.

Game mode 3 is interesting; in this game mode, many different objects give you a point when you destroy / hit / activate them, including the following:

  • Goomba
  • Crab
  • Cataquack
  • Monty Mole
  • Leaf pile
  • woodbox
  • The bats from Warios Gold Mine
  • Bomb cars (no normal cars!) from Moonview Highway
  • Pokeys from DS Desert Hills / Dry Dry Ruins
  • and probably some more which I forgot

There are a few more game modes (the ones which do not appear in the list of game modes above), but their meaning and usage is unknown.

RKCS

This is the part of a RKC file that contains the actual data. It only contains a Yaz0 compression (SZS file) of a KMP file and some object files which are neither in the course the competition bases on nor in one of the CommonObj files.

This SZS file *must* contain the folders "AIParam" and "ItemSlotTable", but both of them may be empty if you do not want to modify the AI settings or the items.

The KMP file of the competition has a few interesting things:

  • Not all sections are included (if there are no CPU players, there is no need for CPU routes), if there are no items, or at least no bullet bill and no red shell, the item routes may also be missing.
  • The MSPT section is included (stop point) and may have multiple entries
  • There can be multiple start points, like in a battle.

Replacing and ripping RKC files

NOTE: The data blocks which were previously known as "RSF Files" (this name was invented by khacker35000vr to name unknown data groups) are NOT part of the actual competition. If you extract the VFF file and not just open it in a hex editor, you can see that there is no data after the RKC file. The "trash data" (RSF) in the VFF file after the RKC data is just random data from the previous competition, because Nintendo just copies the new RKC file to the specific offset and does not clear the rest of the file. So, when a new competition is smaller than the old one, those trash bytes stay in the file even when they are not needed.

Replacing

  • Search the RKC file in the VFF File.
  • Copy and paste (overwrite old data) the data of your custom RKC file at the good offset
  • If the new RKC file is larger than the older one this may not work, but at the moment there is no tool to create larger VFF files.

Ripping

  • Use riivolution along with the savegame xml when a competition is in progress, or copy your savegame to SD with tools like the Savegame Manager GX
  • Extract the wc24dl.vff with "vffdump.py".
  • Open the file "DISTMAP.BIN" in a hex editor and search for "RKCT"
  • Check the size and copy that amount of bytes to a new file (RKC)

Misc.

  • Custom tournaments are not a very popular thing, only Vulcanus2 succesfully made a custom tournament and probably only a few others have played it.
  • All downloaded contents (competition and other players' ghost data) for Mario Kart Wii are saved in wc24dl.vff.
  • It is unknown if wc24dl.vff is a distributable file.