Network Protocol/EVENT
This pages is related to MKWii Network Protocol and describes the record type EVENT.
Template:MKWii Network Protocol RACE
The record EVENT transmits events. Events are:
- Activating an item.
- Lose an item.
- Pick up an item.
A new event is placed in the first free slot of EVENT. The data of all events are stored after the slot list. This announcement is active for 200/60 seconds and the data is not modified during this time. This means that each Wii calculates the item routes and the interaction by its own.
Event Types
There are 256 (0x100) possible event codes and many of them are used. After a first analysis, it seems that the lower 4 bits defines the item type (other than these item codes) and the 4 upper bits the action code. The value 0x10 declares an unused slot.
Code | Data Size |
Data Type |
Description |
---|---|---|---|
0x10 | — | — | The neutral value for unused slots. |
0x23 | 0x03 | USED | Mushroom used |
0x24 | 0x03 | USED | Star activated |
0x26 | 0x03 | USED | Lightning activated |
0x28 | 0x03 | USED | Mega Mushroom activated |
0x2a | 0x03 | USED | Blooper activated |
0x2b | 0x03 | USED | ? POW Block activated |
0x2c | 0x03 | USED | Golden Mushroom finished or lost |
0x2e | 0x03 | USED | Thundercloud found and activated |
0x40 | 0x14 | SHOT | Green Shell shot |
0x41 | 0x15 | SHOT | Red Shell shot forward |
0x42 | 0x14 | SHOT | ? Banana thrown forward |
0x45 | 0x15 | SHOT | Spiny Shell shot |
0x47 | 0x14 | SHOT | ? Fake Item Box thrown |
0x49 | 0x15 | SHOT | Bob-omb thrown |
0x60 | 0x14 | ? | ? |
0x61 | 0x14 | ? | ? |
0x62 | 0x14 | ? | ? Item at tail lost |
0x63 | 0x14 | ? | ? |
0x64 | 0x14 | ? | ? |
0x65 | 0x14 | ? | ? |
0x66 | 0x14 | ? | ? Mushroom lost |
0x67 | 0x14 | ? | Fake Item Box hit |
0x68 | 0x14 | ? | ? |
0x69 | 0x14 | ? | Bob-omb touched (tail of rival) |
0x6a | 0x14 | ? | ? |
0x6b | 0x14 | ? | ? |
0x6c | 0x14 | ? | ? |
0x6d | 0x14 | ? | ? |
0x80 | 0x05 | MISC | looping, wheely, hop, ... |
0x81 | 0x05 | MISC | Red Shell disintegrated (not only hit) |
0x82 | 0x05 | MISC | Banana touched |
0x83 | 0x05 | MISC | Mushroom picked up and activated |
0x84 | 0x05 | MISC | Star picked up and activated |
0x85 | 0x05 | MISC | ? |
0x87 | 0x05 | MISC | ? |
0x89 | 0x05 | MISC | ? Bob-omb exploded |
0x8e | 0x05 | MISC | Thundercloud lost (Respawn) |
0xa1 | 0x05 | MISC | ? miscellaneous |
0xae | 0x05 | MISC | Thundercloud caught |
0xc1 | 0x04 | ? | ? |
0xe0 | 0x14 | DROP | ? |
0xe1 | 0x14 | DROP | Red Shell dropped |
0xe2 | 0x14 | DROP | Banana dropped |
0xe3 | 0x14 | DROP | Mushroom dropped |
0xe4 | 0x14 | DROP | Star dropped |
0xe5 | 0x14 | DROP | ? |
0xe6 | 0x14 | DROP | ? |
0xe7 | 0x14 | DROP | ? |
0xe8 | 0x14 | DROP | ? |
0xe9 | 0x14 | DROP | ? |
0xea | 0x14 | DROP | ? |
0xeb | 0x14 | DROP | ? |
0xec | 0x14 | DROP | ? |
0xed | 0x14 | DROP | ? |
To find the DATA for a specific slot, the slots must be iterated to skip the previous data.
Event Data Structure
The data structure depends on the data types defined by the slot list of EVENT. A data size for a single event differs from 3 to 21 bytes. The data is not aligned. It seems, that each event data starts with a 2 byte time stamp, a copy of the timer of record RACE at offset 0x02.
Type USED
An event of type "USED" is sent when you use an item, i. e. a Mushroom, a Blooper or a Lightning. It's sent when using an item which won't land on the road.
Type SHOT
An event of type "SHOT" is sent when you throw a Green Shell, Red Shell or Spiny Shell, or throw (not drop) a Banana, a Bob-omb or a Fake Item Box.
Type DROP
An event of type "DROP" is sent when you drop/put an item. Either by putting it on the road or by getting hit by a Lightning/POW Block.
Type MISC
Type misc is used for different things. All records have 5 byte, the first two being the time stamp, the last three being a sub-ID indicating the actual event.