System Messages
This page describes the structure and purpose of Teeworlds 0.6 system messages.
| Message ID | Name |
|---|---|
| 0 | Unused |
| 1 | NETMSG_INFO |
| 2 | NETMSG_MAP_CHANGE |
| 3 | NETMSG_MAP_DATA |
| 4 | NETMSG_CON_READY |
| 5 | NETMSG_SNAP |
| 6 | NETMSG_SNAPEMPTY |
| 7 | NETMSG_SNAPSINGLE |
| 8 | Unused |
| 9 | NETMSG_INPUTTIMING |
| 10 | NETMSG_RCON_AUTH_STATUS |
| 11 | NETMSG_RCON_LINE |
| 12 | Unused |
| 13 | Unused |
| 14 | NETMSG_READY |
| 15 | NETMSG_ENTERGAME |
| 16 | NETMSG_INPUT |
| 17 | NETMSG_RCON_CMD |
| 18 | NETMSG_RCON_AUTH |
| 19 | NETMSG_REQUEST_MAP_DATA |
| 20 | Unused |
| 21 | Unused |
| 22 | NETMSG_PING |
| 23 | NETMSG_PING_REPLY |
| 24 | Unused |
| 25 | NETMSG_RCON_CMD_ADD |
| 26 | NETMSG_RCON_CMD_REM |
1 - NETMSG_INFO
The first message sent by the client. It gives the server the client's version and optional password.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Client -> Server
Structure:
| Field | Type | Description |
|---|---|---|
| Version | String | The network version string used to check protocol compatibility. |
| Password | String | The server password, if needed. May be empty. |
2 - NETMSG_MAP_CHANGE
Sent by the server when the client should switch to a different map.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Map Name | String | The name of the map. |
| Map CRC | Integer | CRC32 of the complete original .map file, represented as a signed 32-bit integer. |
| Map Size | Integer | Total original file size in bytes. |
3 - NETMSG_MAP_DATA
Sent by the server to transfer a raw chunk of the map file.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Last | Boolean | 1 if this is the final map chunk; otherwise 0. Packed as an integer. |
| Map CRC | Integer | The same map CRC announced in NETMSG_MAP_CHANGE. |
| Chunk | Integer | Zero-based index of this map chunk. |
| Chunk Size | Integer | Number of raw bytes in Data. |
| Data | Binary | Exactly Chunk Size bytes from the original .map file. |
Each request receives one map chunk containing up to 896 bytes. Its file offset is Chunk * 896. Last is set to 1 when the chunk reaches the end of the file, including when the final chunk contains a full 896 bytes.
The first four fields use variable-length integer encoding. Data contains the bytes of the requested file slice. Packet-level compression is decoded before reassembling the file; zlib-compressed blocks inside the map remain part of the downloaded file.
4 - NETMSG_CON_READY
Sent by the server when the connection is ready and the client should send its start info.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Server -> Client
Structure:
Empty payload
5 - NETMSG_SNAP
This message sends one part of a snapshot delta split across multiple chunks.
- Vital : ❌
- Instant Sending : ✅
- Sending Path : Server -> Client
INFO
Snap is a complex type of chunk. You can find more information about it on Snap Structure page.
6 - NETMSG_SNAPEMPTY
This message reports that the snapshot has no changes from its baseline. The client keeps the baseline items and advances to the current tick.
- Vital : ❌
- Instant Sending : ✅
- Sending Path : Server -> Client
INFO
Snap is a complex type of chunk. You can find more information about it on Snap Structure page.
7 - NETMSG_SNAPSINGLE
This message sends a snapshot delta in a single chunk. Without a baseline, the delta contains the full item state.
- Vital : ❌
- Instant Sending : ✅
- Sending Path : Server -> Client
INFO
Snap is a complex type of chunk. You can find more information about it on Snap Structure page.
9 - NETMSG_INPUTTIMING
Sent by the server when it receives input for a newer prediction tick. It reports the time left until that tick, in milliseconds.
- Vital : ❌
- Instant Sending : ❌
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Intended Tick | Integer | The game tick the client intended its input for. |
| Time Left | Integer | Time left before the intended tick, in milliseconds. Negative values mean the input was late. |
INFO
Check the Input & Input Timing Chunks section for more information about this chunk.
10 - NETMSG_RCON_AUTH_STATUS
Sent by the server to update the client's rcon authentication and command-list state.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Authenticated | Boolean | 1 if authenticated; 0 otherwise. |
| Use Command List | Boolean | 1 to use the server-provided rcon command list; 0 to clear and disable it. |
11 - NETMSG_RCON_LINE
Sent by the server to print a line to the remote console on the client.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Line | String | The text line to print in the client's remote console. |
14 - NETMSG_READY
Sent by the client after it has loaded the map and is ready.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Client -> Server
Structure:
Empty payload
15 - NETMSG_ENTERGAME
Sent by the client to tell the server to start sending snapshots.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Client -> Server
Structure:
Empty payload
16 - NETMSG_INPUT
This message is sent by the client to the server with the player's input.
- Vital : ❌
- Instant Sending : ✅
- Sending Path : Client -> Server
Structure:
| Field | Type | Description |
|---|---|---|
| Ack Game Tick | Integer | The last acknowledged server game tick. |
| Prediction Tick | Integer | The game tick the client is predicting with this input. |
| Input Size | Integer | Input size before integer packing: 40 bytes for the 10 player-input integers. |
| Input -> Direction | Integer | Direction the player is moving: -1 = left, 0 = neutral, 1 = right. |
| Input -> Target X | Integer | Horizontal aim offset relative to the character. |
| Input -> Target Y | Integer | Vertical aim offset relative to the character. |
| Input -> Jump | Integer | Jump input state. |
| Input -> Fire | Integer | Fire input state. |
| Input -> Hook | Integer | Hook input state. |
| Input -> PlayerFlags | Integer | Player flags for this input (e.g. chatting, scoreboard). |
| Input -> WantedWeapon | Integer | Direct weapon slot selection. 0 = no desired weapon, 1+weapon = desired weapon. |
| Input -> NextWeapon | Integer | Next weapon cycle input. |
| Input -> PrevWeapon | Integer | Previous weapon cycle input. |
Input Size counts the 32-bit input values before packing, so it can differ from the encoded payload length. Normal input is sent with immediate flushing; direct input can also be sent without flushing.
INFO
Check the Input & Input Timing Chunks section for more information about this chunk.
17 - NETMSG_RCON_CMD
Sent by the client to execute a command on the server through the remote console.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Client -> Server
Structure:
| Field | Type | Description |
|---|---|---|
| Command | String | The command to be executed. |
18 - NETMSG_RCON_AUTH
Sent by the client to authenticate for rcon access and request the available command list.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Client -> Server
Structure:
| Field | Type | Description |
|---|---|---|
| Login Name | String | Login name. The server reads this field but does not use it for authentication. |
| Password | String | The rcon password used to authenticate. |
| Send Command List | Boolean | Whether the client requests the available rcon commands after authentication. |
19 - NETMSG_REQUEST_MAP_DATA
Sent by the client to request the next chunk of map data.
- Vital : ✅
- Instant Sending : ✅
- Sending Path : Client -> Server
Structure:
| Field | Type | Description |
|---|---|---|
| Chunk | Integer | Zero-based map chunk index being requested, starting at 0. |
The client requests successive indices until NETMSG_MAP_DATA has Last set to 1. Each index selects a file slice starting at Chunk * 896. Reassemble the raw slices in order and verify the complete file against the announced size and CRC.
22 - NETMSG_PING
Sent by either side to request a pong response.
- Vital : ❌
- Instant Sending : ❌
- Sending Path : Both ways
Structure:
Empty payload
23 - NETMSG_PING_REPLY
Sent by either side as a reply to a NETMSG_PING.
- Vital : ❌
- Instant Sending : ❌
- Sending Path : Both ways
Structure:
Empty payload
25 - NETMSG_RCON_CMD_ADD
Sent by the server to inform an authenticated client about a newly available rcon command.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Name | String | Command name. |
| Help | String | Help text describing the command. |
| Params | String | Parameter format string for the command. |
26 - NETMSG_RCON_CMD_REM
Sent by the server to inform an authenticated client that a rcon command is no longer available.
- Vital : ✅
- Instant Sending : ❌
- Sending Path : Server -> Client
Structure:
| Field | Type | Description |
|---|---|---|
| Name | String | Name of the command to remove. |