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

Votes

Surrender votes, and a vote on evening out a match.

Surrender

A server tells a side a surrender vote has been called with SurrenderVoteCalled. A client answers with SurrenderVote, and a server tells the side where the vote stands with SurrenderStatus. SurrenderAllowed says whether a champion’s player can call a vote, turning the choice in the client’s menu on or off.

SurrenderVoteCalled shows the caller’s vote to that side and, where it says the vote opens, opens the vote’s panel for that side.

In 4.1–4.19

A client ignores SurrenderVoteCalled that arrives before its own champion is on the field.

Evening out a match

A server can hold a vote on giving the side behind gold, experience and turrets. BalanceVote opens the vote’s panel for the voting side and adds one voter with each message; a client answers with BalanceVoteAnswer from the panel or as its player types /equalize, once per vote. BalanceResult says how the vote ended, or why it could not be held.

In 4.1–4.19

Where the version answer’s features turn the commands on, a client also sends BalanceVoteRefused, a vote against, as its player types /noequalize.

BalanceVote opens the panel on the first vote.

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

SurrenderVoteCalled

What a server sends to open a surrender vote, or to report one already open. The header names no object: it carries zero.

Definition.

In 4.1–4.17

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

BuildsCommand
4.1–4.10200
4.11–4.17201

A client ignores it unless its menu and its own champion both exist.

FieldTypeWhat it is
how1-byte bits
how.countAsYesbit 0Applies only where side is the client’s own: set shows caller voting yes, clear voting no, opening the menu or not.
how.openTheMenubit 1Set where the vote opens: a client of side opens the vote’s panel from seats and closesIn, which have no other effect; every client is told a vote began, with caller, inFavour, against and side.
how.unusedbit 2 to 7Unused; a server writes zero.
calleru32The unit that called the vote.
inFavouru8How many have voted for.
againstu8How many have voted against.
seatsu8How many seats can vote.
sideu32Which side is voting.
closesInf32How long the vote stays open, in seconds.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

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

FieldTypeWhat it is
how1-byte bits
how.countAsYesbit 0Set where the receiving seat is taken to have voted for.
how.openTheMenubit 1Set where the client shows the vote to the seat.
how.unusedbit 2 to 7Unused; a server writes zero.
calleru32The unit that called the vote.
inFavouru8How many have voted for.
againstu8How many have voted against.
seatsu8How many seats can vote.
sideu32Which side is voting.
closesInf32How long the vote stays open, in seconds.
Vectors (1)

one-on-4-20

SurrenderVote

What a client sends to vote on surrendering. The header names no object: it carries zero.

Definition.

In 4.1–4.17

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

BuildsCommand
4.1–4.10163
4.11–4.17164

It answers a call to surrender.

FieldTypeWhat it is
how1-byte bits
how.inFavourbit 0Set where the answer is yes. A client sends it clear.
how.unusedbit 1 to 7Always clear.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

Command 164 on requests, sent by the client, reliable.

It answers a call to surrender.

FieldTypeWhat it is
how1-byte bits
how.inFavourbit 0Set where the answer is yes.
how.unusedbit 1 to 7Unused; a client may leave any value here, and a server ignores it.
Vectors (1)

in-favour-on-4-20

SurrenderStatus

What a server sends to tell a side where its surrender vote stands. The header names no object: it carries zero.

Definition.

In 4.1–4.17

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

BuildsCommand
4.1–4.10164
4.11–4.17165
FieldTypeWhat it is
reasonu8Why the vote stands where it does.
inFavouru8How many voted for.
againstu8How many voted against.
sideu32Which side.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

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

FieldTypeWhat it is
reasonu32Why the vote is where it is.
inFavouru8How many voted for.
againstu8How many voted against.
sideu16Which side.
Vectors (1)

one-on-4-20

SurrenderAllowed

What a server sends to say whether a champion’s player can call a surrender vote. The header names the champion.

Definition.

In every range of this book

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

A client turns the surrender choice in its menu on or off, and does nothing before the menu exists.

FieldTypeWhat it is
flags1-byte bitsWhether it is allowed.
flags.allowedbit 0Set where a vote can be called.
flags.unusedbit 1 to 7Unused; a server writes zero.
Vectors (2)

one-on-4-17, one-on-4-20

BalanceVote

What a server sends as a side votes on evening out a match: on the first vote it opens the vote’s panel for that side, and each message adds one voter. A client sends BalanceVoteAnswer as its player votes. A client with no champion of its own ignores it. The header carries zero.

Definition.

In every range of this book

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

BuildsCommand
4.1–4.10249
4.11–4.20250
FieldTypeWhat it is
flags1-byte bitsThis vote.
flags.inFavourbit 0Set where this voter voted for.
flags.firstbit 1Set where this vote opens a new vote.
flags.unusedbit 2 to 7Unused; a server writes zero.
voteru32The voter’s champion.
inFavouru8How many voted for.
againstu8How many voted against.
votersu8How many can vote. It applies only on the first vote.
sidei32The voting side.
closesInf32Seconds until the vote closes. It applies only on the first vote.
goldf32Gold the losing side would be given.
experiencei32Experience it would be given.
turretsi32Turrets it would be given.
Vectors (3)

one-on-4-10, one-on-4-17, one-on-4-20

BalanceVoteAnswer

What a client sends as its player answers a vote on evening out a match (BalanceVote), once per vote, from the vote’s panel or by typing /equalize. The header carries zero.

Definition.

In 4.1–4.17

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

BuildsCommand
4.1–4.10250
4.11–4.17251
FieldTypeWhat it is
vote1-byte bitsThe answer.
vote.inFavourbit 0Set for yes, clear for no.
vote.unusedbit 1 to 7Unused; a client writes zero.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

Command 251 on requests, sent by the client, reliable.

FieldTypeWhat it is
vote1-byte bitsThe answer.
vote.inFavourbit 0Set for yes, clear for no.
vote.unusedbit 1 to 7Unused; a client may leave any value here, and a server ignores it.
Vectors (1)

one-on-4-20

BalanceResult

What a server sends when a vote on evening out a match ends, or cannot be held. The header carries zero.

Definition.

In every range of this book

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

BuildsCommand
4.1–4.10251
4.11–4.20252
FieldTypeWhat it is
resultu8What came of it. Values: 0 failed, 1 notYet, 2 notAheadInGold, 3 notAheadInLevels, 4 tooSoon, 5 alreadyVoted, 6 agreed.
inFavouru8How many voted for.
againstu8How many voted against.
sidei32The side that voted.
goldf32Gold given.
experiencei32Experience given.
turretsi32Turrets given.
Vectors (3)

one-on-4-10, one-on-4-17, one-on-4-20

BalanceVoteRefused

What a client sends as its player types /noequalize, where the version answer’s features have bit 0 set, outside the tutorial: a vote against, laid out as BalanceVote with only its first fields filled. The header carries zero.

Definition.

In 4.1–4.17

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

BuildsCommand
4.1–4.10249
4.11–4.17250
FieldTypeWhat it is
flagsu8Zero: a vote against.
voteru32Zero.
unset23 × u8The rest of BalanceVote’s layout. Unused; its bytes carry no meaning.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

Command 250 on requests, sent by the client, reliable.

FieldTypeWhat it is
flagsu8A vote against: the lowest bit is clear. The other bits carry no meaning, and a server ignores them.
voteru32Zero.
unset23 × u8The rest of BalanceVote’s layout. Unused; its bytes carry no meaning.
Vectors (1)

one-on-4-20