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 3.10–3.15

The groups follow in the order 0, 1, 2, 3, 5 and then 4: group 4 comes last, each behind the length of its run. A sending end MUST write each group’s length as the number of bytes its run takes.

Each value takes one of two shapes, and the table row naming it says which. Nothing on the wire carries a table, a field name, a width or a shape, so an end that does not already hold the table cannot read a run.

A value that counts is a thirty two bit unsigned integer, and a value with a sign travels as the same thirty two bits. It takes seven bits from each byte, lowest seven first, and the top bit of a byte is set while another byte follows. Five bytes therefore carry anything it holds.

A value that measures takes one of three forms: a single byte of 255 meaning zero; a byte of 254 followed by four bytes; or four bytes on their own. The four bytes are the measure itself, a thirty two bit float, lowest byte first. A sending end MUST write the byte of 254 before a measure whose lowest byte is 254 or 255, and MUST NOT write it before any other. A measure written plain therefore never begins with either, so its first byte says which form it takes.

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.

Props answer to a table of their own as well.

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 3.01–3.10

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 3.10–3.15

Each row also gives the shape a sending end writes the value in.

In 3.10

A champion

GroupBitsValueShape
00Gold in handmeasured
01Gold earned in allmeasured
02 to 3Which of the champion’s slots can be cast from, as a set of bits over two wordscounted
04Points held for evolving a spellcounted
05Which spells have evolved, as a set of bitscounted
06 to 25What the spell in one slot costs, slots 0 to 3 firstmeasured
10 to 3What the champion is doing, and whether it is proof against spells, all harm and strikescounted
14Damage it deals by strikingmeasured
15Damage its spells deal before modifiersmeasured
16How often it turns a blow asidemeasured
17How often it strikes criticallymeasured
18Armourmeasured
19Spell resistancemeasured
110 to 11How fast health and resource returnmeasured
112How far it strikes frommeasured
113 to 16Flat and percent modifiers on the damage it strikes with, then on its spells’ damagemeasured
117 to 18Flat and percent reduction of the spell damage it takesmeasured
119A multiplier on how fast it strikesmeasured
120A flat addition to how far from the champion an aimed spell’s point is allowed to landmeasured
121A modifier on its cooldownsmeasured
122When its passive’s cooldown ends, as a moment on the match clockmeasured
123How long its passive’s cooldown lasts in allmeasured
124 to 25How much armour it cuts through, flat then as the share left standingmeasured
126 to 27How much spell resistance it cuts through, flat then as the share left standingmeasured
128Life stealmeasured
129Spell vampmeasured
130Crowd-control reductionmeasured
30 to 1Health and resource as they standmeasured
32 to 3Health and resource at their greatestmeasured
34Experiencemeasured
35 to 9Lifetime, and how far the champion seesmeasured
310How fast it movesmeasured
311 to 12Its size, and how wide a path it needsmeasured
313Levelcounted
314 to 16Kills taken from no side, and whether anything is allowed to aim at itcounted

A turret

GroupBitsValueShape
10 to 1Health as it stands, then at its greatestmeasured
12 to 5What the turret is doing, and whether it is proof against spells, all harm and strikescounted
16Damage it deals by strikingmeasured
17 to 8Armour and spell resistancemeasured
19A multiplier on how fast it strikesmeasured
110 to 13Flat and percent modifiers on the damage it strikes with, then on its spells’ damagemeasured
114How fast health returnsmeasured
30 to 1How far it seesmeasured
32How fast it movesmeasured
33Its sizemeasured
50 to 1Whether anything is allowed to aim at it, and which side iscounted

A minion, and a unit belonging to no side

Both answer to one table.

GroupBitsValueShape
10 to 1Health as it stands, then at its greatestmeasured
12 to 4How long it lives, as it stands and at its greatest, and the count of thatmeasured
15 to 6Resource at its greatest, then as it standsmeasured
17 to 10What the unit is doing, and whether it is proof against spells, all harm and strikescounted
111Damage it deals by strikingmeasured
112 to 13Armour and spell resistancemeasured
114A multiplier on how fast it strikesmeasured
115 to 18Flat and percent modifiers on the damage it strikes with, then on its spells’ damagemeasured
119 to 20How fast health and resource returnmeasured
121A value whose meaning is not recordedmeasured
122 to 23Flat and percent reduction of the spell damage it takesmeasured
30 to 1How far it seesmeasured
32How fast it movesmeasured
33Its sizemeasured
34 to 5Whether anything is allowed to aim at it, and which side iscounted

For some units the two resource values travel as group 3 bits 0 and 1 instead: the rest of group 1 moves down two bits and the rest of group 3 up two. Which units do is not recorded.

A building

GroupBitsValueShape
10Health as it standsmeasured
11Whether the building is proof against harmcounted
50 to 1Whether anything is allowed to aim at it, and which side iscounted

A prop

A server need not replicate a prop’s values. Where it does, they follow the table below.

GroupBitsValueShape
10 to 1Health as it stands, then at its greatestmeasured
12Whether the prop is proof against harmcounted
30 to 1How far it seesmeasured
32How fast it movesmeasured
33Its sizemeasured
34 to 5Whether anything is allowed to aim at it, and which side iscounted

Values stated outside a batch

Besides its batches, a server states some values with messages of their own.

In 3.10–3.15

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 every range of this book

Command 196 on transient, sent by the server, unreliable.

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 (3)

one-on-3-02, group-four-on-3-15, one-on-3-15

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 every range of this book

Command 168 on requests, sent by the client, unsequenced.

It is sent for a batch whose values the client dropped as well as for one it took.

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

first-on-3-15, one-on-3-15

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 34 on events, sent by the server, reliable.

It grants the unit gold.

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 3.01–3.14

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

Where the unit is the client’s own champion below its highest level, a client also shows the amount on its experience display.

FieldTypeWhat it is
unitu32The unit granted it.
amountf32How much.
Vectors (3)

a-third-on-3-14, another-on-3-14, one-on-3-14

In 3.15

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

FieldTypeWhat it is
unitu32The unit granted it.
amountf32How much.

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

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

FieldTypeWhat it is
targetu32The unit that receives the gold.

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 3.01–3.10

Command 62 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.
Vectors (1)

one-on-3-10

In 3.11–3.15

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

FieldTypeWhat it is
levelu8The level now reached.
pointsToSpendu8How many spell points are left unspent.

ChampionStats

What a server sends to set a champion’s tallies for the scoreboard. The header names the champion.

Definition.

In every range of this book

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

FieldTypeWhat it is
sizeu32The whole length of what follows the header, these four bytes included, as a whole 32-bit count. A mismatch has no effect, and does not limit what a client takes.
valuesbytes, sized by size minus 4One value per tally of the match’s mode, the tallies in ascending byte order of their names. An int takes 4 bytes, a float 4, a bool 1, a 64-bit int 8, and text a 16-bit length below 255 then that many bytes. Bytes left over have no effect. A nonzero count of champion kills marks first blood taken.

ShieldAdded

What a server sends to add to a unit’s shield. The header names the unit.

Definition.

In every range of this book

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

Both physical and magical set adds amount to the shield that takes either kind of damage; one of them, to that kind’s shield; neither, to nothing. A negative amount lowers it, and any shield left below 0.001 becomes zero. noFade clear does not restart a fade already stopped.

FieldTypeWhat it is
flags1-byte bitsWhich shield.
flags.physicalbit 0Set where the shield turns aside physical damage.
flags.magicalbit 1Set where it turns aside magical damage. Both set means either.
flags.noFadebit 2Set where the shield does not fade.
flags.unusedbit 3 to 7Unused; a server writes zero.
amountf32How much is added.

HealthBar

What a server sends about a unit’s health bar. The header names the unit.

Definition.

In every range of this book

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

FieldTypePresent whenWhat it is
flags1-byte bitsWhat changes.
flags.showbit 0Set to show the bar, clear to hide it.
flags.changeTypebit 1Set where the bar’s type changes; the type and side below apply only then.
flags.unusedbit 2 to 7Unused; a server writes zero.
barTypeu8flags.changeType setWhich sort of bar, applying only where changeType is set and side is the client’s player’s side or zero: 1 a unit’s, 2 a champion’s; any other value only makes sure the unit has a bar.
sidei32flags.changeType setThe side that sees the change, or 0 for every side.
Vectors (2)

another-on-3-11, one-on-3-11

ResourceDisplay

What a server sends to change how a unit’s resource bar is shown. The header names the unit.

Definition.

In every range of this book

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

FieldTypeWhat it is
unusedu32Unused; its bytes carry no meaning. The header names the unit.
statei32Which way the resource is shown; a client sets the unit’s resource bar by it, and what each value looks like depends on the unit’s own data.
Vectors (2)

another-on-3-15, one-on-3-15

ResourceKindChanged

What a server sends to change what sort of resource a unit has, which its bar’s colours and art follow. The header names the unit.

Definition.

In 3.11

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

FieldTypeWhat it is
kindu8The kind. A client knows 0 to 10, and takes any higher value as none. Values: 0 mana, 1 energy, 2 none, 3 shield, 4 battleFury, 5 dragonFury, 6 rage, 7 heat.
Vectors (1)

energy-on-3-11

In 3.12–3.14

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

FieldTypeWhat it is
kindu8The kind. Values: 0 mana, 1 energy, 2 none, 3 shield, 4 battleFury, 5 dragonFury, 6 rage, 7 heat, 8 ferocity, 9 bloodWell, 10 other.
Vectors (1)

energy-on-3-12

In 3.15

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

FieldTypeWhat it is
kindu8The kind. A client knows 0 to 11, and takes any higher value as none. Values: 0 mana, 1 energy, 2 none, 3 shield, 4 battleFury, 5 dragonFury, 6 rage, 7 heat, 8 ferocity, 9 bloodWell, 10 wind, 11 other.
Vectors (1)

energy-on-3-15

LevelCap

What a server sends its player’s champion to set the highest level it can reach. The header names the champion.

Definition.

In 3.10–3.15

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

FieldTypeWhat it is
capu8The highest level; zero restores the usual 18.

ScoreAdded

What a server sends to add to a player’s score. The header names no object: a server writes zero.

Definition.

In every range of this book

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

A client ignores the message where player names no champion it holds.

FieldTypeWhat it is
championu32The champion whose score it is.
categoryu8Which part of the score. Values: 0 offense, 1 defense, 2 combat, 3 objective.
eventu8What earned it.
flags1-byte bitsHow it is shown.
flags.calloutbit 0Set where the client announces it.
flags.unusedbit 1 to 7Unused; a server writes zero.
pointsf32How much is added.
Vectors (1)

objective-on-3-11

StatisticIncremented

What a server sends to add one to a champion’s count of a deed, as counted for the end of a match. Nothing shows at once. A client ignores it where the id names no champion. The header carries zero.

Definition.

In every range of this book

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

FieldTypeWhat it is
championu32The champion.
statisticu8Which count. A value past those named has no defined effect. Values: 0 pointCaptured, 1 pointNeutralised, 2 killWhileAttackingPoint, 3 teamObjective, 4 defendedPointNeutralised, 5 killWhileDefendingPoint, 6 timeDefendingPoint, 7 lastStand, 8 captureAssist, 9 neutraliseAssist.
Vectors (2)

another-on-3-15, one-on-3-15

GoldEarned

What a server sends about gold a champion earned. The header carries zero.

Definition.

In every range of this book

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

A server sends it to clients watching a match. It credits the champion with the gold.

FieldTypeWhat it is
owneru32The champion credited.
amountf32How much gold. 0.95 is what a champion earns for each step it stands still.
Vectors (2)

another-on-3-15, one-on-3-15

GoldSourcesLog

What a server sends to carry a text to a client. It changes nothing a client shows. The header carries zero.

Definition.

In 3.14–3.15

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

FieldTypeWhat it is
lengthu32How many bytes of text follow. Zero, or a value above 2147483647, carries no text.
texttext, sized by lengthThe text, with no terminating zero. A client looks each word up in its own text and writes the result a line at a time.

MultikillCount

What a server sends a client watching a match to state a champion’s run of kills. The header carries zero.

Definition.

In 3.11–3.15

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

FieldTypeWhat it is
owneru32The champion.
countu8How many kills in the run.

StatTick

What a server sends to advance every unit’s stats by a span of time. The header carries zero.

Definition.

In every range of this book

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

A client takes it and changes nothing it shows.

FieldTypeWhat it is
secondsf32The span, in seconds.