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
The byte describing an event type is split up into two parts: a 3 bit action type followed by a 5 bit object number for the item involved.
Id | Name | Description |
---|---|---|
0 | NONE | The neutral value for unused slots. Always paired with object id 0x10 |
1 | USED | Using an item, such as Lightning or a Mushroom. |
2 | SHOT | Throwing an item, either forwards or backwards, such as a Green Shell or Banana. |
3 | HIT-DRAGGED | Hitting the dragged item of a player (can be yourself), either with your vehicle or an item. |
4 | HIT-FREE | Hitting any item that isn't being dragged, either with your vehicle or an item. |
5 | LOSE? | Used when a Thunder Cloud is lost, either from its timer running out or from passing it to another player |
6 | ? | Unknown |
7 | DROP | Dropping an item when hit (including ones that disappear on landing) |
Event Data Structure
The data structure depends on the data types defined by the slot list of EVENT. The data is not aligned. To find the DATA for a specific slot, the slots must be iterated to skip the previous data. The data size for a single event differs from 3 to 21 bytes, depending on the action type:
Id | Size (bytes) |
---|---|
1 | 3 |
2 | Varies by item |
3 | 20 |
4 | 5 |
5 | 5 |
6 | 4 |
7 | 20 |
Every event data starts with a 2 byte time stamp, a copy of the timer of record RACEHEADER_1.