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

Units

How a server puts objects on the field and takes them away: champions, minions, neutral monsters, turrets, pets, markers and props. What a unit then does is in Movement, Combat and Spells, and what it is worth in Replication.

Every object is named by a net id, and Objects and identifiers says what removes each kind of object.

Creating

Each kind of object has its own message:

  • a champion, CreateChampion, which, carrying the client’s own client id, also makes that champion the client’s own; a bot’s champion, the same CreateChampion naming no client, or SpawnBot;
  • a minion sent out from a side’s barracks, SpawnFromBarracks, and a unit like one, such as a ward, SpawnUnit;
  • a monster of no side, CreateNeutral; a pet, SpawnPet;
  • a turret, CreateTurret (The client’s data says how it names one), and a turret of the server’s choosing, SpawnTurret;
  • an object that follows a unit, CreateFollower, and a change to what it follows, FollowerMaster;
  • an unseen marker, SpawnMarker, which other messages can name and MarkerMoved moves;
  • a prop, a thing that stands on the map and is looked at, MapProp, and a change to one, MapPropChanged.

CharacterPreload has a client load a character’s art ahead of need.

A client acts on a CreateChampion or a CreateNeutral whenever it arrives, before CharacterSelected as after.

Changing and removing

TeamChanged moves a unit to another side, and ChampionRemoved takes a champion out of the world. A unit’s death is in Combat.

Bots

A server can tell a client what a bot is thinking (BotDebug), weighing (BotTargets) or doing (BotState). None of them changes what a player sees.

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).

CreateChampion

What a server sends to put a champion on the field. The header carries zero or names the object this is about; a client accepts either.

Definition.

In 0.8.13.26–0.9.22.13

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

The champion takes the id in champion. A server sends it on its own. A client stands it at its side’s one fixed spawn point, or at 6000, 0, 6000 where that point is not set.

FieldTypeWhat it is
championu32The name the champion answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
clientIdu32The client id of the player the champion belongs to. A client takes the champion carrying its own client id as its own, and any other as belonging to no client of its own.
sideu8Nonzero for side 100, zero for side 200.
flagu8Passed to the champion as it is made; what it changes is not recorded.
nametext, 40 bytesWhat the seat holding it is called. Written out in full and padded with zero bytes to the width above.
assettext, ended by a zero byteThe champion it is, ended by a zero byte; the two take at most 64 bytes, and a client fails on a longer one.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–0.9.25.20

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

The champion takes the id in champion, not the header’s; a client first removes any object holding that id. For the client’s own seat, name also becomes its own player’s name. A client stands the champion at its side’s one spawn point.

FieldTypeWhat it is
championu32The name the champion answers to, so later messages can name it.
clientIdu32The client id of the player the champion belongs to, or 4294967295 where it belongs to none, as a bot’s does. A client takes the champion carrying its own client id as its own.
nodeu8Which network node the object belongs to, in a field of its own.
skillLevelu8It has no effect.
sideu8Nonzero for side 100, zero for side 200.
botu8Nonzero where a bot plays the seat and nobody holds it; its shown name is then the client’s own bot name for asset, and name has no effect.
skini32Which look it wears.
nametext, 40 bytesWhat the seat holding it is called. Written out in full and padded with zero bytes to the width above.
assettext, 128 bytesThe champion it is: the name the client loads its art and sound under, written and padded as above.
Vectors (1)

one-on-0-9-22-16

In 0.9.25.21–1.0.0.24

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

The champion takes the id in champion, not the header’s; a client first removes any object holding that id. For the client’s own seat, name also becomes its own player’s name.

FieldTypeWhat it is
championu32The name the champion answers to, so later messages can name it.
clientIdu32The client id of the player the champion belongs to, or 4294967295 where it belongs to none, as a bot’s does. A client takes the champion carrying its own client id as its own.
nodeu8Which network node the object belongs to, in a field of its own.
skillLevelu8It has no effect.
sideu8Nonzero for side 100, zero for side 200.
botu8Nonzero where a bot plays the seat and nobody holds it. A client only keeps it; the shown name is name as sent.
spawnIndexu8Where the champion first stands and faces. From 0 to 5, its side’s base position plus the offset the map sets for the side’s head count (players and bots) and this index plus one, facing as the map sets for them. A client works out the head count itself, counting SpawnStart’s bots in it. From 6 up, the base position itself, facing along +X. Movement or sight data replaces it.
skini32Which look it wears.
nametext, 40 bytesWhat the seat holding it is called. Written out in full and padded with zero bytes to the width above.
assettext, 128 bytesThe champion it is: the name the client loads its art and sound under, written and padded as above.
Vectors (1)

one-on-0-9-25-21

SpawnFromBarracks

What a server sends to put a unit on the field from the place its side sends them out of.

Definition.

In 0.8.13.26–0.9.22.13

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

A server sends it on its own. The unit stands at the barracks’ own position, on the barracks’ side.

FieldTypeWhat it is
unitu32The name the unit answers to, so later messages can name it.
nodeu8Which network node the unit belongs to, in a field of its own rather than as part of the name that follows.
waveu8Which run of units it belongs to.
kindu8What sort of unit it is, from 0 to 3. A value above 3 has no defined effect.
unreadu8A client reads nothing here. A server writes zero.
damageBonusi16What is added to the damage it deals.
healthBonusi16What is added to the health it holds.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

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

The header names the barracks, and a client handles the message only where it holds that barracks; the new unit’s id is in unit.

FieldTypeWhat it is
unitu32The name the unit answers to, so later messages can name it.
nodeu8Which network node the unit belongs to, in a field of its own rather than as part of the name that follows.
waveu8Which run of units it belongs to.
kindu8What sort of unit it is, from 0 to 3; any other value has no defined effect.
damageBonusi16What is added to the damage it deals.
healthBonusi16What is added to the health it holds.
Vectors (1)

one-on-0-9-22-14

SpawnUnit

What a server sends to put a minion-like unit on the field, such as a ward.

Definition.

In 0.8.13.26–0.9.22.13

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

A client deletes no object first; one already holding the new unit’s id keeps it alongside the new unit. A client fails where it cannot load the unit’s art. clone, where nonzero and held, is only linked to the new unit; nothing of it is copied.

FieldTypeWhat it is
unitu32The name the new unit answers to.
nodeu8Which network node the unit belongs to.
atXf32Where it stands, along one ground axis, in world units.
atYf32Where it stands, in height, in world units.
atZf32Where it stands, along the other ground axis, in world units.
teamu32The side the unit is on, as a whole number.
nametext, 64 bytesIts name, padded with zero bytes.
assettext, 64 bytesThe name the client loads its art under, padded with zero bytes.
cloneu32The unit the new one is linked to, or zero.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

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

A client gives the new unit its id and node, deleting nothing first. Where clone names a unit it holds, a client only links the new unit to it as a clone and copies nothing of it; zero or an unknown id leaves no link. The header names the unit that put it there.

FieldTypeWhat it is
unitu32The name the new unit answers to.
nodeu8Which network node the unit belongs to.
atXf32Where it stands, along one ground axis, in world units.
atYf32Where it stands, in height, in world units.
atZf32Where it stands, along the other ground axis, in world units.
nametext, 64 bytesIts name, padded with zero bytes.
assettext, 64 bytesThe name the client loads its art under, padded with zero bytes.
cloneu32The unit the new unit is linked to as a clone, or zero.
team4-byte bits
team.teambit 0 to 8Which side, as a team number.
team.unusedbit 9 to 31Unused; a server writes zero.
flags1-byte bits
flags.ignoreCollisionbit 0Set where it does not block the way.
flags.unusedbit 1 to 7Unused; a server writes zero.
Vectors (1)

one-on-0-9-22-14

CreateNeutral

What a server sends to put a unit that belongs to no side on the field. The header names the unit this is about.

Definition.

In 0.8.13.26–0.9.22.13

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

A server sends it on its own, on the channel given here. A client leaves the monster facing as it was made. A client adds damageBonus to the damage the unit deals twice over.

FieldTypeWhat it is
unitu32The name the unit answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
atXf32Where the unit stands, along one ground axis, in world units.
atYf32Where the unit stands, in height, in world units.
atZf32Where the unit stands, along the other ground axis, in world units.
nametext, 64 bytesWhat this unit is called, so a client can tell one from another. Written out in full and padded with zero bytes to the width above.
assettext, 64 bytesThe name the client loads its art and sound under, written and padded as above. The name and its zero byte fit in the 64 bytes; a client fails on a longer one.
uniqueNametext, 64 bytesA further name the unit answers to, written and padded as above. The name and its zero byte fit in the 64 bytes; a client fails on a longer one.
sideu32The side it belongs to, or zero where it belongs to none.
damageBonusi32What is added to the damage it deals.
healthBonusi32What is added to its maximum health, three times over: the unit stands at full health, at its base maximum plus three times this.
roamingu32How the monster wanders. Values: 0 inactive, 1 hostile, 2 fleeing.
campu32Which camp the unit belongs to. Where a client shows camps on its map, the first unit naming a camp places that camp at the unit’s position.
Vectors (1)

inactive-on-0-8-13-26

In 0.9.22.14–1.0.0.24

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

A client leaves the monster facing as it was made. A client adds damageBonus to the damage the unit deals twice over.

FieldTypeWhat it is
unitu32The name the unit answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
atXf32Where the unit stands, along one ground axis, in world units.
atYf32Where the unit stands, in height, in world units.
atZf32Where the unit stands, along the other ground axis, in world units.
campAtXf32Where the camp it belongs to sits, along one ground axis, in world units.
campAtYf32Where the camp it belongs to sits, in height, in world units.
campAtZf32Where the camp it belongs to sits, along the other ground axis, in world units.
nametext, 64 bytesWhat this unit is called, so a client can tell one from another. Written out in full and padded with zero bytes to the width above.
assettext, 64 bytesThe name the client loads its art and sound under, written and padded as above.
uniqueNametext, 64 bytesA further name the unit answers to, written and padded as above.
sideu32The side it belongs to, or zero where it belongs to none.
damageBonusi32What is added to the damage it deals.
healthBonusi32What is added to the health it holds, three times over: the unit’s maximum and current health both end at its base health plus three times this, and not below 0.
roamingu32How the monster wanders. It has no effect. Values: 0 inactive, 1 hostile, 2 fleeing.
campu32Which camp the unit belongs to. Where no camp of that number exists yet, a client makes one at the unit’s own position, not at campAt, and adds the unit to it.
Vectors (1)

inactive-on-0-9-22-16

SpawnPet

What a server sends to put a pet on the field.

Definition.

In every range of this book

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

The header names the owner, and every client that holds that unit handles the message. A client kills the owner’s earlier pet if that lives, then makes the pet under pet and node with the owner’s side, as the owner’s pet. It deletes no object first; where one already holds pet, both answer to it.

FieldTypeWhat it is
petu32The id the pet answers to, which a client gives it together with node. The header names the owner.
nodeu8Which network node it belongs to.
atXf32Where it stands, along one ground axis, in world units.
atYf32In height, in world units.
atZf32Along the other ground axis, in world units.
spellLeveli32The level of the spell that summoned it, plus one. A client uses it only where the owner belongs to its own network node.
durationf32How long it lasts, in seconds. A client reads nothing of it.
damageBonusi32What is added to the damage it deals.
healthBonusi32What is added to its health.
nametext, 32 bytesIts name, padded with zero bytes.
assettext, 32 bytesThe name the client loads its art under, padded with zero bytes.
effecttext, 64 bytesAn effect it carries, padded with zero bytes. A client uses it only where the owner belongs to its own network node.
cloneu32The unit it copies, or zero. For a minion-like pet, a client only links the pet to that unit, where it holds it, and copies nothing of it.
Vectors (1)

one-on-0-8-13-26

CreateTurret

What a server sends to put a turret on the field. The header names the unit this is about.

Definition.

In 0.8.13.26–0.9.22.13

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

A server sends it on its own, on the channel given here. A client makes the object, on side 200, and loads its character.

FieldTypeWhat it is
turretu32The name the turret answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
atXf32Where it stands, along one ground axis, in world units.
atYf32Its height.
atZf32Along the other ground axis.
nametext, 64 bytesWhat this turret is called, so a client can tell one from another. Written out in full and padded with zero bytes to the width above.
assettext, 64 bytesThe character it is: the name the client loads its data under. Written out in full and padded with zero bytes to the width above.
Vectors (1)

one-on-0-8-13-26

In 0.9.22.14–1.0.0.24

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

A client matches name against the map’s turrets, ignoring case. With no match it does nothing; a matched turret takes the id and node, and one missing or dead is not rebuilt.

FieldTypeWhat it is
turretu32The name the turret answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
nametext, 64 bytesWhat this turret is called, so a client can tell one from another. Written out in full and padded with zero bytes to the width above.
Vectors (1)

one-on-0-9-22-14

BotDebug

What a server sends describing what a bot is thinking. It changes nothing a client shows. The header names the unit.

Definition.

In 0.9.22.14–1.0.0.24

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

FieldTypeWhat it is
nametext, 64 bytesThe bot’s name.
strategytext, 64 bytesIts strategy.
behaviourtext, 64 bytesIts behaviour.
tasktext, 64 bytesIts task.
state1text, 64 bytesA line of its state.
state2text, 64 bytesA line of its state.
state3text, 64 bytesA line of its state.

BotTargets

What a server sends naming the units a bot is weighing. It changes nothing a client shows. 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.13108
0.9.22.14–1.0.0.24106
FieldTypeWhat it is
targets5 × u32Five units.
Vectors (1)

one-on-0-8-13-26

BotState

What a server sends naming a bot’s state. It changes nothing a client shows. 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.13109
0.9.22.14–1.0.0.24107
FieldTypeWhat it is
statei32The state.
Vectors (1)

one-on-0-8-13-26

PlaceTurret

What a server sends to make a turret.

Definition.

In 0.8.13.26–0.9.22.13

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

The header names an existing turret object, and the new turret takes that object’s position.

FieldTypeWhat it is
turretu32The name the turret answers to, so later messages can name it.
nodeu8Which network node the object belongs to, in a field of its own.
unreadbytes, 12A client reads nothing here. A server writes zero.
nametext, 64 bytesWhat this turret is called. Written out in full and padded with zero bytes to the width above.
assettext, 64 bytesThe character it is. Written and padded as above.
sideu8Nonzero for side 100, zero for side 200.
Vectors (1)

one-on-0-8-13-26