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#

   
FieldTypeValue
Length*ShortThe length of the following record, excluding these bytes.
Type*ByteThe type of the record

Record: Auth#

This is only sent on once, on initial connection.

   
FieldTypeValue
Type*ByteLiveRecordType.Auth (7)
Version*ByteThe version of the plugin protocol
Token*StringJWT token, generated from panel
PortShortThe port the server is running on, for panel to link plugin to server on that port
Game VersionStringVersion 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)

   
FieldTypeValue
Type*ByteLiveRecordType.CommandResponse (6)
ID*ByteThe ID that was specified when command was sent
Response Type*Byte
  • -1: Result is an error
  • 0: No response
  • 1: Result is a boolean
  • 2: Result is a int
  • 3: Result is a float
Result*ByteThe result of the command, can be boolean or a number.
Message*StringThe 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

   
FieldTypeValue
Type*ByteLiveRecordType.Game (0)
Start Timestamp*IntUnix timestamp (seconds).When the plugin has started, which can be used as server uptime
Campaign Start Timestamp*IntUnix timestamp (seconds).When the current campaign has started
Difficulty*ByteThe difficulty level, in order:Easy(0), Normal(1), Advanced(2), Expert(3)
State*ByteEnum, in order:None, Transitioning(1), Hibernating(2)
Max PlayersByteThe maximum amount of players that can join.
Gamemode*StringThe current gamemode
Map*StringThe current map

Record: Player#

Typically, this record is followed with either SurvivorRecord + SurvivorItemsRecord or InfectedRecord unless the state is Disconnected

   
FieldTypeValue
Type*ByteLiveRecordType.Player (0)
User ID*IntUser ID (auto incremented for each user, for a duration of a session)
SteamID*StringUser's SteamID 2 (STEAM_#:#:#######). Is "BOT" if user is a fake client
Player StateByte

Enum, in order:

  • [0] Normal / In-Game
  • [1] Connected
  • [2] Disconnected
  • [3] Idle (survivor data is from bot)
Join/Leave TimestampIntUnix 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.
NameStringThe player's name.

Record: Survivor#

Represents a survivor. If a player is idle, this will be the idle player's bot's data.

   
FieldTypeValue
Type*ByteLiveRecordType.Player (1)
User ID*IntUser 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*ByteTemp health, from pills/adrenaline
Permanent Health*BytePermanent health, assumed to be max 100. To get total health add with temp health
Flow Progress Percent*ByteHow far through a campaign as a percent (0-100) the player is. Can go up/down
Survivor State*ByteSurvivor state enum, see below
Movement State*ByteSurvivor movement enum, see below
Survivor Action*ByteSurvivor 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

   
FieldTypeValue
Type*ByteLiveRecordType.SurvivorItems (5)
User ID*IntUser ID (auto incremented for each user, for a duration of a session)
Slot 0*StringThe weapon in slot 0 (primary)
Slot 1*StringThe weapon in slot 1 (secondary, pistols)
Slot 2*StringThe weapon in slot 2 (throwables)
Slot3*StringThe weapon in slot 3 (kit/ammo packs)
Slot 4*StringThe weapon in slot 4 (pills / adrenaline)
Slot 5*StringThe 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.

   
FieldTypeValue
Type*ByteLiveRecordType.Infected (3)
User ID*IntUser ID (auto incremented for each user, for a duration of a session)
Current Health*ShortThe infected's current health
Max Health*ShortThe infected's maximum health, such as for tanks
Special Type*ByteEnum, starting at 0, in order:Smoker(1), Boomer(2), Hunter(3), Spitter(4), Jockey(5), Charger(6), Witch(7), Tank(8)
Victim User ID*ByteIf 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

   
FieldTypeValue
Type*ByteLiveRecordType.Finale (4)
Finale Stage*ByteThe current finale stage
Escape Vehicle Active*ByteIs the finale escape vehicle ready?

Record: Meta#

   
FieldTypeValue
Type*ByteLiveRecordType.Meta (8)
Steam StateByteBoolean, does server have connection to steam?