Network Protocol/RACEHEADER_1

From Custom Mario Kart
Jump to navigation Jump to search


This article describes the record type RACEHEADER_1 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.

Offset Size Description
0x00 4 bytes Frames since race start (starts counting when all players are synced).
0x04 4 bytes Shared random seed used for various things.
0x08 1 bit Battle Type:
  • 0: Balloon Battle
  • 1: Coin Runners
0x08.1 31 bits Team Bitfield:
  • 0: Blue Team
  • 1: Red Team
0x0C 2 bytes Amount of frames the player has lagged.
0x0E 1 byte Vehicle for Player 1.
0x0F 1 byte Character for Player 1.
0x10 1 byte Vehicle for Player 2.
0x11 1 byte Character for Player 2.
0x12 2 bytes Countdown time.
0x14 2 bytes Star rank of each player.
0x16 1 byte Course being played.
0x17 1 byte Player Type:
  • 0: Regular player
  • 1: ??
  • 2: Spectator
0x18 12 bytes Client slot for each player.
0x24 1 byte Engine Class:
  • 0: 50cc
  • 1: 100cc
  • 2: 150cc
  • 3: Mirror
0x25 3 bytes Padding.