Difference between revisions of "Network Protocol/ITEM"

From Custom Mario Kart
Jump to navigation Jump to search
m (Official Item Names)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This pages is related to [[MKWii Network Protocol]] and describes the record type '''ITEM'''.
+
== Overview ==
One record for each player is transmitted together with the [[MKWii Network Protocol/RACE|race data]]:
+
This article describes the record type '''ITEM''' of the [[Network Protocol]].
  
{{MKWii Network Protocol RACE}}
+
{{Network Protocol RACE}}
 
 
Description of the record type '''ITEM''' in GNU C notation.
 
  
 
<pre>
 
<pre>
Line 16: Line 14:
 
  /*05*/  u8 acknowledge;        // ? 0=ok, 1=fail
 
  /*05*/  u8 acknowledge;        // ? 0=ok, 1=fail
 
  /*06*/  u8 ack_timer;          // return the timer value to accept item of other client
 
  /*06*/  u8 ack_timer;          // return the timer value to accept item of other client
  /*07*/  u8 unknown_07;          // unknown data (always 0?)
+
  /*07*/  u8 padding_07;          // padding, always 0
  
 
  /*08*/
 
  /*08*/
Line 23: Line 21:
 
</pre>
 
</pre>
  
== Item types ==
+
== Item Types ==
 +
The members ''item_box'' and ''item_tail'' describe which item is available in the item box roulette and which around the vehicle.
  
The members ''item_box'' and ''item_tail'' describe, which item is available in the box (top left of the screen) and at the tail of the vehicle (or around the vehicle). Sometimes ''item_box'' switch back to ''no item'', but because of previous ''modes'', a mushroom can be identified. This make some cheat detection more difficult.
+
{| class="textbox grid sortable center alt"
 
+
|+ Items
The following table shows the item codes. Item cheats use the same codes:
+
! Offset
{| id="item-code" class="textbox grid alt sortable"
+
! Item
|+ Item codes of [[Mario Kart Wii]]
 
! code !! name !! comments
 
 
|-
 
|-
| 0x00 || Green Shell || —
+
| 0x00
 +
| Green Shell
 
|-
 
|-
| 0x01 || Red Shell || —
+
| 0x01
 +
| Red Shell
 
|-
 
|-
| 0x02 || Banana || —
+
| 0x02
 +
| Banana
 
|-
 
|-
| 0x03 || Fake Item Box || —
+
| 0x03
 +
| Fake Item Box
 
|-
 
|-
| 0x04 || Mushroom || —
+
| 0x04
 +
| Mushroom
 
|-
 
|-
| 0x05 || Triple Mushroom || —
+
| 0x05
 +
| Triple Mushroom
 
|-
 
|-
| 0x06 || Bob-omb || —
+
| 0x06
 +
| Bob-omb
 
|-
 
|-
| 0x07 || Spiny Shell || —
+
| 0x07
 +
| Blue Shell
 
|-
 
|-
| 0x08 || Lightning || —
+
| 0x08
 +
| Lightning
 
|-
 
|-
| 0x09 || Star || —
+
| 0x09
 +
| Star
 
|-
 
|-
| 0x0a || Golden Mushroom || —
+
| 0x0A
 +
| Golden Mushroom
 
|-
 
|-
| 0x0b || Mega Mushroom || —
+
| 0x0B
 +
| Mega Mushroom
 
|-
 
|-
| 0x0c || Blooper || —
+
| 0x0C
 +
| Blooper
 
|-
 
|-
| 0x0d || POW Block || —
+
| 0x0D
 +
| POW Block
 
|-
 
|-
| 0x0e || Thundercloud || —
+
| 0x0E
 +
| Thunder Cloud
 
|-
 
|-
| 0x0f || Bullet Bill || —
+
| 0x0F
 +
| Bullet Bill
 
|-
 
|-
| 0x10 || Triple Green Shell || —
+
| 0x10
 +
| Triple Green Shells
 
|-
 
|-
| 0x11 || Triple Red Shell || —
+
| 0x11
 +
| Triple Red Shells
 
|-
 
|-
| 0x12 || Triple Banana || —
+
| 0x12
 +
| Triple Bananas
 
|-
 
|-
| 0x13 || ''not used'' || This code was never seen.
+
| 0x13
 +
| {{Unknown|Unused item}}
 
|-
 
|-
| 0x14 || ''none item'' || Code for ''no item available''. Sometimes (context dependent) this code means ''Mushroom''.
+
| 0x14
 +
| None
 
|}
 
|}
  
 
+
{{Network Protocol}}
<br/>
+
[[Category:Network Protocol|I]]
{{MKWii Network Protocol}}
 
[[category: Network Protocol|R]]
 

Latest revision as of 20:01, 29 April 2023

Overview

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

 /*08*/
}
__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.

Items
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