Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

GroupBitsValueType
00Experiencefloat
01Gold in handfloat
02 to 3Which slots can be cast from: the champion’s own, then the second setu32
04 to 7What the spell in slots 0 to 3 costsfloat
08 to 11What the spell in slots 41 to 44 costsfloat
012 to 13What the spell in slots 0 and 1 of the second set costsfloat
10 to 1Health and resource as they standfloat
12 to 3Health and resource at their greatestfloat
14What the champion is doing, as a set of bitsu32
15 to 8Whether it is proof against spells, proof against all harm, targetable, and proof against strikesu32
20 to 1Whether it is proof against strikes, then against spells, as group 1 bits 8 and 5u32
22Damage it deals by strikingfloat
23Damage its spells deal before modifiersfloat
24How often it turns a blow asidefloat
25Its sizefloat
26How often it strikes criticallyfloat
27 to 8Armour and spell resistancefloat
29 to 10How fast health and resource returnfloat
211How fast it movesfloat
212How far it strikes fromfloat
213 to 14Flat and percent modifiers on the damage it strikes withfloat
215 to 16Flat and percent modifiers on its spells’ damagefloat
217 to 18Flat and percent reduction of the spell damage it takesfloat
219A multiplier on how fast it strikesfloat
220A flat addition to how far it castsfloat
221A modifier on its cooldownsfloat
30 to 1A percent and a flat addition to how far it seesfloat
32Levelu32

A turret

GroupBitsValueType
10Damage it deals by strikingfloat
11 to 2Armour and spell resistancefloat
13How fast it movesfloat
14A multiplier on how fast it strikesfloat
15Its sizefloat
16 to 7Flat and percent modifiers on the damage it strikes withfloat
18 to 9Flat and percent modifiers on its spells’ damagefloat
110 to 11How fast health and resource returnfloat
112 to 13Health as it stands, then at its greatestfloat
30 to 1A percent and a flat addition to how far it seesfloat

A minion, and a unit belonging to no side

GroupBitsValueType
10 to 1Health as it stands, then at its greatestfloat
12 to 3Whether it is proof against strikes, then against spellsu32
14What the unit is doing, as a set of bitsu32
15 to 8Whether it is proof against spells, proof against all harm, targetable, and proof against strikesu32
19Damage it deals by strikingfloat
110 to 11Armour and spell resistancefloat
112How fast it movesfloat
113A multiplier on how fast it strikesfloat
114Its sizefloat
115 to 16Flat and percent modifiers on the damage it strikes withfloat
117 to 18Flat and percent modifiers on its spells’ damagefloat
119 to 20How fast health and resource returnfloat
30 to 1A percent and a flat addition to how far it seesfloat

A building

Inhibitors, nexuses and the buildings minions come from share one table. It has no value for health at its greatest.

GroupBitsValueType
10 to 1Whether it is proof against all harm, and targetableu32
12Health as it standsfloat

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. ExperienceGained shows 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 ExperienceGained and gold with GoldGained.

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.

Definition.

In 0.9.22.14–1.0.0.24

Carried on transient, sent by the server, unreliable, under these commands:

BuildsCommand
0.9.22.14–0.9.25.35129
0.9.25.36–1.0.0.24128
FieldTypeWhat it is
syncIdu32Names this batch of changes. Replication says which batches a client takes values from.
unitCountu8How many units follow.
unitscount in unitCount × Replication
Vectors (1)

one-on-0-9-25-24

TransientAck

What a client sends to say a batch of changes arrived, naming which batch. The header names no object: it carries zero.

Definition.

In 0.9.22.14–1.0.0.24

Carried on requests, sent by the client, unsequenced, under these commands:

BuildsCommand
0.9.22.14–0.9.25.35130
0.9.25.36–1.0.0.24129

A client sends it for a Replication batch only where it holds every unit the batch names, or the batch names none.

FieldTypeWhat it is
syncIdu32Which batch is being acknowledged, as the batch named itself.
Vectors (1)

one-on-0-9-25-24

GoldGained

What a server sends to show a unit gaining gold. The header names the unit whose death earned the gold, as source does.

Definition.

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.

FieldTypeWhat it is
unitu32The unit granted it.
sourceu32What it came from, or zero where nothing did.
amountf32How much.

ExperienceGained

What a server sends to say a unit gained experience. The header names no object: a server writes zero.

Definition.

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.

FieldTypeWhat it is
unitu32The 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.
amountf32How much. A client shows a value below zero or from 100000 up as well.
Vectors (1)

one-on-0-8-13-26

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.

FieldTypeWhat it is
unitu32The unit granted it, a champion. A client fails for any other unit it holds, and does nothing for a unit it does not know.
amountf32How 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.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
0.8.13.26–0.9.22.1392
0.9.22.14–1.0.0.2489
FieldTypeWhat it is
targetu32The unit that receives the gold.
Vectors (1)

one-on-0-8-13-26

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.

Definition.

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.

FieldTypeWhat it is
levelu8The level now reached.
pointsToSpendu8How 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.

Definition.

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.

FieldTypeWhat it is
secondsf32The span, in seconds.
Vectors (1)

one-on-0-8-13-26

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.

FieldTypeWhat it is
secondsf32The span, in seconds.

ValueGroup0

What a server sends to set values of group 0 on a unit. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 49 on events, sent by the server, reliable.

FieldTypeWhat it is
whichu32Says which of the group’s values follow, one bit each, lowest first.
valuescount in the bits set in which × bytesThe 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)

one-on-0-8-13-26

ValueGroup1

What a server sends to set values of group 1 on a unit. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 50 on events, sent by the server, reliable.

FieldTypeWhat it is
whichu32Says which of the group’s values follow, one bit each, lowest first.
valuescount in the bits set in which × bytesThe 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)

one-on-0-8-13-26

ValueGroup2

What a server sends to set values of group 2 on a unit. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 51 on events, sent by the server, reliable.

FieldTypeWhat it is
whichu32Says which of the group’s values follow, one bit each, lowest first.
valuescount in the bits set in which × bytesThe 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)

one-on-0-8-13-26

ValueGroup3

What a server sends to set values of group 3 on a unit. The header names the unit.

Definition.

In 0.8.13.26–0.9.22.13

Command 52 on events, sent by the server, reliable.

FieldTypeWhat it is
whichu32Says which of the group’s values follow, one bit each, lowest first.
valuescount in the bits set in which × bytesThe 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)

one-on-0-8-13-26