Item.bin

From MK8
Revision as of 16:43, 2 July 2022 by Zachruff (talk | contribs) (Research done by Shadow)
Jump to navigation Jump to search

This BIN file with the ITEM identifier stores the item probability of different item sets uniquely for human or AI players at a specific distance to the lead racer, and the distances themselves.

It should be noted that the game applies several additional hardcoded rules on top of the probabilities, like a (powerful) item not appearing in the first seconds after the race start or after it has been collected before. If it cannot find a valid item, the driver collects a Coin as a fallback value. It is unclear whether the new sections in Mario Kart 8 Deluxe files contain the required data for these rules in the file rather than in code.

Sections

The file is organized into the following sections which describe the item sets or distances available for a specific game mode:

  • ITST - Title Screen Race
  • ITS2 - Race
  • ITDS - Race Distances
  • ITS3 - Title Screen Battle
  • ITS4 - Battle
  • ITRT - Battle Distances
  • ITDR - Unknown (Mario Kart 8 Deluxe only)
  • ITRG - Unknown (Mario Kart 8 Deluxe only)
  • ITGF - Unknown (Mario Kart 8 Deluxe only)
  • ITDP - Unknown (Mario Kart 8 Deluxe only)
Caption text
Section ID Internal Usage Rows Tables Size Usage/Notes
ITST unknown 12 20 unknown Title Screen Race. Only used on Wii U.
ITS2 unknown 10 20 unknown Race. Only used on Wii U.
ITDS unknown 10 20 unknown Race Distances. Only used on Wii U.
ITS3 unknown 5 1 unknown Title Screen Battle. Only used on Wii U.
ITS4 unknown 10 22 unknown Battle. Only used on Wii U.
ITRT Reaction 10 1 0x28 Battle Distances. Used in both.
ITDR Dist Prob 25 1 0x170 Only present in Mario Kart 8 Deluxe
ITRG Rank to Group 23 1 0xC Only present in Mario Kart 8 Deluxe
ITGF Group Factor 9 25 0x5C Only present in Mario Kart 8 Deluxe
ITDP Double Permission 23 1 0x4 Only present in Mario Kart 8 Deluxe


Item Sets

For each game mode, different item sets exist. Several item sets are unused or cannot be used directly. The accessible ones are split into a set used for human-controlled drivers and a set for AI drivers, possibly to prevent AI players from getting specific items (though they can handle all "correctly").

Race

Each Race game mode (ITST and ITS2) contains item sets in the following order:

  • Grand Prix
  • Grand Prix (AI driver)
  • All Items
  • All Items (AI driver)
  • Mushrooms Only
  • Mushrooms Only (AI driver)
  • Shells Only
  • Shells Only (AI driver)
  • Bananas Only
  • Bananas Only (AI driver)
  • Bob-ombs Only
  • Bob-ombs Only (AI driver)
  • Mushrooms 1 (unused)
  • Mushrooms 1 (unused, AI driver)
  • Shells (unused)
  • Bananas (unused)
  • Bob-ombs (unused)
  • Mushrooms 2 (unused)
  • Frantic Mode
  • Frantic Mode (AI driver)

Battle

Each Battle game mode (ITS3 and ITS4) contains item sets in the following order:

  • All Items
  • All Items (AI driver)
  • Mushrooms Only
  • Mushrooms Only (AI driver)
  • Shells Only
  • Shells Only (AI driver)
  • Bananas Only
  • Bananas Only (AI driver)
  • Bob-ombs Only
  • Bob-ombs Only (AI driver)
  • Shells and Bananas 1 (unused)
  • Mushrooms (unused)
  • Shells (unused)
  • Bananas (unused)
  • Bob-ombs (unused)
  • Shells and Bananas 2 (unused)
  • Frantic Mode
  • Frantic Mode (AI player)

Items

In each item set, the item probabilities (the "columns" of an item probability table) are available in the following order:

  • Banana
  • Green Shell
  • Red Shell
  • Mushroom
  • Bob-omb
  • Blooper
  • Spiny Shell
  • Triple Mushrooms
  • Star
  • Bullet Bill
  • Lightning Bolt
  • Gold Mushroom
  • Fire Flower
  • Piranha Plant
  • Super Horn
  • Boomerang
  • Coin
  • Triple Bananas
  • Triple Green Shells
  • Triple Red Shells
  • Crazy Eight
  • Boo (Mario Kart 8 Deluxe only)
  • Feather (Mario Kart 8 Deluxe only)

Distances

Mario Kart 8 uses a distance-based algorithm relative to the first player to determine the item a player receives. The distance determines the "row" of an item probability table from which the probability will be chosen. To map a distance to a row index, 10 limits are configured separately for human or AI drivers.

In Battle mode, there is of course no such distance measurement possible, so the "rows" of the item probability table map to the following game states:

Row Index Minute Balloons left
0 2+ 2+
1 2+ 2
2 2+ 1
3 1 2+
4 1 2
5 1 1+
6 0 2+
7 0 2
8 0 1
9 Any 0

Tools

The following tools can handle Item.bin files: