Client → Server Packets (Records)
Client → Server Packets (Records)#
Multiple records can be included per packet, each record has a header of it's size, then it's type. It's then followed by an ASCII separator 0×1E which is just useful for debugging purposes.
Sometimes the plugin may send multiple group of records together, they will be separated by 0×0A (new line), but you should only rely on the size of records.
See
Record Headers#
| Field | Type | Value |
| Length* | Short | The length of the following record, excluding these bytes. |
| Type* | Byte | The type of the record |
Record: Auth#
This is only sent on once, on initial connection.
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Auth (7) |
| Version* | Byte | The version of the plugin protocol |
| Token* | String | JWT token, generated from panel |
| Port | Short | The port the server is running on, for panel to link plugin to server on that port |
| Game Version | String | Version of the game |
Record: Command Response#
The value of the Result field is determined by the Response Type field.
For non-builtins, response type is always 0 and result is always 1 (unless command does not exist)
| Field | Type | Value |
| Type* | Byte | LiveRecordType.CommandResponse (6) |
| ID* | Byte | The ID that was specified when command was sent |
| Response Type* | Byte |
|
| Result* | Byte | The result of the command, can be boolean or a number. |
| Message* | String | The raw text response, may be blank. |
Record: Game#
Sent every time a map is loaded, and when starting a transition.
Can be re-sent by sending a Refresh response
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Game (0) |
| Start Timestamp* | Int | Unix timestamp (seconds).When the plugin has started, which can be used as server uptime |
| Campaign Start Timestamp* | Int | Unix timestamp (seconds).When the current campaign has started |
| Difficulty* | Byte | The difficulty level, in order:Easy(0), Normal(1), Advanced(2), Expert(3) |
| State* | Byte | Enum, in order:None, Transitioning(1), Hibernating(2) |
| Max Players | Byte | The maximum amount of players that can join. |
| Gamemode* | String | The current gamemode |
| Map* | String | The current map |
Record: Player#
Typically, this record is followed with either SurvivorRecord + SurvivorItemsRecord or InfectedRecord unless the state is Disconnected
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Player (0) |
| User ID* | Int | User ID (auto incremented for each user, for a duration of a session) |
| SteamID* | String | User's SteamID 2 (STEAM_#:#:#######). Is "BOT" if user is a fake client |
| Player State | Byte | Enum, in order:
|
| Join/Leave Timestamp | Int | Unix timestamp (seconds).If state is Disconnected, it is the time when the player disconnected.Otherwise, the time will be when the player first joined the campaign. It should not reset on transitions, but it can. |
| Name | String | The player's name. |
Record: Survivor#
Represents a survivor. If a player is idle, this will be the idle player's bot's data.
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Player (1) |
| User ID* | Int | User ID (auto incremented for each user, for a duration of a session)Is the same as the Player record |
| Survivor* | Byte | The survivor type 0=Nick, 1=Rochelle, 2=Coach, 3=Ellis, 4=Bill, 5=Francis, 6=Zoey, 7=Louis |
| Temp Health* | Byte | Temp health, from pills/adrenaline |
| Permanent Health* | Byte | Permanent health, assumed to be max 100. To get total health add with temp health |
| Flow Progress Percent* | Byte | How far through a campaign as a percent (0-100) the player is. Can go up/down |
| Survivor State* | Byte | Survivor state enum, see below |
| Movement State* | Byte | Survivor movement enum, see below |
| Survivor Action* | Byte | Survivor action enum, see below |
Record: Survivor Items#
Slots may be empty (and only include a single null terminator).
Slot 1, if the weapon was weapon_melee, the melee weapon's name will be given instead. All other weapons retain their weapon _prefix
| Field | Type | Value |
| Type* | Byte | LiveRecordType.SurvivorItems (5) |
| User ID* | Int | User ID (auto incremented for each user, for a duration of a session) |
| Slot 0* | String | The weapon in slot 0 (primary) |
| Slot 1* | String | The weapon in slot 1 (secondary, pistols) |
| Slot 2* | String | The weapon in slot 2 (throwables) |
| Slot3* | String | The weapon in slot 3 (kit/ammo packs) |
| Slot 4* | String | The weapon in slot 4 (pills / adrenaline) |
| Slot 5* | String | The weapon in slot 5 (any carryables, ex. gascans, gnome) |
Record: Infected#
Represents a player-controllable special infected.
There is never a record for Infected with special type witch (7), as it's not a player-controllable enemy.
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Infected (3) |
| User ID* | Int | User ID (auto incremented for each user, for a duration of a session) |
| Current Health* | Short | The infected's current health |
| Max Health* | Short | The infected's maximum health, such as for tanks |
| Special Type* | Byte | Enum, starting at 0, in order:Smoker(1), Boomer(2), Hunter(3), Spitter(4), Jockey(5), Charger(6), Witch(7), Tank(8) |
| Victim User ID* | Byte | If infected has a victim (hunted player, smoked player, etc), their user id. |
Record: Finale#
Sent every time the finale stage changes, indicates the finale is active
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Finale (4) |
| Finale Stage* | Byte | The current finale stage |
| Escape Vehicle Active* | Byte | Is the finale escape vehicle ready? |
Record: Meta#
| Field | Type | Value |
| Type* | Byte | LiveRecordType.Meta (8) |
| Steam State | Byte | Boolean, does server have connection to steam? |