The 0x08
Hello packet in Among Us contains the client's version number in an encoded format between offsets 4
and 7
.
08 00 01 00 46 d2 02 03 08 75 73 65 72 6e 61 6d 65
|---------/
|
Version number (50516550 in this case)
This version number is encoded using the following formula:
int version = year * 25000 + month * 1800 + day * 50 + revision
// Example
int version = 2020 * 25000 + 9 * 1800 + 7 * 50 + 0 // = 50516550
The values year
, month
, day
, and revision
are all hardcoded values within the game and are all reflected in the top-left corner of the screen.
To decode the version and retrieve the separate units, use a method similar to the following:
int year = floor(version / 25000)
int month = floor((version %= 25000) / 1800)
int day = floor((version %= 1800) / 50)
int revision = version % 50
Note: Do not expect the version sent in the
0x08
Hello packet to match the version displayed in the game. There are multiple compatible versions that a client or server may have, the one sent to the server is simply its broadcast vesion.
Previous section: Converting Game IDs to and from Game Codes
Next section: Map-Specific IDs for Vents and Tasks