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

Structs

The groups of fields messages hold, each with the layout it has across the book’s patches.

AnimationOverride

One set of movements standing in for another.

Definition.

In every range of this book

FieldTypeWhat it is
fromLengthu32How many bytes the name below occupies, where it is from 1 to 2147483647.
fromtext, sized by fromLengthThe name of what is replaced. It is not padded and carries nothing closing it.
toLengthu32How many bytes the name below occupies, where it is from 1 to 2147483647.
totext, sized by toLengthThe name of what replaces it, written as above.

Appearance

One layer of what a unit looks like. Layers are stated in the order a client lays them on.

Definition.

In every range of this book

FieldTypeWhat it is
assetSizeu32How many bytes the name below occupies.
assettext, sized by assetSizeThe name the client loads this layer’s art under. It is not padded, and it carries no terminator.
skinu32Which look within that art.
how1-byte bits
how.overrideSpellsbit 0Set where this layer replaces the unit’s spells as well as its art.
how.modelOnlybit 1Set where it replaces the shape alone.
how.replacePackagebit 2Set where it replaces the whole set of art and sound.
how.unusedbit 3 to 7Unused; a server writes zero.
layeru32The name this layer answers to, so a later message can take it off.

CarriedMessage

One whole message carried inside another, behind the count of its bytes.

Definition.

In every range of this book

FieldTypeWhat it is
sizeu16How many bytes the message occupies.
bodybytes, sized by sizeThe message itself, taking effect as though it had arrived on its own on the channel that carried the message holding it.

Choice

One choice made before the match, and how far it was taken.

Definition.

In every range of this book

FieldTypeWhat it is
choiceu32Which choice, by the number the client knows it as. Zero where the place stands empty.
ranku8How far it was taken.

Death

How a unit died: who did it, with what, and how long it stays down.

Definition.

In 4.18–4.20

FieldTypeWhat it is
how1-byte bits
how.zombiebit 0Set to leave the champion standing in a zombie state rather than dead: no death animation and no death screen.
how.unusedbit 1 to 7Unused; a server writes zero.
kindu32What sort of death this is.
killeru32The unit credited with it, or zero where nothing is.
damageTypeu8The sort of damage that finished it.
damageSourceu8Where that damage came from.
stayDownf32How long the unit stays down, in seconds.

EffectStack

How many of a lasting effect are stacked in one of a unit’s effect slots.

Definition.

In every range of this book

FieldTypeWhat it is
slotu8Which slot.
countu32How many are stacked there.

HeldItem

One item a unit holds, as it is stated when the unit first comes into sight.

Definition.

In every range of this book

FieldTypeWhat it is
slotu8Which slot it sits in.
inSlotu8How many of it are in that slot.
chargesu8How many uses it carries.
itemu32Which item, by the number the client knows it as.

Movement

What one unit is told to do, in the compact shape: a path of points on the ground plane, each after the first stated against the one before it. Other shapes of movement exist, and which one a payload holds is settled by the message carrying it rather than by anything inside the movement.

Definition.

In every range of this book

FieldTypePresent whenWhat it is
header1-byte bits
header.hasTeleportTokenbit 0Set where a token sits beside the unit. A client sends it clear, so a token travels only from a server.
header.pointCountbit 1 to 7How many points the path holds; a sending end writes at least one. A receiving end refuses a movement claiming none and takes nothing further from it.
pathrecordEverything the movement carries beyond its first byte.
path.unitu32The unit the path belongs to.
path.teleportTokenu8header.hasTeleportToken setTells one relocation from another. Movement says what a receiving end does with it.
path.flagsbits, count in header.pointCount minus 1One pair for each point after the first, in the order the points follow. Pairs run on from the low bits of the first byte, and the run reaches to the byte holding the last pair. The bits past it are clear.
path.flags.xIsStepbit 0Set where this point states its first coordinate as a step.
path.flags.zIsStepbit 1Set where this point states its second coordinate as a step.
path.firstXi16The first point, along one ground axis, in the units Movement gives.
path.firstZi16The first point, along the other.
path.stepscount in header.pointCount minus 1 × record
path.steps[].xStepi8flags[step].xIsStep setAdded to the first coordinate of the point before, as that point resolved.
path.steps[].xWholei16flags[step].xIsStep = 0The first coordinate, stated without reference to the point before.
path.steps[].zStepi8flags[step].zIsStep setAdded to the second coordinate of the point before, as that point resolved.
path.steps[].zWholei16flags[step].zIsStep = 0The second coordinate, stated without reference to the point before.

MovementAtSpeed

What one unit is told to do where a server states how it travels: the same path of points as the compact shape, with the terms of its travel stated before them.

Definition.

In every range of this book

FieldTypePresent whenWhat it is
header1-byte bits
header.hasTeleportTokenbit 0Set where a token sits beside the unit. A client sends it clear, so a token travels only from a server.
header.pointCountbit 1 to 7How many points the path holds; a sending end writes at least one. A receiving end refuses a movement claiming none and takes nothing further from it.
pathrecordEverything the movement carries beyond its first byte.
path.unitu32The unit the path belongs to.
path.teleportTokenu8header.hasTeleportToken setTells one relocation from another, as in the compact shape (see Movement).
path.termsSpeedParamsHow the unit is made to travel.
path.flagsbits, count in header.pointCount minus 1One pair for each point after the first, in the order the points follow. Pairs run on from the low bits of the first byte, and the run reaches to the byte holding the last pair. The bits past it are clear.
path.flags.xIsStepbit 0Set where this point states its first coordinate as a step.
path.flags.zIsStepbit 1Set where this point states its second coordinate as a step.
path.firstXi16The first point, along one ground axis, in the units Movement gives.
path.firstZi16The first point, along the other.
path.stepscount in header.pointCount minus 1 × record
path.steps[].xStepi8flags[step].xIsStep setAdded to the first coordinate of the point before, as that point resolved.
path.steps[].xWholei16flags[step].xIsStep = 0The first coordinate, stated without reference to the point before.
path.steps[].zStepi8flags[step].zIsStep setAdded to the second coordinate of the point before, as that point resolved.
path.steps[].zWholei16flags[step].zIsStep = 0The second coordinate, stated without reference to the point before.

Particle

One drawn particle: where it sits, what it hangs off, and how far into its run it is.

Definition.

In every range of this book

FieldTypeWhat it is
targetu32The unit the particle is aimed at, or zero.
particleu32The name this particle answers to, so later messages can name it.
casteru32The unit that made the particle, or zero.
boundTou32The unit the particle hangs off, or zero.
settingsFromu32A second unit the particle takes unit-specific settings from, where a 4.17 client knows it: its skin picks the particle’s skin-specific version where caster is zero or unknown, and, where it is not boundTo, the particle’s substitutions come from it. Zero or unknown is ignored.
atXi16Where the particle sits, along one ground axis. Carried in the units a path uses rather than in world units.
atYf32Where it sits, in height, in world units.
atZi16Where it sits, along the other ground axis. It shares the reading of the first.
towardXi16Where the particle is aimed, along one ground axis, in the form of the first pair above.
towardYf32Where it is aimed, in height, in world units.
towardZi16Where it is aimed, along the other ground axis.
ownerXi16Where the unit that made it stood, along one ground axis, in the form of the first pair above.
ownerYf32Where that unit stood, in height, in world units.
ownerZi16Where that unit stood, along the other ground axis.
facingXf32Which way the particle faces, along one ground axis.
facingYf32Which way it faces, in height.
facingZf32Which way it faces, along the other ground axis.
runningForf32How far into its run the particle already is, in seconds.
scalef32What the particle’s drawn size is scaled by.

ParticleGroup

A set of drawn particles that share the art, the sound, and the place on a unit they hang from.

Definition.

In every range of this book

FieldTypeWhat it is
packageu32Which set of art and sound the client draws them with.
particleu32Which particle, by the number its name gives, as Objects and identifiers works it out.
flagsu16How each particle of the group behaves, one bit each, on a 4.17 client: 1 kept alive, not ending by itself; 2 of no effect; 4 scaled to the bound unit’s bounding box and its effect scale (to 1 where the bound object cannot be attacked); 8 placed at the positions given rather than hung on bone and targetBone, made even where a nonzero boundTo is unknown and with an unknown target; 16 not turned to follow its direction; 32 simulated while off screen; 64 laid flat on the ground’s slope, facing as forward (+Z where facing is zero); 128 facing its target; 256 driven by the bound unit’s resource bar. Bits 9 to 15 have no effect.
targetBoneu32Where on the unit aimed at they hang, by the number the name of that place gives, as Objects and identifiers works it out.
boneu32Where on the unit that made them they hang, by the same reading.
particleCountu8How many particles follow.
particlescount in particleCount × ParticleThe particles themselves.

Replication

What has changed about one unit. A flag byte says which groups of values follow, and each group that follows says which of its values it holds and carries them as a run of bytes. The groups follow in a fixed order that is not the order of the flags: the last flag’s values come before the one before it, and the rest run in flag order. Replication says what settles the reading of a run, and records what a champion’s groups carry.

Definition.

In every range of this book

FieldTypePresent whenWhat it is
present1-byte bits
present.group0bit 0Set where this group’s values follow.
present.group1bit 1Set where this group’s values follow.
present.group2bit 2Set where this group’s values follow.
present.group3bit 3Set where this group’s values follow.
present.group4bit 4Set where this group’s values follow. They come after every other group’s, whatever the flags. A server sends it clear.
present.group5bit 5Set where this group’s values follow. They come before group 4’s.
present.unusedbit 6 to 7Unused; a server writes zero. A presence byte with no group set is valid.
unitu32The unit whose values these are.
group0recordpresent.group0 setThe values of group 0, where the flag says they follow.
group0.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group0.lengthu8How many bytes the run below holds.
group0.valuesbytes, sized by lengthThe values themselves, one after another in the order the bits above name them, lowest first. What each one is, and which of the two shapes it takes, is settled by the kind of unit rather than by anything here. Replication says so, and records what a champion’s groups carry.
group1recordpresent.group1 setThe values of group 1, where the flag says they follow.
group1.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group1.lengthu8How many bytes the run below holds.
group1.valuesbytes, sized by lengthThe values themselves, one after another in the order the bits above name them, lowest first. What each one is, and which of the two shapes it takes, is settled by the kind of unit rather than by anything here. Replication says so, and records what a champion’s groups carry.
group2recordpresent.group2 setThe values of group 2, where the flag says they follow.
group2.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group2.lengthu8How many bytes the run below holds.
group2.valuesbytes, sized by lengthThe values themselves, one after another in the order the bits above name them, lowest first. What each one is, and which of the two shapes it takes, is settled by the kind of unit rather than by anything here. Replication says so, and records what a champion’s groups carry.
group3recordpresent.group3 setThe values of group 3, where the flag says they follow.
group3.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group3.lengthu8How many bytes the run below holds.
group3.valuesbytes, sized by lengthThe values themselves, one after another in the order the bits above name them, lowest first. What each one is, and which of the two shapes it takes, is settled by the kind of unit rather than by anything here. Replication says so, and records what a champion’s groups carry.
group5recordpresent.group5 setThe values of group 5, where the flag says they follow.
group5.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group5.lengthu8How many bytes the run below holds.
group5.valuesbytes, sized by lengthThe values themselves, one after another in the order the bits above name them, lowest first. What each one is, and which of the two shapes it takes, is settled by the kind of unit rather than by anything here. Replication says so, and records what a champion’s groups carry.
group4recordpresent.group4 setThe values of group 4, where the flag says they follow. For a 4.17 client it comes last, after group 5. A server sends its flag clear.
group4.whichu32Says which of the group’s values the run below holds, one bit each, lowest first.
group4.lengthu8How many bytes the run below holds. What comes next starts after this many bytes, whatever the values inside take.
group4.valuesbytes, sized by lengthThe values themselves, as for the other groups.

Seat

One place at the match: who holds it, what they brought, and what the client shows for them.

Definition.

In every range of this book

FieldTypeWhat it is
playeri64Which player holds the place, or a negative number where it stands empty. It has a player identifier’s width.
levelu16The level the seat holder has reached across matches. A 4.17 client does not draw it on the loading screen.
summoneru32The spell in one of the seat’s summoner slots, as the name hash of the spell; drawn as its icon on the loading screen. It has no effect on a bot’s seat.
otherSummoneru32The spell in the other.
flagsu8How the seat is treated. Two bits take effect on a 4.17 client: bit 0, set where a bot holds the seat, which the loading screen then shows from the bot fields below as already loaded; and bit 1, set to show the seat’s champion on the loading screen in its skin’s vintage art. The others have no effect.
sideu32The side the seat is on, or zero where it stands empty.
botNametext, 64 bytesWhat the seat is called where nobody holds it, written and padded as above. A 4.17 client shows its own name for a bot of the champion instead.
botAssettext, 64 bytesThe name the client loads art for it under where nobody holds it, written and padded as above.
standingtext, 16 bytesWhat the seat’s standing across matches is called, written and padded as above. A 4.17 client frames the seat’s loading-screen card with its own image of that name, where it has one; UNRANKED and BRONZE draw nothing.
botSkini32Which look it wears where nobody holds it.
botDifficultyi32How well it plays where nobody holds it: 0 beginner, 1 intermediate, 2 advanced, 3 top, 4 tutorial, 5 intro. A 4.17 client draws it nowhere and picks the bot’s summoner spells by it.
iconi32Which profile icon the client shows on the seat’s loading-screen card; a negative number, or one with no art, shows icon 0’s.
allyBadgeu8The badge a 4.17 client shows on the seat’s card to the seat’s own side (and to a client on neither side), where it is one of the badges the client’s own data names.
enemyBadgeu8The badge it shows where the ally badge is not shown and this is nonzero.

SpeedParams

How a unit is made to travel, in place of what a receiving end would otherwise choose for it.

Definition.

In every range of this book

FieldTypeWhat it is
speedf32How fast the unit travels along the path, in world units a second, standing in for its own pace.
gravityf32How sharply the unit arcs through the air along the way. Zero where it keeps to the ground.
fromXf32Where the unit starts, along one ground axis, in world units. It holds the same place the path’s first point states, and is carried whether the unit arcs or not.
fromZf32Where it starts, along the other.
keepFacingu80 to face the way the unit travels, 1 to keep its facing. Values: 0 faceTheWayItGoes, 1 holdItsFacing.
followsu32The unit this one is made to follow, or zero where it follows none.
followDistancef32How far from that unit it is made to stay, in world units.
followBackDistancef32How far behind that unit it is made to stay, in world units.
followTimef32Seconds to reach the followed unit, from when a client applies the message; it applies only where follows is nonzero. Above zero, a client sets the speed each update to the ground distance left to the followed unit (moved back by followBackDistance) over the time left, at least 0.0001 seconds, overriding speed, and keeps the last speed once the time is up; an arcing unit takes it as its first flight time. Zero or below does nothing.

SpellCast

One casting of a spell: which spell, who cast it, at what, and the timings a client plays it out with.

Definition.

In every range of this book

FieldTypeWhat it is
sizeu16How many bytes the casting takes, this field included. Where it differs from the bytes the casting takes, a client gives the cast no spell.
spellu32Which spell, by the number its name gives, as Objects and identifiers works it out.
castu32The name this casting answers to, so later messages can name it.
levelu8The rank the spell stands at, counting from 1: a spell at its first rank carries 1.
attackSpeedf32What the caster’s attack rhythm is scaled by while this runs.
casteru32The unit casting.
chainOwneru32The unit the casting is credited to, where a chain of casts leads back to another.
packageu32Which set of art and sound the client draws it with.
missileu32The name the missile this casting throws will answer to, or zero where it throws none.
targetXf32Where the casting is aimed, along one ground axis, in world units.
targetYf32Where the casting is aimed, in height, in world units.
targetZf32Where the casting is aimed, along the other ground axis, in world units.
targetEndXf32Where the casting stops being aimed, for a spell that sweeps, along one ground axis, in world units.
targetEndYf32Where the casting stops being aimed, for a spell that sweeps, in height, in world units.
targetEndZf32Where the casting stops being aimed, for a spell that sweeps, along the other ground axis, in world units.
hitCountu8How many units the casting names as hit.
hitscount in hitCount × SpellHitThe units the casting hits, each a unit then a one-byte result; a 4.17 client takes at most 32.
castTimef32How long the casting takes before it takes effect, in seconds.
extraCastTimef32What is added to that, in seconds.
totalTimef32How long the whole casting runs, in seconds.
cooldownf32How long until the spell can be cast again, in seconds.
startedAtf32When the casting began, in seconds.
how1-byte bits
how.basicAttackbit 0Set where the casting is the caster’s own swing rather than a spell.
how.secondBasicAttackbit 1Set where the swing is the second of a pair.
how.forcedbit 2Set where the casting was not asked for by whoever holds the caster.
how.overrideCastPositionbit 3Set where the aim above replaces the one the caster would have used.
how.clickedbit 4Set where a click on the spell’s own button started the casting. A client does nothing with it.
how.unusedbit 5 to 7Unused; a server writes zero.
slotu8Which of the caster’s slots the spell sits in.
costf32What the casting spends from the caster’s resource.
launchXf32Where what the casting throws leaves from, along one ground axis, in world units.
launchYf32Where what the casting throws leaves from, in height, in world units.
launchZf32Where what the casting throws leaves from, along the other ground axis, in world units.
ammoUsedi32How many charges the casting spends.
ammoRechargef32How long until a spent charge returns, in seconds.

SpellHit

One unit a casting names as hit, and how it was hit.

Definition.

In 4.1–4.16

FieldTypeWhat it is
unitu32The unit hit.
atXf32Where the hit is, along one ground axis, in world units. A client gives it to the missile it makes for this hit.
atYf32Where the hit is, in height, in world units. A client gives it to the missile it makes for this hit.
atZf32Where the hit is, along the other ground axis, in world units. A client gives it to the missile it makes for this hit.
resultu8How the hit landed.
Vectors (1)

one-on-4-16

In 4.17–4.20

FieldTypeWhat it is
unitu32The unit hit.
resultu8How the hit landed.

SpellNumberSet

The numbers a client shows beside one of a unit’s spells, and which of them it keeps from the other side.

Definition.

In 4.7–4.20

FieldTypeWhat it is
unitu32The unit whose spell this is.
slotu8Which slot.
values16 × f32The numbers themselves, one place each.
hidden16 × u8Which of those places the other side is not shown, one for each.

Strike

One swing of a unit’s own weapon: what it is aimed at, when it lands, and the missile it throws.

Definition.

In 4.18–4.20

FieldTypeWhat it is
targetu32The unit swung at. A server sends a nonzero unit.
timingu8A shift in time: the value less 128, in hundredths of a second, from -1.28 to 1.27; 128 shifts nothing. It moves when the swing lets go and ends, and when the unit may next attack.
missileu32The name the missile this swing throws will answer to.
slotu8Which of the unit’s attacks this is.
targetXf32Where the unit swung at stands, along one ground axis. Carried in the units a path uses rather than in world units, and a server sends a whole number. Movement says how the two relate.
targetYf32Where it stands, in height. Carried in world units.
targetZf32Where it stands, along the other ground axis. It shares the reading of the first.