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 sameCreateChampionnaming no client, orSpawnBot; - 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 andMarkerMovedmoves; - 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.
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.
| Field | Type | What it is |
|---|---|---|
| champion | u32 | The name the champion answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| clientId | u32 | The 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. |
| side | u8 | Nonzero for side 100, zero for side 200. |
| flag | u8 | Passed to the champion as it is made; what it changes is not recorded. |
| name | text, 40 bytes | What the seat holding it is called. Written out in full and padded with zero bytes to the width above. |
| asset | text, ended by a zero byte | The 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)
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.
| Field | Type | What it is |
|---|---|---|
| champion | u32 | The name the champion answers to, so later messages can name it. |
| clientId | u32 | The 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. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| skillLevel | u8 | It has no effect. |
| side | u8 | Nonzero for side 100, zero for side 200. |
| bot | u8 | Nonzero 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. |
| skin | i32 | Which look it wears. |
| name | text, 40 bytes | What the seat holding it is called. Written out in full and padded with zero bytes to the width above. |
| asset | text, 128 bytes | The champion it is: the name the client loads its art and sound under, written and padded as above. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| champion | u32 | The name the champion answers to, so later messages can name it. |
| clientId | u32 | The 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. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| skillLevel | u8 | It has no effect. |
| side | u8 | Nonzero for side 100, zero for side 200. |
| bot | u8 | Nonzero where a bot plays the seat and nobody holds it. A client only keeps it; the shown name is name as sent. |
| spawnIndex | u8 | Where 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. |
| skin | i32 | Which look it wears. |
| name | text, 40 bytes | What the seat holding it is called. Written out in full and padded with zero bytes to the width above. |
| asset | text, 128 bytes | The champion it is: the name the client loads its art and sound under, written and padded as above. |
Vectors (1)
SpawnFromBarracks
What a server sends to put a unit on the field from the place its side sends them out of.
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the unit answers to, so later messages can name it. |
| node | u8 | Which network node the unit belongs to, in a field of its own rather than as part of the name that follows. |
| wave | u8 | Which run of units it belongs to. |
| kind | u8 | What sort of unit it is, from 0 to 3. A value above 3 has no defined effect. |
| unread | u8 | A client reads nothing here. A server writes zero. |
| damageBonus | i16 | What is added to the damage it deals. |
| healthBonus | i16 | What is added to the health it holds. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the unit answers to, so later messages can name it. |
| node | u8 | Which network node the unit belongs to, in a field of its own rather than as part of the name that follows. |
| wave | u8 | Which run of units it belongs to. |
| kind | u8 | What sort of unit it is, from 0 to 3; any other value has no defined effect. |
| damageBonus | i16 | What is added to the damage it deals. |
| healthBonus | i16 | What is added to the health it holds. |
Vectors (1)
SpawnUnit
What a server sends to put a minion-like unit on the field, such as a ward.
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the new unit answers to. |
| node | u8 | Which network node the unit belongs to. |
| atX | f32 | Where it stands, along one ground axis, in world units. |
| atY | f32 | Where it stands, in height, in world units. |
| atZ | f32 | Where it stands, along the other ground axis, in world units. |
| team | u32 | The side the unit is on, as a whole number. |
| name | text, 64 bytes | Its name, padded with zero bytes. |
| asset | text, 64 bytes | The name the client loads its art under, padded with zero bytes. |
| clone | u32 | The unit the new one is linked to, or zero. |
Vectors (1)
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the new unit answers to. |
| node | u8 | Which network node the unit belongs to. |
| atX | f32 | Where it stands, along one ground axis, in world units. |
| atY | f32 | Where it stands, in height, in world units. |
| atZ | f32 | Where it stands, along the other ground axis, in world units. |
| name | text, 64 bytes | Its name, padded with zero bytes. |
| asset | text, 64 bytes | The name the client loads its art under, padded with zero bytes. |
| clone | u32 | The unit the new unit is linked to as a clone, or zero. |
| team | 4-byte bits | |
| team.team | bit 0 to 8 | Which side, as a team number. |
| team.unused | bit 9 to 31 | Unused; a server writes zero. |
| flags | 1-byte bits | |
| flags.ignoreCollision | bit 0 | Set where it does not block the way. |
| flags.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
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.
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the unit answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| atX | f32 | Where the unit stands, along one ground axis, in world units. |
| atY | f32 | Where the unit stands, in height, in world units. |
| atZ | f32 | Where the unit stands, along the other ground axis, in world units. |
| name | text, 64 bytes | What 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. |
| asset | text, 64 bytes | The 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. |
| uniqueName | text, 64 bytes | A 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. |
| side | u32 | The side it belongs to, or zero where it belongs to none. |
| damageBonus | i32 | What is added to the damage it deals. |
| healthBonus | i32 | What is added to its maximum health, three times over: the unit stands at full health, at its base maximum plus three times this. |
| roaming | u32 | How the monster wanders. Values: 0 inactive, 1 hostile, 2 fleeing. |
| camp | u32 | Which 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)
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.
| Field | Type | What it is |
|---|---|---|
| unit | u32 | The name the unit answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| atX | f32 | Where the unit stands, along one ground axis, in world units. |
| atY | f32 | Where the unit stands, in height, in world units. |
| atZ | f32 | Where the unit stands, along the other ground axis, in world units. |
| campAtX | f32 | Where the camp it belongs to sits, along one ground axis, in world units. |
| campAtY | f32 | Where the camp it belongs to sits, in height, in world units. |
| campAtZ | f32 | Where the camp it belongs to sits, along the other ground axis, in world units. |
| name | text, 64 bytes | What 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. |
| asset | text, 64 bytes | The name the client loads its art and sound under, written and padded as above. |
| uniqueName | text, 64 bytes | A further name the unit answers to, written and padded as above. |
| side | u32 | The side it belongs to, or zero where it belongs to none. |
| damageBonus | i32 | What is added to the damage it deals. |
| healthBonus | i32 | What 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. |
| roaming | u32 | How the monster wanders. It has no effect. Values: 0 inactive, 1 hostile, 2 fleeing. |
| camp | u32 | Which 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)
SpawnPet
What a server sends to put a pet on the field.
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.
| Field | Type | What it is |
|---|---|---|
| pet | u32 | The id the pet answers to, which a client gives it together with node. The header names the owner. |
| node | u8 | Which network node it belongs to. |
| atX | f32 | Where it stands, along one ground axis, in world units. |
| atY | f32 | In height, in world units. |
| atZ | f32 | Along the other ground axis, in world units. |
| spellLevel | i32 | The level of the spell that summoned it, plus one. A client uses it only where the owner belongs to its own network node. |
| duration | f32 | How long it lasts, in seconds. A client reads nothing of it. |
| damageBonus | i32 | What is added to the damage it deals. |
| healthBonus | i32 | What is added to its health. |
| name | text, 32 bytes | Its name, padded with zero bytes. |
| asset | text, 32 bytes | The name the client loads its art under, padded with zero bytes. |
| effect | text, 64 bytes | An effect it carries, padded with zero bytes. A client uses it only where the owner belongs to its own network node. |
| clone | u32 | The 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)
CreateTurret
What a server sends to put a turret on the field. The header names the unit this is about.
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.
| Field | Type | What it is |
|---|---|---|
| turret | u32 | The name the turret answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| atX | f32 | Where it stands, along one ground axis, in world units. |
| atY | f32 | Its height. |
| atZ | f32 | Along the other ground axis. |
| name | text, 64 bytes | What 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. |
| asset | text, 64 bytes | The 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)
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.
| Field | Type | What it is |
|---|---|---|
| turret | u32 | The name the turret answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| name | text, 64 bytes | What 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)
BotDebug
What a server sends describing what a bot is thinking. It changes nothing a client shows. The header names the unit.
In 0.9.22.14–1.0.0.24
Command 105 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| name | text, 64 bytes | The bot’s name. |
| strategy | text, 64 bytes | Its strategy. |
| behaviour | text, 64 bytes | Its behaviour. |
| task | text, 64 bytes | Its task. |
| state1 | text, 64 bytes | A line of its state. |
| state2 | text, 64 bytes | A line of its state. |
| state3 | text, 64 bytes | A 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.
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 | 108 |
| 0.9.22.14–1.0.0.24 | 106 |
| Field | Type | What it is |
|---|---|---|
| targets | 5 × u32 | Five units. |
Vectors (1)
BotState
What a server sends naming a bot’s state. It changes nothing a client shows. 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 | 109 |
| 0.9.22.14–1.0.0.24 | 107 |
| Field | Type | What it is |
|---|---|---|
| state | i32 | The state. |
Vectors (1)
PlaceTurret
What a server sends to make a turret.
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.
| Field | Type | What it is |
|---|---|---|
| turret | u32 | The name the turret answers to, so later messages can name it. |
| node | u8 | Which network node the object belongs to, in a field of its own. |
| unread | bytes, 12 | A client reads nothing here. A server writes zero. |
| name | text, 64 bytes | What this turret is called. Written out in full and padded with zero bytes to the width above. |
| asset | text, 64 bytes | The character it is. Written and padded as above. |
| side | u8 | Nonzero for side 100, zero for side 200. |