Skip to main content

Unreliable Update

This packet is unreliably sent every tick.

  • ID: 0x18 (24)
  • Size: Variable
  • LZ4 Compressed: Yes
  • State: Playing
  • Bound To: Server -> Client

Structure

OffsetField NameField TypeNotes
0x00Server Tickbe u32The server tick number. The same value as returned by sm.game.getServerTick().
0x04Current Tickbe u32The current tick number. The same value as returned by sm.game.getCurrentTick().
0x08Update Countu8The amount of NetObj updates.
0x09UpdatesUpdate[Update Count]The NetObj updates.

Update

OffsetField NameField TypeNotes
0x00Sizeu8The size of the entire update structure, including this field.
0x01Typeenum NetObjType : u8The type of the NetObj to update.
0x02Update Data... (Size - 2 bytes)The update data for the NetObj. This depends on the value of Type.

NetObjType Enum

This is an exhaustive list. Updates with values not listed in this table print an error in the console.

IDNameUnreliably Updateable
0RigidBody Yes
1ChildShape Not implemented
2Joint Not implemented
3Controller Yes
4Container Not implemented
5Harvestable Not implemented
6Character Yes
7Lift Not implemented
8Tool Not implemented
9Portal Not implemented
10PathNode Not implemented
11Unit Not implemented
12VoxelTerrainCell Not implemented
13ScriptableObject Not implemented
14ShapeGroup Not implemented

NetObjType 0 - RigidBody

OffsetField NameField TypeNotes
0x00Body IDbe u32The ID of the rigid body to update.
0x04RotationQuatThe world rotation of the rigid body.
0x14PositionVec3fThe world position of the rigid body.
0x20VelocityVec3fThe velocity of the rigid body.
0x2CAngular VelocityVec3fThe angular velocity of the rigid body.
0x38Is Awakebool : 1 bitWhether or not the rigid body is awake.
0x38 + 1 bitRevisionu8 : 7 bitsThe revision of the rigid body. Overflows back to 0 after reaching 127.

NetObjType 3 - Controller

OffsetField NameField TypeNotes
0x00Interactable IDbe u32The ID of the interactable to update.
0x04DataVariableThe data of the update. The size and structure depend on the type of the interactable, which is not specified in this update packet.

NetObjType 6 - Character

note

Parsing and building this structure requires the use of a BitStream. See BitStream for more information.

OffsetField NameField TypeNotes
0x00 bitsCharacter IDbe u32The ID of the character to update.
0x20 bitsIs TumblingboolWhether or not the character is tumbling.
0x21 bits...Not Tumbling | TumblingThe character data. See Not Tumbling and Tumbling for more information.
Not Tumbling

If the Is Tumbling field is False, the following fields are present:

OffsetField NameField TypeNotes
0x21 bitsKeysbitfield Keys : u8Bitfield of which movement keys are pressed.
0x29 bitsDirectionu8The horizontal direction is moving or last moved in. From a top-down view, a value of 0 indicates the character is moving right. Increasing value of the direction integer rotates the direction counter-clockwise, so a value of 64 indicates forwards, 128 left and 192 backwards.
0x31 bitsYawu8The player's horizontal look rotation. A yaw of 0 means the player is looking into the positive Y direction. Rotating counter-clockwise (to the left) increases the yaw. After reaching 255, the yaw overflows back to 0.
0x39 bitsPitchu8The player's vertical look rotation. A pitch of 0 means the player is looking straight down (into the negative Z direction). Looking straight up yields a pitch of 128.
0x41 bitsPositionVec3fThe world position of the character.
Tumbling

If the Is Tumbling field is True, the following fields are present:

OffsetField NameField TypeNotes
0x21 bitsRotationQuatThe world rotation of the character.
0x41 bitsPositionVec3fThe world position of the character.
0x59 bitsVelocityVec3fThe velocity of the character.
0x71 bitsAngular VelocityVec3fThe angular velocity of the character.

Keys bitfield

info

This structure is the same as the Keys bitfield in the 30 - Player Movement packet.

Contains information about which movement keys are pressed. All bits are always low while the player's character is seated.

BitsField nameNotes
7UnknownNot known to be anything other than low.
6
5
4AimingHigh when the player is aiming with a Spud Gun, low otherwise. This value is set using Tool:setMovementSlowDown and read using Character:isAiming
3Sprint

High when the player is sprinting while moving horizontally. Low in all other cases, including when the player is holding the Sprint button while standing still.

2HorizontalHigh when any of the Move Forward, Move Backward, Stafe Left or Strafe Right keys are pressed.
1CrawlHigh when the player is holding the Crawl (crouch) keybind. This is not connected to the actual crawl state of the player's character. If the character is crawling and unable to stand up, the value can be either high or low depending on whether the player is holding the Crawl key or not.
0JumpHigh when the player is holding the Jump button. The player's character does not have to be on the ground.

Vec3f

OffsetField NameField TypeNotes
0x00Xbe floatThe 32-bit, floating point, X coordinate.
0x04Ybe floatThe 32-bit, floating point, Y coordinate.
0x08Zbe floatThe 32-bit, floating point, Z coordinate.

Quat

OffsetField NameField TypeNotes
0x00Xbe floatThe 32-bit, floating point, X coordinate.
0x04Ybe floatThe 32-bit, floating point, Y coordinate.
0x08Zbe floatThe 32-bit, floating point, Z coordinate.
0x0CWbe floatThe 32-bit, floating point, real, W coordinate.