Filesystem/Race/Common.szs/ItemSlot.bin
ItemSlot.bin is a sub file of /Race/Common.szs. It contains a set of tables used for Item Box Settings that control the item roulette probabilities in race. In competitions, Nintendo also used a variant that can be used individually in specific courses, named ItemSlotTable.slt.
File Format
Both ItemSlot.bin and ItemSlotTable.slt share the same table-based format, and the difference between them is that the latter lacks of Battle mode tables originally. However, the file would still work if replaced with a full ItemSlot.bin set of tables.
Header
Offset | Type | Description |
---|---|---|
0x00 | Byte | Number of tables. 12 for ItemSlot.bin, 6 for ItemSlotTable.slt. |
0x01 | End of header, start of first table. |
Table Format
Offset | Type | Description |
---|---|---|
0x00 | Byte | Number of columns C. |
0x01 | Byte | Number of rows R. |
C + N | Byte | Item chance cell corresponding to the R row from the C column. In original files, this value is a range between 0 to 200, being each unit a 0.5% of chance, and all rows in a single column add to 200, but neither of those is required for the slot table to work. |
Table list
Index | Description |
---|---|
0 | Item probabilities for the player in Grand Prix mode. |
1 | Item probabilities for the CPU in Grand Prix mode. |
2 | Item probabilities for the player in VS mode. |
3 | Item probabilities for the CPU in VS mode. |
4 | Item probabilities for the player in online VS mode. |
5 | Special Item Boxes' probabilities. |
6 | Item probabilities for the player in Balloon Battle mode (not used in ItemSlotTable.slt). |
7 | Item probabilities for the CPU in Balloon Battle mode (not used in ItemSlotTable.slt). |
8 | Item probabilities for the player in Coin Runners mode (not used in ItemSlotTable.slt). |
9 | Item probabilities for the CPU in Coin Runners mode (not used in ItemSlotTable.slt). |
10 | Item probabilities for the player in online Balloon Battle mode (not used in ItemSlotTable.slt). |
11 | Item probabilities for the player in online Coin Runners mode (not used in ItemSlotTable.slt). |
Columns
In Grand Prix and VS modes, the columns represent 1-12th positions; in Battle modes they represent how many points/coins you are behind the player in first; and for Special Item Boxes they represent the Special Item Box ID used in the KMP itembox object. In online and multiplayer modes, the values are recalculated for <12 player rooms.
Index | Description |
---|---|
0 | 1st position. |
1 | 2nd position. |
2 | 3rd position. |
3 | 4th position. |
4 | 5th position. |
5 | 6th position. |
6 | 7th position. |
7 | 8th position. |
8 | 9th position. |
9 | 10th position. |
10 | 11th position. |
11 | 12th position. |
Index | Description |
---|---|
0 | Between 0 to 3 points behind the player with the most points. |
1 | Between 3 to 5 points behind the player with the most points. |
2 | More than 5 points behind the player with the most points. |
Index | Description |
---|---|
0 | Between 0 to 4 coins behind the player with the most coins. |
1 | Between 4 to 7 coins behind the player with the most coins. |
2 | More than 7 coins behind the player with the most coins. |
Index | Description |
---|---|
0 | First set (0x01). |
1 | Second set (0x02). |
2 | Third set (0x03). |
3 | Fourth set (0x04). |
4 | Fifth set (0x05). |
5 | Sixth set (0x06). |
6 | Seventh set (0x07). |
7 | Eighth set (0x08). |
8 | Ninth set (0x09). |
9 | Tenth set (0x0A). |
10 | Eleventh set (0x0B). |
11 | Twelfth set (0x0C). |
12 | Thirteenth set (0x0D) (unused). |
13 | Fourteenth set (0x0E) (unused). |
14 | Fifteenth set (0x0F) (unused). |
15 | Sixteenth set (0x10) (unused). |
Rows
The rows represent the item values, common for all tables (19 total items).
Index | Description |
---|---|
0 | Green Shell. |
1 | Red Shell. |
2 | Banana. |
3 | Fake Item Box. |
4 | Mushroom. |
5 | Triple Mushroom. |
6 | Bob-omb. |
7 | Blue Shell. |
8 | Lightning. |
9 | Star. |
10 | Golden Mushroom. |
11 | Mega Mushroom. |
12 | Blooper. |
13 | POW Block. |
14 | Thundercloud. |
15 | Bullet Bill. |
16 | Triple Green Shells. |
17 | Triple Red Shells. |
18 | Triple Bananas. |
Item Decision
The decision about the item is made when touching the item box. The lottery is generally only an animation effect. If clicking the item button the selected item appears immediately.
Some items are limited (e.g. Thundercloud to 1 player). If playing online, the duration of the lottery is used to communicate with the other players. While running this protocol, the immediate activation is disabled. If the selected item is forbidden, the player gets a single mushroom instead. Sometimes the protocol fails and the limit is exceeded (e.g. 2 Thunderclouds at same time).
Tools
The following tools can handle ItemSlot.bin:
- Item Slot Editor, by MrDark35000vr
- ItemSlot Editor, by Atlas
- Wiimms SZS Tools, by Wiimm, see wszst text and wszst binary for details.