How often a FixedUpdate should be called.
Auth client responsible for getting an authentication token from the connected-to server.
The client ID of the client.
The code of the room.
The options for the client.
Whether or not the client is currently connected to a server.
The current start counter for the room.
Every end game intent that should happen in a queue to be or not to be canceled.
The first item of each element being the name of the end game intent and the second being metadata passed with it.
See RoomEndGameIntentEvent to cancel an end game intent, or see Hostable.registerEndGameIntent to register your own.
See RoomGameEndEvent to listen for a game actually ending.
An instance of the game data in the room. Contains information about players such as their name, colour, hat etc.
It is possible for more than one game data to be spawned, however this property is set and cleared for simplicity.
See Hostable.objectList if you're looking to find all game data objects that have been spawned.
The state that the game is currently in.
The ID of the host of the room.
Http matchmaker client responsible for retrieving information about games on the server to connect to.
Whether or not the client is identified with the connected server.
The IP of the server that the client is currently connected to.
An instance of the lobby behaviour in the room. Spawned when the room is currently in the lobby waiting for a game to start.
It is possible for more than one lobby behaviour to be spawned, however this property is set and cleared for simplicity.
See Hostable.objectList if you're looking to find all lobby behaviour objects that have been spawned.
An instance of the meeting hud in the room. Spawned when a meeting is started.
It is possible for more than one meeting hud to be spawned, however this property is set and cleared for simplicity.
See Hostable.objectList if you're looking to find all meeting hud objects that have been spawned.
The current message stream to be sent to the server on fixed update.
The networkable components in the room.
The next nonce that the client is expecting to receive from the server.
A list of all objects in the room.
An array of 8 of the most recent packets received from the server.
An array of 8 of the most recent packet sent by the client.
The players in the room.
The port of the server that the client is currently connected to.
The privacy state of the room.
A map of spawn type -> objects used in the protocol. Useful to register custom INO (inner net objects) such as replicating behaviour from a client mod, see Hostable.registerPrefab.
All roles that can be assigned to players. See Hostable.registerRole.
Whether or not the client has sent a disconnect packet.
The settings of the room.
An instance of the ship status in the room. Spawned when a game is started and represents the current map.
It is possible for more than one ship status to be spawned, however this property is set and cleared for simplicity.
See Hostable.objectList if you're looking to find all ship status objects that have been spawned.
The datagram socket for the client.
A map from nonce->message that were received from the server with an unexpected nonce (out of order).
The username of the client.
The version of the client.
An instance of the voting ban system in the room. Used as a utility object for handling kick and ban votes.
It is possible for more than one vote ban system to be spawned, however this property is set and cleared for simplicity.
See Hostable.objectList if you're looking to find all vote ban system objects that have been spawned.
Broadcast a message to a specific player or to all players in the game.
The gamedata messages to broadcast
Any payloads to send to the server (won't go to any recipients in particular)
Which players to include in the broadcast
Which players to exclude from the broadcast
Whether or not this message is reliable and should be acknowledged by the server
Whether or not this client/room is able to manage an object, i.e. perform host actions on it.
The object to manage.
Whether or not the object can be managed by this client/room.
Connect to a region or IP. Optionally identify with {@link SkeldsClient.username} (can be done later with the SkeldjsClient.identify method).
The hostname to connect to.
The port to connect to.
Create a fake player in the room that doesn't need a client to be connected to own it.
To dispose of the player, use player.despawn()
.
Whether or not the player should be seen jumping off of the seat in the lobby.
The fake player created.
Create a game with given settings.
The settings to create the game with.
Whether or not to join the game after created.
The game code of the room.
Despawn a component.
The component being despawned.
Disconnect from the server currently connected to.
Search for public games.
The maps of games to look for. If a number, it will be a bitfield of the maps, else, it will be an array of the maps.
The number of impostors to look for. 0 for any amount.
The language of the game to look for, use GameKeyword.All for any.
An array of game listings.
Get an available player ID.
The player ID that was found.
Get a player by one of their components' netIds.
The net ID of the component of the player to search.
The player that was found, or null if they do not exist.
Get a player by their player ID.
The player ID of the player.
The player that was found, or null if they do not exist.
Handle when the game is ended.
The reason for why the game ended.
Handle when a client joins the game.
Handle when a client leaves the game.
The client that left the game.
Handle a client readying up.
The client that readied.
Handle when the game is started.
Identify with the connected server. (Can be done before in the SkeldjsClient.connect method)
The username to identify with.
Join a room given the 4 or 6 digit code.
The code of the room to join.
Whether or not to spawn the player. If false, the client will be unaware of any existing objects in the game until SkeldjsClient.spawnSelf is called.
The code of the room joined.
Register an intent to end the game.
The intention to end the game.
Register a custom INO spawn object by its spawn type. Can also override built-in objects.
The spawn type of the component as an integer.
The components in the object. The first component should be the main object which will inherit the rest of the components.
Register a role that can be assigned to a player.
The role to register to the room.
Resolve a player by some identifier.
The identifier to resolve to a player.
The resolved player.
Resolve a client id by some identifier.
The identifier to resolve to a client ID.
The resolved client ID.
Resolve a player ID by some identifier.
The identifier to resolve to a player ID.
The resolved player ID.
Send a packet to the connected server.
Set the code of the room.
Set the host of the room. If the current client is the host, it will conduct required host changes. e.g. Spawning objects if they are not already spawned.
The new host of the room.
Change the the privacy of the room.
Change the settings of the room. If the host, it will broadcast these changes.
The settings to set to (Can be partial).
Spawn a component (Not broadcasted to all clients, see Hostable.spawnPrefabOfType).
The component being spawned.
Spawn a prefab of an object.
The type of object to spawn.
The object that was spawned.
Spawn your own player if doSpawn = false
was used in the SkeldjsClient.joinGame method.
Ask the server to start a game.
Create a new Skeldjs client instance.
The version of the client.
Additional client options.
The host of the room.
Generated using TypeDoc
Represents a programmable Among Us client.
See SkeldjsClientEvents for events to listen to.