Options
All
  • Public
  • Public/Protected
  • All
Menu

Package data

Data | Among JS

Among Us constants, enums, types, static game data, and more. This is part of Among JS, a simple and flexible library for interacting with the Among Us protocol. You can find documentation here.

The data is currently organized into 4 groups:

  • Enums: constants for flags, packet types, and game data like colors
  • Types: rich types for packets and mother structured data
  • Static: data taken from the game such as matchmaking servers and map layouts
  • Utilities: type assertions and functions to convert enums to human-readable text

Index

Type aliases

GameDataPacket

PayloadPacket

RPCGameDataPacket

Remote procedure call packet bodies. These are actually extensions of the regular game data packet but with more data including an RPC flag. https://wiki.weewoo.net/wiki/Protocol#2_-_RPC_Game_Data

Functions

assertJoinGameErrorPayloadPacket

  • Assert that the packet is an error (server -> client) instead of a join request.

    Parameters

    Returns assertsvalue is JoinGameErrorPayloadPacket

assertJoinGameRequestPayloadPacket

  • Assert that the packet is a join request (client -> server) instead of an error.

    Parameters

    Returns assertsvalue is JoinGameRequestPayloadPacket

Const prettyDisconnectReason

  • prettyDisconnectReason(reason: DisconnectReason): "The game you tried to join is full.Check with the host to see if you can join next round." | "The game you tried to join already started.Check with the host to see if you can join next round." | "You are running an older version of the game.Please update to play with others." | "You were banned from the room.You cannot rejoin that room." | "You were kicked from the room.You cannot rejoin that room." | "Server refused username." | "You were banned for hacking.Please stop." | "You disconnected from the host.If this happens often, check your WiFi strength." | "The server stopped this game. Possibly due to inactivity." | "The Among Us servers are overloaded.Sorry! Please try again later!" | "Could not find the game you're looking for." | "Custom" | "Forcibly disconnected from the server:The remote sent a disconnect request."
  • Convert a disconnect reason to a human-readable string as found in the game.

    Parameters

    Returns "The game you tried to join is full.Check with the host to see if you can join next round." | "The game you tried to join already started.Check with the host to see if you can join next round." | "You are running an older version of the game.Please update to play with others." | "You were banned from the room.You cannot rejoin that room." | "You were kicked from the room.You cannot rejoin that room." | "Server refused username." | "You were banned for hacking.Please stop." | "You disconnected from the host.If this happens often, check your WiFi strength." | "The server stopped this game. Possibly due to inactivity." | "The Among Us servers are overloaded.Sorry! Please try again later!" | "Could not find the game you're looking for." | "Custom" | "Forcibly disconnected from the server:The remote sent a disconnect request."

Const prettyGameDataType

  • prettyGameDataType(type: GameDataType): "generic data" | "rpc" | "spawn" | "despawn" | "scene change" | "ready" | "change settings"
  • Convert a game data type to a human-readable string.

    Parameters

    Returns "generic data" | "rpc" | "spawn" | "despawn" | "scene change" | "ready" | "change settings"

Const prettyPayloadType

  • Convert a payload type to a human-readable string.

    Parameters

    Returns string

Const prettyPlayerColor

  • prettyPlayerColor(color: PlayerColor): "red" | "blue" | "dark green" | "pink" | "orange" | "yellow" | "black" | "white" | "purple" | "brown" | "cyan" | "lime"
  • Convert a player color to a human-readable string.

    Parameters

    Returns "red" | "blue" | "dark green" | "pink" | "orange" | "yellow" | "black" | "white" | "purple" | "brown" | "cyan" | "lime"

Const prettyRPCFlag

  • prettyRPCFlag(type: RPCFlag): "PlayAnimation" | "CompleteTask" | "SyncSettings" | "SetInfected" | "Exiled" | "CheckName" | "SetName" | "CheckColor" | "SetColor" | "SetHat" | "SetSkin" | "ReportDeadBody" | "MurderPlayer" | "SendChat" | "StartMeeting" | "SetScanner" | "SendChatNote" | "SetPet" | "SetStartCounter" | "EnterVent" | "ExitVent" | "SnapTo" | "Close" | "VotingComplete" | "CastVote" | "ClearVote" | "AddVote" | "CloseDoorsOfType" | "RepairSystem" | "SetTasks" | "UpdateGameData"
  • Convert an RPC flag to a human-readable string

    Parameters

    Returns "PlayAnimation" | "CompleteTask" | "SyncSettings" | "SetInfected" | "Exiled" | "CheckName" | "SetName" | "CheckColor" | "SetColor" | "SetHat" | "SetSkin" | "ReportDeadBody" | "MurderPlayer" | "SendChat" | "StartMeeting" | "SetScanner" | "SendChatNote" | "SetPet" | "SetStartCounter" | "EnterVent" | "ExitVent" | "SnapTo" | "Close" | "VotingComplete" | "CastVote" | "ClearVote" | "AddVote" | "CloseDoorsOfType" | "RepairSystem" | "SetTasks" | "UpdateGameData"

Const prettyTaskType

  • prettyTaskType(type: TaskType): "Submit Scan" | "Prime Shields" | "Fuel Engines" | "Chart Course" | "Start Reactor" | "Swipe Card" | "Clear Asteroids" | "Upload Data" | "Inspect Sample" | "Empty Chute" | "Empty Garbage" | "Align Engine Output" | "Fix Wiring" | "Calibrate Distributor" | "Divert Power" | "Unlock Manifolds" | "Reset Reactor" | "Fix Lights" | "Clean O2 Filter" | "Fix Comms" | "Restore Oxygen" | "Stabilize Steering" | "Assemble Artifact" | "Sort Samples" | "Measure Weather" | "Enter Id Code"
  • Convert a task type to a human-readable string as seen in the task list in the game.

    Parameters

    Returns "Submit Scan" | "Prime Shields" | "Fuel Engines" | "Chart Course" | "Start Reactor" | "Swipe Card" | "Clear Asteroids" | "Upload Data" | "Inspect Sample" | "Empty Chute" | "Empty Garbage" | "Align Engine Output" | "Fix Wiring" | "Calibrate Distributor" | "Divert Power" | "Unlock Manifolds" | "Reset Reactor" | "Fix Lights" | "Clean O2 Filter" | "Fix Comms" | "Restore Oxygen" | "Stabilize Steering" | "Assemble Artifact" | "Sort Samples" | "Measure Weather" | "Enter Id Code"

Object literals

Const matchmakingServers

matchmakingServers: object

Known matchmaking servers by region.

ASIA

ASIA: string[] = ['172.104.96.99', '139.162.111.196', '172.104.96.99']

EU

EU: string[] = ['172.105.249.25', '172.105.251.170']

NA

NA: string[] = ['50.116.1.42','45.79.5.6','104.237.135.186','198.58.99.71','45.79.67.124','45.79.40.75','45.79.67.124','198.58.115.57']

Generated using TypeDoc