Replication
With Replication a server states what has changed about the units a client
can see: for each unit, the groups of values it carries and which values of
each follow. What the values are follows from the unit.
In 0.9.25.24–1.0.0.24
The groups follow in the order 0 to 4, and nothing gives a group’s length: each value is four bytes, so a group takes four bytes for its set of values and four for each bit that set has set.
Each value is a 32-bit float or a 32-bit unsigned integer, as its row in the tables below says, and travels as it stands.
A client passes over a set bit its table has no row for, and a group its table has none of, by their four bytes each, without taking anything from them. It passes over the values of a unit whose kind has no table the same way, and still answers the batch.
In 0.9.25.24–1.0.0.24
A value that says yes or no is an integer, 1 for yes and 0 for no. A client takes a batch on channels 2, 3 and 4 alike.
What settles a reading
A run is a sequence of values with nothing between them, in the order the set bits name them, lowest first.
The bit that names a value means different things for different units. Champions, turrets, minions and units belonging to no side, and buildings each answer to a table of their own, so the same bit in the same group is one value on one unit and another on the next. A sending end MUST write the table the unit it names answers to.
In 0.9.25.24–1.0.0.24
A prop answers to no table, and a client takes nothing a batch carries for one.
Which table a unit answers to follows from the message that put it on the field (see Units). A building, which no message creates, answers to the building table.
In 0.9.25.24–1.0.0.24
The building table is the same on every map.
Which batches a client takes
A client answers a batch with TransientAck where it holds every unit the
batch names, whether or not it took the values. Ordering says
which batches a client takes, and what that requires of a server.
Reading the tables
Each row gives the group and bits that name a value and what the value is.
In 0.9.25.24–1.0.0.24
Each row also gives the type a value is written in.
In 0.9.25.24–0.9.25.35
A champion
Group Bits Value Type 0 0 Experience float 0 1 Gold in hand float 0 2 to 3 Which slots can be cast from: the champion’s own, then the second set u32 0 4 to 7 What the spell in slots 0 to 3 costs float 0 8 to 11 What the spell in slots 41 to 44 costs float 0 12 to 13 What the spell in slots 0 and 1 of the second set costs float 1 0 to 1 Health and resource as they stand float 1 2 to 3 Health and resource at their greatest float 1 4 What the champion is doing, as a set of bits u32 1 5 to 8 Whether it is proof against spells, proof against all harm, targetable, and proof against strikes u32 2 0 to 1 Whether it is proof against strikes, then against spells, as group 1 bits 8 and 5 u32 2 2 Damage it deals by striking float 2 3 Damage its spells deal before modifiers float 2 4 How often it turns a blow aside float 2 5 Its size float 2 6 How often it strikes critically float 2 7 to 8 Armour and spell resistance float 2 9 to 10 How fast health and resource return float 2 11 How fast it moves float 2 12 How far it strikes from float 2 13 to 14 Flat and percent modifiers on the damage it strikes with float 2 15 to 16 Flat and percent modifiers on its spells’ damage float 2 17 to 18 Flat and percent reduction of the spell damage it takes float 2 19 A multiplier on how fast it strikes float 2 20 A flat addition to how far it casts float 2 21 A modifier on its cooldowns float 3 0 to 1 A percent and a flat addition to how far it sees float 3 2 Level u32 A turret
Group Bits Value Type 1 0 Damage it deals by striking float 1 1 to 2 Armour and spell resistance float 1 3 How fast it moves float 1 4 A multiplier on how fast it strikes float 1 5 Its size float 1 6 to 7 Flat and percent modifiers on the damage it strikes with float 1 8 to 9 Flat and percent modifiers on its spells’ damage float 1 10 to 11 How fast health and resource return float 1 12 to 13 Health as it stands, then at its greatest float 3 0 to 1 A percent and a flat addition to how far it sees float A minion, and a unit belonging to no side
Group Bits Value Type 1 0 to 1 Health as it stands, then at its greatest float 1 2 to 3 Whether it is proof against strikes, then against spells u32 1 4 What the unit is doing, as a set of bits u32 1 5 to 8 Whether it is proof against spells, proof against all harm, targetable, and proof against strikes u32 1 9 Damage it deals by striking float 1 10 to 11 Armour and spell resistance float 1 12 How fast it moves float 1 13 A multiplier on how fast it strikes float 1 14 Its size float 1 15 to 16 Flat and percent modifiers on the damage it strikes with float 1 17 to 18 Flat and percent modifiers on its spells’ damage float 1 19 to 20 How fast health and resource return float 3 0 to 1 A percent and a flat addition to how far it sees float A building
Inhibitors, nexuses and the buildings minions come from share one table. It has no value for health at its greatest.
Group Bits Value Type 1 0 to 1 Whether it is proof against all harm, and targetable u32 1 2 Health as it stands float
Values stated outside a batch
Besides its batches, a server states some values with messages of their own.
In 0.8.13.26–0.9.22.13
A server grants gold with
GoldGained.ExperienceGainedshows the experience gained over the unit and grants none: a champion’s experience follows its replicated values alone.
In 0.9.25.24–1.0.0.24
A server grants experience with
ExperienceGainedand gold withGoldGained.
A server can send the gold a unit earns to another with GoldRedirect. A level
gained is LevelUp, which on its own is enough for a client to show the new
level on its champion’s portrait. A server sets a champion’s tallies for the
scoreboard with ChampionStats. A server can also add to a unit’s shield
(ShieldAdded), change how its health bar or resource bar is shown
(HealthBar, ResourceDisplay), change the sort of resource it has
(ResourceKindChanged), set the highest level a champion reaches
(LevelCap), and count minions killed, scores and deeds (MinionKillCount,
ScoreAdded, StatisticIncremented).
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).
Replication
What a server sends to say what has changed about units a client can see. It is the most frequent thing a server sends. The header names no object: a server writes zero.
In 0.9.22.14–1.0.0.24
Carried on transient, sent by the server, unreliable, under these commands:
| Builds | Command |
|---|---|
| 0.9.22.14–0.9.25.35 | 129 |
| 0.9.25.36–1.0.0.24 | 128 |
| Field | Type | What it is |
|---|---|---|
| syncId | u32 | Names this batch of changes. Replication says which batches a client takes values from. |
| unitCount | u8 | How many units follow. |
| units | count in unitCount × Replication |
Vectors (1)
TransientAck
What a client sends to say a batch of changes arrived, naming which batch. The header names no object: it carries zero.
In 0.9.22.14–1.0.0.24
Carried on requests, sent by the client, unsequenced, under these commands:
| Builds | Command |
|---|---|
| 0.9.22.14–0.9.25.35 | 130 |
| 0.9.25.36–1.0.0.24 | 129 |
A client sends it for a Replication batch only where it holds every unit the batch names, or the batch names none.
| Field | Type | What it is |
|---|---|---|
| syncId | u32 | Which batch is being acknowledged, as the batch named itself. |
Vectors (1)
GoldGained
What a server sends to show a unit gaining gold. The header names the unit whose death earned the gold, as source does.
In every range of this book
Command 27 on events, sent by the server, reliable.
Where amount is above 0.5, unit is the client’s own champion and source names a unit it holds, a client floats the gold over the source. Otherwise, where it holds the unit, it floats the amount over the unit as a gain or a loss, and nothing for zero.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The unit granted it. |
| source | u32 | What it came from, or zero where nothing did. |
| amount | f32 | How much. |
ExperienceGained
What a server sends to say a unit gained experience. The header names no object: a server writes zero.
In 0.8.13.26–0.9.22.13
Command 28 on events, sent by the server, reliable.
It changes no unit’s experience: a client only floats the amount as text over the unit, where the player’s floating-text settings allow.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The unit granted it, one with a mind, such as a champion or a minion. A client does nothing for a unit it does not know. |
| amount | f32 | How much. A client shows a value below zero or from 100000 up as well. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 28 on events, sent by the server, reliable.
It changes no unit’s experience: a client only floats the amount as text over the unit, where the player’s floating-text settings allow.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The unit granted it, a champion. A client fails for any other unit it holds, and does nothing for a unit it does not know. |
| amount | f32 | How much. A client shows a value below zero or from 100000 up as well. |
GoldRedirect
What a server sends to send the gold a unit earns to another. The header names the unit.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 0.8.13.26–0.9.22.13 | 92 |
| 0.9.22.14–1.0.0.24 | 89 |
| Field | Type | What it is |
|---|---|---|
| target | u32 | The unit that receives the gold. |
Vectors (1)
LevelUp
What a server sends when a unit gains a level. The header names the unit this is about. On its own, with no replication behind it, it is enough for a client to show the new level on the champion’s portrait and offer the unspent points.
In every range of this book
Command 47 on events, sent by the server, reliable.
A client applies it only to a champion, and ignores it for any other unit.
| Field | Type | What it is |
|---|---|---|
| level | u8 | The level now reached. |
| pointsToSpend | u8 | How many spell points are left unspent. |
StatTick
What a server sends to advance every unit’s stats by a span of time. The header carries zero.
In 0.8.13.26–0.9.22.13
Command 68 on events, sent by the server, reliable.
For every unit not dead, a client adds its health regeneration times seconds to its health, and its mana regeneration times seconds to its mana, each held between zero and its maximum.
| Field | Type | What it is |
|---|---|---|
| seconds | f32 | The span, in seconds. |
Vectors (1)
In 0.9.22.14–1.0.0.24
Command 64 on events, sent by the server, reliable.
A client takes it and changes nothing it shows.
| Field | Type | What it is |
|---|---|---|
| seconds | f32 | The span, in seconds. |
ValueGroup0
What a server sends to set values of group 0 on a unit. The header names the unit.
In 0.8.13.26–0.9.22.13
Command 49 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | u32 | Says which of the group’s values follow, one bit each, lowest first. |
| values | count in the bits set in which × bytes | The values themselves, four bytes each, in the order the bits above name them. A client reads one only for a bit below the number of values the unit holds in the group, and nothing after the bits where the unit holds no such group. |
Vectors (1)
ValueGroup1
What a server sends to set values of group 1 on a unit. The header names the unit.
In 0.8.13.26–0.9.22.13
Command 50 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | u32 | Says which of the group’s values follow, one bit each, lowest first. |
| values | count in the bits set in which × bytes | The values themselves, four bytes each, in the order the bits above name them. A client reads one only for a bit below the number of values the unit holds in the group, and nothing after the bits where the unit holds no such group. |
Vectors (1)
ValueGroup2
What a server sends to set values of group 2 on a unit. The header names the unit.
In 0.8.13.26–0.9.22.13
Command 51 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | u32 | Says which of the group’s values follow, one bit each, lowest first. |
| values | count in the bits set in which × bytes | The values themselves, four bytes each, in the order the bits above name them. A client reads one only for a bit below the number of values the unit holds in the group, and nothing after the bits where the unit holds no such group. |
Vectors (1)
ValueGroup3
What a server sends to set values of group 3 on a unit. The header names the unit.
In 0.8.13.26–0.9.22.13
Command 52 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| which | u32 | Says which of the group’s values follow, one bit each, lowest first. |
| values | count in the bits set in which × bytes | The values themselves, four bytes each, in the order the bits above name them. A client reads one only for a bit below the number of values the unit holds in the group, and nothing after the bits where the unit holds no such group. |