Communication
Chat, pings, emotes, and the sound and music a server can drive.
Chat
Players chat with Chat, which carries a line to everyone or to a side. A
server puts a line of its own in a client’s chat with SystemMessage. A server
can limit how many more lines a player can send with ChatAllowance.
Pings and emotes
A client marks a point on the map with MapPing, and a server shows the ping to
everyone meant to see it with PingPlaced. A client asks to play an emote with
PlayEmote, and a server shows it with EmotePlayed. A server can also tell
clients of a voice command a champion gave (VoiceCommand) and of an emote a
champion played for the moment (ContextEmote).
Sound and music
A server can play a sound once (SoundPlayed) or a voice event (VoiceEvent),
which a client can report done with VoiceEventDone. A server can also set a
champion’s skin music (ThemeMusic), drive the music (MusicCue), mute or
unmute a kind of sound (VolumeMuted) and fade sound effects out
(FadeSounds).
In 0.9.22.14–0.9.25.20
VoiceEventcarries only the event’s name and asks for no answer.
In 0.9.25.24–1.0.0.24
Where a
VoiceEventasks for an answer, a client sendsVoiceEventDoneonce it has played the event.
In 0.9.25.24–1.0.0.24
A client never answers a
VoiceEventit cannot play.
Messages
Each message of this system in this book, with each layout it has across the book’s patches and every note its definition carries. A layout is the message’s body, after the header its channel’s family puts in front (see Messages).
Chat
Text one player sends the others during a match. Messages players exchange outside a match do not travel on this connection at all.
In 0.8.13.26–0.9.22.13
Command 0 on chat, sent by either side, reliable.
A line of chat. A client sends one as its player says something, and shows one a server sends in its chat box.
| Field | Type | What it is |
|---|---|---|
| text | text, ended by a zero byte | The line, ended by a zero byte. The message is the text alone, with nothing in front of it. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 0 on chat, sent by either side, reliable.
A line of chat. A client sends one as its player says something, and shows one a server sends in its chat box.
| Field | Type | What it is |
|---|---|---|
| speaker | u32 | The client id the line is from. A client sends its own. From a server, a client shows the line with the name of the player holding that client id, coloured for whether that player is on its own side, and with no name for a client id nobody holds; 4294967295 shows the whole line with no name and no tag. A client does not show a line from a player its own player has ignored or muted. |
| audience | u32 | 1 for the speaker’s side alone, which a client shows without a tag; any other value from a server is shown tagged as said to everyone. A client sends 0 where its player began the line with the all-chat prefix, which it leaves out of the text, and 1 otherwise. Values: 0 everyone, 1 team. |
| textLength | u32 | The length of the text in bytes, without the byte that ends it. Its value changes nothing a client does. |
| text | text, sized by textLength | The line; a client sends at most 511 bytes of it, and reads it up to the zero byte that ends it. |
| terminator | bytes, 1 | A zero byte closing the text. |
MapPing
What a client sends to mark a point on the map for the others. The header names no object: it carries zero.
In 0.8.13.26–0.9.22.13
Command 25 on requests, sent by the client, reliable.
Two places on a client’s HUD also send it, naming its champion’s own place.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the player pinging. |
| x | f32 | Where on the map, along one ground axis, in world units. |
| y | f32 | The height of the place pinged, in world units. |
| z | f32 | Where on the map, along the other ground axis, in world units. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 25 on requests, sent by the client, reliable.
A client also sends it from the alert button on its HUD, naming its champion’s own place and writing nothing in particular where the target goes.
| Field | Type | What it is |
|---|---|---|
| x | f32 | Where on the map, along one ground axis, in world units. |
| y | f32 | The height of the place pinged, in world units. |
| z | f32 | Where on the map, along the other ground axis, in world units. |
| target | u32 | A network object the mark is on, or zero where it is on open ground. |
PingPlaced
What a server sends to show a ping on the map to everyone meant to see it.
In 0.8.13.26–0.9.22.13
Command 26 on events, sent by the server, reliable.
A client marks atX and atZ on each of its two map views, and only while it shows a map. The header can carry zero.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the ping sits, along one ground axis, in world units. |
| atY | f32 | A client reads nothing here. |
| atZ | f32 | Where it sits, along the other, in world units. |
| target | u32 | A client reads nothing here. |
| source | u32 | A client reads nothing here. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 26 on events, sent by the server, reliable.
Where target is a unit it holds, of a kind that takes notices, a client shows a notice for it, but not again for the next ping on the same target; it keeps the last target of each side apart. The header names the champion that placed the ping, as source does.
| Field | Type | What it is |
|---|---|---|
| atX | f32 | Where the ping sits, along one ground axis, in world units. |
| atY | f32 | Its height, in world units. A client does not use it to place the ping. |
| atZ | f32 | Where it sits, along the other, in world units. |
| target | u32 | The unit pinged, or zero where a place was pinged instead. |
| source | u32 | The unit that placed it. |
PlayEmote
What a client sends to play an emote. The header names the sender’s champion.
In every range of this book
Command 10 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| emote | u32 | Which emote, by its place in the client’s list. A client sends nothing where no emote matches. |
EmotePlayed
What a server sends to say a unit played an emote. The header names the champion playing the emote.
In every range of this book
Command 11 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| emote | u32 | Which emote, by its place in the client’s list; any value at or past the end of the list plays nothing. |
VoiceEvent
What a server sends to play a voice event. The header carries zero.
In 0.9.22.14–0.9.25.20
Command 132 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| event | text, 64 bytes | The event’s name, ended by a zero byte. A client reads nothing after it. |
Vectors (1)
In 0.9.25.21–1.0.0.24
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 0.9.25.21–0.9.25.35 | 132 |
| 0.9.25.36–1.0.0.24 | 131 |
| Field | Type | What it is |
|---|---|---|
| event | text, 64 bytes | The event’s name. A client sends no VoiceEventDone for a name that names no event it holds. |
| callback | u8 | Bit 0 set asks the client to send VoiceEventDone once the event has finished playing. |
Vectors (1)
VoiceEventDone
What a client sends once a voice event (VoiceEvent) that asked for it has played. The header carries zero.
In 0.9.25.21–0.9.25.35
Command 164 on requests, sent by the client, reliable.
A client names no event: the message is its header alone. It sends it only once an event it found has finished playing; for an empty name, or one naming no event, it sends nothing.
No body.
Vectors (1)
In 0.9.25.36–1.0.0.24
Command 162 on requests, sent by the client, reliable.
A client names no event: the message is its header alone. It sends none for an event with an empty name or one it does not know.
No body.
VolumeMuted
What a server sends to mute or unmute one kind of sound. The header carries zero.
In 0.9.25.21–0.9.25.35
Command 169 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| category | u8 | Which kind, 0 to 5. A larger value than 5 has no defined effect. Values: 0 all, 1 music, 2 effects, 3 announcer, 4 unitResponses, 5 environment, 6 mainEffects. |
| state | 1-byte bits | Whether it is muted. |
| state.muted | bit 0 | Set to mute, clear to unmute. |
| state.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 0.9.25.36–1.0.0.24
Command 167 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| category | u8 | Which kind. A larger value than 6 has no defined effect. Values: 0 all, 1 music, 2 effects, 3 announcer, 4 unitResponses, 5 environment, 6 mainEffects. |
| state | 1-byte bits | Whether it is muted. |
| state.muted | bit 0 | Set to mute, clear to unmute. |
| state.unused | bit 1 to 7 | Unused; a server writes zero. |
UnitSpoke
What a client sends when a unit says something on its screen. A server need do nothing with it. The header names the unit speaking.
In every range of this book
Command 30 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | A value the client takes from the unit that speaks; what it names is not recorded. |
| unknown | f32 | A client writes 1073741824. |
| unknownToo | u32 | A client writes zero. |
| kind | u8 | 0 for text a client sends on a script’s behalf. 1 for one of the client’s own error texts, each distinct text sent once per session. |
| unused | u8 | A client writes zero. |
| text | text, ended by a zero byte | What the unit says, ended by a zero byte; the two take at most 1024 bytes. |