Instantiates a new Archipelago client. After creating, call Client.login to connect and authenticate to a server.
Optionaloptions: ClientOptionsAdditional configuration options for this client. See ClientOptions for more information.
ReadonlydeathA helper object for handling DeathLink mechanics.
ReadonlyitemsA helper object for handling received items and hints.
ReadonlymessagesA helper object for handling chat messages.
Current options for this client.
ReadonlypackageA helper object for handling game data packages.
ReadonlyplayersA helper object for handling players (including self).
ReadonlyroomA helper object for handling room state.
ReadonlysocketA helper object for handling websocket communication and AP network protocol.
ReadonlystorageA helper object for handling the data storage API.
Returns a copy of this client's current connection arguments (or defaults, if never connected).
Returns true if currently connected and authenticated to the Archipelago server.
Returns the client's current game name (or an empty string, if never connected).
Returns the client's current slot name (or an empty string, if never connected).
Send a bounce packet targeting any clients that fulfil any target parameters. Can be listened for by listening to "bounced" events on SocketManager.
The targets to receive this bounce packet.
Optionalgames?: string[]Specific games that should receive this bounce.
Optionalslots?: number[]Specific slots that should receive this bounce.
Optionaltags?: string[]Specific clients with these tags that should receive this bounce.
The json-serializable data to send.
Connect and authenticate to an Archipelago server.
If slot data is requested, this sets the type of the returning slot data.
The url of the server, including the protocol (e.g., wss://archipelago.gg:38281).
The slot name this client will be connecting to.
The game name this client will be connecting to. If omitted, client will connect in "TextOnly" mode.
Optionaloptions: ConnectionOptionsAdditional optional connection arguments.
If the port is omitted, the client will default to 38281 (AP default).
If the protocol is omitted, client will attempt to connect via wss, then fallback to ws if unsuccessful.
Any paths, queries, fragments, or userinfo components of the provided url will be ignored.
import { Client } from "archipelago.js";
const client = new Client();
await client.login("wss://archipelago.gg:38281", "Phar", "Clique", {
slotData: false,
password: "4444"
});
import { Client } from "archipelago.js";
interface CliqueSlotData {
color: string
hard_mode: boolean
}
const client = new Client();
// slotData: CliqueSlotData { color: "red", hard_mode: false }
const slotData = await client.login<CliqueSlotData>("wss://archipelago.gg:38281", "Phar", "Clique");
Scout a list of locations for their containing items.
A list of location ids to scout.
Whether to create hints for these locations.
0, this packet will not create hints for any locations in this packet.1, this packet will create hints for all locations in this packet and broadcast them to all
relevant clients.2, this packet will create hints for all locations in this packet and broadcast only new hints to
all relevant clients.Update the client status for the current player. For a list of known client statuses, see clientStatuses.
The status to change to.
The server will automatically set the player's status to clientStatuses.disconnected when all clients connected to this slot have disconnected, set the status to clientStatuses.connected if a client connects to this slot when previously set to clientStatuses.disconnected, or ignores any future updates if ever set to clientStatuses.goal.
The client that connects to an Archipelago server and provides helper methods and objects to facilitate communication, listen for events, and manage data.