Network Protocol/ITEM

From Custom Mario Kart
< Network Protocol(Redirected from ITEM)
Jump to navigation Jump to search


This article describes the record type ITEM of the Network Protocol.

Race Packet Sections
Name Amount Size Description
SLOT 0-1 0x08 Only used for redirected data via a proxy. The record identifies the original client by its slot number.
HEADER 1 0x10 A header for a race packet.
RACEHEADER_1 1 0x28 A record with basic race data.
RACEHEADER_2 0-1 0x28 A record with game-mode specific race data (not present in live view).
ROOM 0-1 0x04 A record containing a friend room message (not present outside friend room lobbies).
SELECT 0-1 0x38 A record containing data to set up a match (not present during races).
RACEDATA 1-2 0x40 A record containing race data for each player, such as positions or inputs.
USER 0-1 0xC0 A record containing user data such as Miis and friend codes.
ITEM 1-2 0x08 A record containing information about players' items.
EVENT 1 ≥ 0x18 A record transmitting item events.

typedef struct udp_item_t
 /*00*/  u8	timer;               // start time of item in 8/60s := RACE.timer/8
 /*01*/  u8	item_box;            // item in the box => mkw_item_type_t
 /*02*/  u8	item_tail;           // item at tail => mkw_item_type_t
 /*03*/  u8	mode;                // activation mode: 0=no item, 1-7=handshake
 /*04*/  u8	tail_mode;           // ? 3=hold, 4=shoot, 5=3/3, 6=2/3, 7=1/3
 /*05*/  u8	acknowledge;         // ? 0=ok, 1=fail
 /*06*/  u8	ack_timer;           // return the timer value to accept item of other client
 /*07*/  u8	padding_07;          // padding, always 0

__attribute__ ((packed)) udp_item_t;

Item Types

The members item_box and item_tail describe which item is available in the item box roulette and which around the vehicle.

Offset Item
0x00 Green Shell
0x01 Red Shell
0x02 Banana
0x03 Fake Item Box
0x04 Mushroom
0x05 Triple Mushroom
0x06 Bob-omb
0x07 Blue Shell
0x08 Lightning
0x09 Star
0x0A Golden Mushroom
0x0B Mega Mushroom
0x0C Blooper
0x0D POW Block
0x0E Thunder Cloud
0x0F Bullet Bill
0x10 Triple Green Shells
0x11 Triple Red Shells
0x12 Triple Bananas
0x13 Unused item
0x14 None