diff --git a/CNAME b/CNAME deleted file mode 100644 index 698729d0..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -archipelago.js.org \ No newline at end of file diff --git a/docs/dev b/docs/dev index da0381c0..8cbc86f0 120000 --- a/docs/dev +++ b/docs/dev @@ -1 +1 @@ -v2.0.0-rc4 \ No newline at end of file +v2.0.0-rc5 \ No newline at end of file diff --git a/docs/stable b/docs/stable index 0408c30b..8cbc86f0 120000 --- a/docs/stable +++ b/docs/stable @@ -1 +1 @@ -v1.2.0 \ No newline at end of file +v2.0.0-rc5 \ No newline at end of file diff --git a/docs/v1.0.0/index.html b/docs/v1.0.0/index.html index 8cd9e59b..6b2334e6 100644 --- a/docs/v1.0.0/index.html +++ b/docs/v1.0.0/index.html @@ -6,10 +6,6 @@
--This is the developer documentation for the legacy 1.x branch, if you are looking for the developer documentation for -2.0.0, see these docs.
-
A general purpose library for communicating with Archipelago servers in Node.js or in the browser.
Archipelago.js is a JavaScript library that runs in Node or the browser that allows you to connect to an Archipelago server and communicate with it for your JavaScript-based games or tools. This guide will walk you through the process of diff --git a/docs/v1.1.0/index.html b/docs/v1.1.0/index.html index 1d24c7b7..30189a71 100644 --- a/docs/v1.1.0/index.html +++ b/docs/v1.1.0/index.html @@ -6,10 +6,6 @@
--This is the developer documentation for the legacy 1.x branch, if you are looking for the developer documentation for -2.0.0, see these docs.
-
A general purpose library for communicating with Archipelago servers in Node.js or in the browser.
You can install it from npm or use a CDN to use it in browser.
This is the developer documentation for the legacy 1.x branch, if you are looking for the developer documentation for -2.0.0, see these docs.
+2.0.0, see these docs.
A general purpose library for communicating with Archipelago servers in Node.js or in the browser.
You can install it from npm or use a CDN to use it in browser.
diff --git a/docs/v2.0 b/docs/v2.0 index da0381c0..8cbc86f0 120000 --- a/docs/v2.0 +++ b/docs/v2.0 @@ -1 +1 @@ -v2.0.0-rc4 \ No newline at end of file +v2.0.0-rc5 \ No newline at end of file diff --git a/docs/v2.0.0-rc5/assets/highlight.css b/docs/v2.0.0-rc5/assets/highlight.css new file mode 100644 index 00000000..ab73fb22 --- /dev/null +++ b/docs/v2.0.0-rc5/assets/highlight.css @@ -0,0 +1,106 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #008000; + --dark-hl-3: #6A9955; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #0000FF; + --dark-hl-6: #569CD6; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; + --light-hl-8: #000000FF; + --dark-hl-8: #D4D4D4; + --light-hl-9: #098658; + --dark-hl-9: #B5CEA8; + --light-hl-10: #0451A5; + --dark-hl-10: #9CDCFE; + --light-hl-11: #267F99; + --dark-hl-11: #4EC9B0; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +pre, code { background: var(--code-background); } diff --git a/docs/v2.0.0-rc5/assets/icons.js b/docs/v2.0.0-rc5/assets/icons.js new file mode 100644 index 00000000..3dfbd322 --- /dev/null +++ b/docs/v2.0.0-rc5/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `Instantiates a new Archipelago client. After creating, call Client.login to connect and authenticate to +a server.
+Optional
options: ClientOptionsAdditional configuration options for this client. See ClientOptions for more information.
+Readonly
deathA helper object for handling DeathLink mechanics.
+Readonly
itemsA helper object for handling received items and hints.
+Readonly
messagesA helper object for handling chat messages.
+Current options for this client.
+Readonly
packageA helper object for handling game data packages.
+Readonly
playersA helper object for handling players (including self).
+Readonly
roomA helper object for handling room state.
+Readonly
socketA helper object for handling websocket communication and AP network protocol.
+Readonly
storageA 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.
+Optional
games?: string[]Specific games that should receive this bounce.
+Optional
slots?: number[]Specific slots that should receive this bounce.
+Optional
tags?: 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.
+Optional
options: 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.
+Managers data packages metadata and exposes name lookup methods.
+Export a DataPackage object for local caching purposes.
+It is recommended to export/import any data packages ahead of time to reduce unnecessary calls to +DataPackageManager.fetchPackage and reduce connection startup time and lighten network overhead. See +below for an example.
+import fs from "node:fs";
import { Client } from "archipelago.js";
// ... misc client code (connecting and fetching data package).
// Save data package to a local file.
const data = client.package.exportPackage();
fs.writeFileSync("path/to/cache/datapackage_cache.json", JSON.stringify(data), "utf8");
+
+
+Fetches and returns the DataPackage from the server, if the games are not locally cached or checksums +do not match.
+A list of game packages to fetch. If omitted, will fetch all available game packages from the +current room.
+If true
, after fetching the data package, any changes will automatically be updated without
+needing to manually call DataPackageManager.importPackage.
Returns the package metadata helper object for a specified game. If game package does not exist in cache, returns
+null
instead.
The specific game package to look up.
+Import a DataPackage object to prepopulate local cache.
+The package to import.
+It is recommended to export/import any data packages ahead of time to reduce unnecessary calls to +DataPackageManager.fetchPackage and reduce connection startup time and lighten network overhead. See +below for an example.
+import fs from "node:fs";
import { Client } from "archipelago.js";
const data = fs.readFileSync("path/to/cache/datapackage_cache.json");
const client = new Client();
client.package.importPackage(JSON.parse(data));
await client.login("wss://archipelago.gg:38281", "Phar", "Clique");
+
+
+<script src="archipelago.js" type="module">
import { Client } from "archipelago.js";
const data = localStorage.getItem("datapackage_cache");
const client = new Client();
client.package.importPackage(JSON.parse(data));
await client.login("wss://archipelago.gg:38281", "Phar", "Clique");
</script>
+
+
+Lookup an item name by its integer id.
+The name of the game this item is associated with.
+The id of the item to name lookup.
+If true
, returns "Unknown Item {id}"
instead of undefined
, if id does not exist in package.
+Defaults to true
, if omitted.
Lookup an item name by its integer id.
+The name of the game this item is associated with.
+The id of the item to name lookup.
+If true
, returns "Unknown Item {id}"
instead of undefined
, if id does not exist in package.
+Defaults to true
, if omitted.
Lookup a location name by its integer id.
+The name of the game this location is associated with.
+The id of the location to name lookup.
+If true
, returns "Unknown Location {id}"
instead of undefined
, if id does not exist in
+package. Defaults to true
, if omitted.
Lookup a location name by its integer id.
+The name of the game this location is associated with.
+The id of the location to name lookup.
+If true
, returns "Unknown Location {id}"
instead of undefined
, if id does not exist in
+package. Defaults to true
, if omitted.
Manages communication between the data storage API and notifies subscribers of changes to storage updates.
+Returns a copy of all currently monitored keys.
+Fetches a list of key-value pairs from data storage.
+The expected key-value types to be returned.
+A list of keys to fetch values for.
+Optional
monitor: booleanAdds keys to local cache and request the server to update client when changes are made to speed up +subsequent lookups.
+An object containing all current values for each key requested.
+Fetches a single key-value pair from data storage.
+The expected value type to be returned.
+The key to fetch a value for.
+Optional
monitor: booleanAdds key to local cache and request the server to update client when changes are made to speed up +subsequent lookups.
+The current value for this key.
+Add a list of keys to be monitored for changes and fire a callback when changes are detected.
+A list of keys to fetch and watch for changes.
+A callback to fire whenever one of these keys change.
+An object containing all current values for each key requested.
+Create a new transaction for setting a data storage key by returning an IntermediateDataOperation. To
+perform certain operations, just chain additional methods until finished, then call prepare()
.
The key to manipulate.
+The default value to be used if key does not exist.
+Manages DeathLink mechanics for clients that choose to opt in to the mechanic.
+Returns true
if this client is participating in the DeathLink mechanic.
Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: DeathEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: DeathEvents[Event]This object.
+If DeathLink is enabled, sends a DeathLink to all DeathLink enabled players, otherwise this method does nothing.
+The name of the player who died. Can be a slot name, but could also be a name from within a +multiplayer game.
+Optional
cause: stringOptional text explaining the cause of death. When provided, this should include the player's name.
+(e.g., Phar drowned in a vat of kittens.
)
UnauthenticatedError If attempting to send a death link before authenticating to the server.
+DeathLinks sent from this client will not fire a DeathEvents.deathReceived event to avoid +an infinite feedback loop of deaths.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: DeathEvents[Event]Abstract
An abstract class for managers that offer an event-based API.
+Removes an existing event listener.
+This object.
+Add an event listener for a specific event.
+This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+An abstraction of NetworkHint that exposes additional helper methods and accessors received hint data.
+An intermediate abstract object holding an array of data storage operations to be performed in order by the server.
+The expected value type from this operation.
+Adds value
to the current value of the key, if both the current value and value
are arrays then value
will
+be appended to the current value.
A value for the operation to apply against the current data storage value.
+Applies a bitwise AND to the current value of the key with value
.
A value for the operation to apply against the current data storage value.
+Rounds up the current value to the nearest integer.
+Commit the current operations to data store and return a Promise with the updated key, once fulfilled.
+If true
, a promise will be returned with the new value. Otherwise, immediately resolves.
Commit the current operations to data store.
+If the key has no value yet, sets the current value of the key to default
.
Rounds down the current value to the nearest integer.
+Applies a bitwise left-shift to the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
if value
is bigger.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
if value
is bigger.
A value for the operation to apply against the current data storage value.
+Multiplies the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Applies a bitwise OR to the current value of the key with value.
+A value for the operation to apply against the current data storage value.
+List or Dict only: for lists
it will remove the index of the value
given. For dicts
it removes the element
+with the specified key of value
.
A value for the operation to apply against the current data storage value.
+Multiplies the current value of the key to the power of value
.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to the remainder after division by value
.
A value for the operation to apply against the current data storage value.
+List only: removes the first instance of value
found in the list.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
.
A value for the operation to apply against the current data storage value.
+Applies a bitwise right-shift to the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Dict only: Updates the dictionary with the specified elements given in value
creating new keys, or updating old
+ones if they previously existed.
A value for the operation to apply against the current data storage value.
+Applies a bitwise XOR to the current value of the key with value.
+A value for the operation to apply against the current data storage value.
+An abstraction of NetworkItem that exposes additional helper methods and accessors for this item data.
+Returns true
if this item has no special flags.
Returns the item classification bitflags for this item.
+Returns the game name for this item.
+Returns the integer id of this item.
+Returns the game name for the location this item was contained.
+Returns the id of the location where this item was contained.
+Returns the name of the location where this item was contained.
+Returns the name of this item.
+Returns true
if this item is flagged as progression.
Returns true
if this item is flagged as a trap.
Returns true
if this item is flagged as useful.
Manages tracking and receiving of all received items and hints.
+Return the number of items received.
+Returns a copy of all hints for this player.
+Hints may take a moment to populate after establishing connection to server, as it needs to wait for +data storage to fetch all current hints. If you need hints right after connecting, listen for the +ItemEvents.hintsInitialized event.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: ItemEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: ItemEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: ItemEvents[Event]Manages and stores PrintJSONPacket messages, notifies subscribers of new messages, and exposes helper methods +to interact with the chat system.
+Returns all current chat messages that are logged.
+If the messages length is greater than ClientOptions.maximumMessages, the oldest messages are spliced +out.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: MessageEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: MessageEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: MessageEvents[Event]An abstraction of a GamePackage object which includes additional helper methods for interacting with a game's +package.
+Readonly
checksumThe SHA256 hexadecimal string representation of this game package.
+Readonly
gameThe name of the game this game package is for.
+Readonly
itemA record of names to ids for all items in this game package.
+Readonly
locationA record of names to ids for all locations in this game package.
+Readonly
reverseA record of ids to names for all items in this game package.
+Readonly
reverseA record of ids to names for all locations in this game package.
+Returns a network-safe GamePackage that can be cached and preloaded ahead of time to reduce network load.
+A collection of metadata and helper methods for interacting with a particular player.
+Returns the current nickname for this player or the slot name if not set.
+Returns the game this slot is playing.
+Returns the slot name for this player slot.
+Returns this slot's id.
+Returns the team id this player is a member of.
+Returns the type of slot this player is. See slotTypes for more information.
+Fetch this player's slot data over the network.
+The type of the slot data that is returned, for better typing information.
+Returns this slot's current status. See clientStatuses for more information.
+Manages tracking and updating all players in the room session.
+Returns a record of basic information for each slot.
+Slot information is shared across each team. For accessing player data, see PlayersManager.
+Attempt to find a player by their team or slot name.
+The team id associated with the searched player.
+The slot id associated with the searched player.
+The player's metadata or undefined
if not found.
Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: PlayerEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: PlayerEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: PlayerEvents[Event]Managers room state information, notifies subscribers of changes, and exposes helper methods for interacting with the +room.
+Returns a list of all location ids for this slot.
+Returns a list of location ids that have been checked.
+Returns the list of games present in the current room.
+Returns the version of Archipelago the seed was generated from.
+Returns the amount of hint points this player needs to request a hint.
+Returns the percentage of locations that need to be checked to have enough points to hint from the server.
+Returns the amount of hint points this player currently has.
+Returns the amount of hint points received per location checked.
+Returns a list of location ids that have not been checked.
+Returns true
if the room requires a password to join.
Returns the current room's command permission bitflags.
+Experimental
Returns if this seed was generated with race mode enabled (to be used to obscure unnecessary details to make +clients race legal depending on rules).
+Get the seed name for this room.
+Returns the version of Archipelago the server is currently running.
+Returns a list of tags the server is currently capable of.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: RoomStateEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: RoomStateEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: RoomStateEvents[Event]Manages socket-level communication and exposes helper methods/events for interacting with the Archipelago API +directly.
+Returns true
if currently connected to a websocket server.
Returns the current connection's URL or an empty string, if not connected.
+Establish a connection to an Archipelago server before authenticating; useful if there might be tasked that are +needed to be performed before authenticating, but after connecting (e.g., DataPackage).
+The url of the server, including the protocol (e.g., wss://archipelago.gg:38281
).
The RoomInfoPacket received on initial connection.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: SocketEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: SocketEvents[Event]This object.
+Send a list of raw client packets to the server.
+Rest
...packets: ClientPacket[]List of client packets to send.
+This SocketManager.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: SocketEvents[Event]The client that connects to an Archipelago server and provides helper methods and objects to facilitate +communication, listen for events, and manage data.
+Instantiates a new Archipelago client. After creating, call Client.login to connect and authenticate to +a server.
+Optional
options: ClientOptionsAdditional configuration options for this client. See ClientOptions for more information.
+Readonly
deathA helper object for handling DeathLink mechanics.
+Readonly
itemsA helper object for handling received items and hints.
+Readonly
messagesA helper object for handling chat messages.
+Current options for this client.
+Readonly
packageA helper object for handling game data packages.
+Readonly
playersA helper object for handling players (including self).
+Readonly
roomA helper object for handling room state.
+Readonly
socketA helper object for handling websocket communication and AP network protocol.
+Readonly
storageA 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.
+Optional
games?: string[]Specific games that should receive this bounce.
+Optional
slots?: number[]Specific slots that should receive this bounce.
+Optional
tags?: 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.
+Optional
options: 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.
+Managers data packages metadata and exposes name lookup methods.
+Export a DataPackage object for local caching purposes.
+It is recommended to export/import any data packages ahead of time to reduce unnecessary calls to +DataPackageManager.fetchPackage and reduce connection startup time and lighten network overhead. See +below for an example.
+import fs from "node:fs";
import { Client } from "archipelago.js";
// ... misc client code (connecting and fetching data package).
// Save data package to a local file.
const data = client.package.exportPackage();
fs.writeFileSync("path/to/cache/datapackage_cache.json", JSON.stringify(data), "utf8");
+
+
+Fetches and returns the DataPackage from the server, if the games are not locally cached or checksums +do not match.
+A list of game packages to fetch. If omitted, will fetch all available game packages from the +current room.
+If true
, after fetching the data package, any changes will automatically be updated without
+needing to manually call DataPackageManager.importPackage.
Returns the package metadata helper object for a specified game. If game package does not exist in cache, returns
+null
instead.
The specific game package to look up.
+Import a DataPackage object to prepopulate local cache.
+The package to import.
+It is recommended to export/import any data packages ahead of time to reduce unnecessary calls to +DataPackageManager.fetchPackage and reduce connection startup time and lighten network overhead. See +below for an example.
+import fs from "node:fs";
import { Client } from "archipelago.js";
const data = fs.readFileSync("path/to/cache/datapackage_cache.json");
const client = new Client();
client.package.importPackage(JSON.parse(data));
await client.login("wss://archipelago.gg:38281", "Phar", "Clique");
+
+
+<script src="archipelago.js" type="module">
import { Client } from "archipelago.js";
const data = localStorage.getItem("datapackage_cache");
const client = new Client();
client.package.importPackage(JSON.parse(data));
await client.login("wss://archipelago.gg:38281", "Phar", "Clique");
</script>
+
+
+Lookup an item name by its integer id.
+The name of the game this item is associated with.
+The id of the item to name lookup.
+If true
, returns "Unknown Item {id}"
instead of undefined
, if id does not exist in package.
+Defaults to true
, if omitted.
Lookup an item name by its integer id.
+The name of the game this item is associated with.
+The id of the item to name lookup.
+If true
, returns "Unknown Item {id}"
instead of undefined
, if id does not exist in package.
+Defaults to true
, if omitted.
Lookup a location name by its integer id.
+The name of the game this location is associated with.
+The id of the location to name lookup.
+If true
, returns "Unknown Location {id}"
instead of undefined
, if id does not exist in
+package. Defaults to true
, if omitted.
Lookup a location name by its integer id.
+The name of the game this location is associated with.
+The id of the location to name lookup.
+If true
, returns "Unknown Location {id}"
instead of undefined
, if id does not exist in
+package. Defaults to true
, if omitted.
Manages communication between the data storage API and notifies subscribers of changes to storage updates.
+Returns a copy of all currently monitored keys.
+Fetches a list of key-value pairs from data storage.
+The expected key-value types to be returned.
+A list of keys to fetch values for.
+Optional
monitor: booleanAdds keys to local cache and request the server to update client when changes are made to speed up +subsequent lookups.
+An object containing all current values for each key requested.
+Fetches a single key-value pair from data storage.
+The expected value type to be returned.
+The key to fetch a value for.
+Optional
monitor: booleanAdds key to local cache and request the server to update client when changes are made to speed up +subsequent lookups.
+The current value for this key.
+Add a list of keys to be monitored for changes and fire a callback when changes are detected.
+A list of keys to fetch and watch for changes.
+A callback to fire whenever one of these keys change.
+An object containing all current values for each key requested.
+Create a new transaction for setting a data storage key by returning an IntermediateDataOperation. To
+perform certain operations, just chain additional methods until finished, then call prepare()
.
The key to manipulate.
+The default value to be used if key does not exist.
+Manages DeathLink mechanics for clients that choose to opt in to the mechanic.
+Returns true
if this client is participating in the DeathLink mechanic.
Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: DeathEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: DeathEvents[Event]This object.
+If DeathLink is enabled, sends a DeathLink to all DeathLink enabled players, otherwise this method does nothing.
+The name of the player who died. Can be a slot name, but could also be a name from within a +multiplayer game.
+Optional
cause: stringOptional text explaining the cause of death. When provided, this should include the player's name.
+(e.g., Phar drowned in a vat of kittens.
)
UnauthenticatedError If attempting to send a death link before authenticating to the server.
+DeathLinks sent from this client will not fire a DeathEvents.deathReceived event to avoid +an infinite feedback loop of deaths.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: DeathEvents[Event]Abstract
An abstract class for managers that offer an event-based API.
+Removes an existing event listener.
+This object.
+Add an event listener for a specific event.
+This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+An abstraction of NetworkHint that exposes additional helper methods and accessors received hint data.
+An intermediate abstract object holding an array of data storage operations to be performed in order by the server.
+The expected value type from this operation.
+Adds value
to the current value of the key, if both the current value and value
are arrays then value
will
+be appended to the current value.
A value for the operation to apply against the current data storage value.
+Applies a bitwise AND to the current value of the key with value
.
A value for the operation to apply against the current data storage value.
+Rounds up the current value to the nearest integer.
+Commit the current operations to data store and return a Promise with the updated key, once fulfilled.
+If true
, a promise will be returned with the new value. Otherwise, immediately resolves.
Commit the current operations to data store.
+If the key has no value yet, sets the current value of the key to default
.
Rounds down the current value to the nearest integer.
+Applies a bitwise left-shift to the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
if value
is bigger.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
if value
is bigger.
A value for the operation to apply against the current data storage value.
+Multiplies the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Applies a bitwise OR to the current value of the key with value.
+A value for the operation to apply against the current data storage value.
+List or Dict only: for lists
it will remove the index of the value
given. For dicts
it removes the element
+with the specified key of value
.
A value for the operation to apply against the current data storage value.
+Multiplies the current value of the key to the power of value
.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to the remainder after division by value
.
A value for the operation to apply against the current data storage value.
+List only: removes the first instance of value
found in the list.
A value for the operation to apply against the current data storage value.
+Sets the current value of the key to value
.
A value for the operation to apply against the current data storage value.
+Applies a bitwise right-shift to the current value of the key by value
.
A value for the operation to apply against the current data storage value.
+Dict only: Updates the dictionary with the specified elements given in value
creating new keys, or updating old
+ones if they previously existed.
A value for the operation to apply against the current data storage value.
+Applies a bitwise XOR to the current value of the key with value.
+A value for the operation to apply against the current data storage value.
+An abstraction of NetworkItem that exposes additional helper methods and accessors for this item data.
+Returns true
if this item has no special flags.
Returns the item classification bitflags for this item.
+Returns the game name for this item.
+Returns the integer id of this item.
+Returns the game name for the location this item was contained.
+Returns the id of the location where this item was contained.
+Returns the name of the location where this item was contained.
+Returns the name of this item.
+Returns true
if this item is flagged as progression.
Returns true
if this item is flagged as a trap.
Returns true
if this item is flagged as useful.
Manages tracking and receiving of all received items and hints.
+Return the number of items received.
+Returns a copy of all hints for this player.
+Hints may take a moment to populate after establishing connection to server, as it needs to wait for +data storage to fetch all current hints. If you need hints right after connecting, listen for the +ItemEvents.hintsInitialized event.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: ItemEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: ItemEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: ItemEvents[Event]Manages and stores PrintJSONPacket messages, notifies subscribers of new messages, and exposes helper methods +to interact with the chat system.
+Returns all current chat messages that are logged.
+If the messages length is greater than ClientOptions.maximumMessages, the oldest messages are spliced +out.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: MessageEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: MessageEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: MessageEvents[Event]An abstraction of a GamePackage object which includes additional helper methods for interacting with a game's +package.
+Readonly
checksumThe SHA256 hexadecimal string representation of this game package.
+Readonly
gameThe name of the game this game package is for.
+Readonly
itemA record of names to ids for all items in this game package.
+Readonly
locationA record of names to ids for all locations in this game package.
+Readonly
reverseA record of ids to names for all items in this game package.
+Readonly
reverseA record of ids to names for all locations in this game package.
+Returns a network-safe GamePackage that can be cached and preloaded ahead of time to reduce network load.
+A collection of metadata and helper methods for interacting with a particular player.
+Returns the current nickname for this player or the slot name if not set.
+Returns the game this slot is playing.
+Returns the slot name for this player slot.
+Returns this slot's id.
+Returns the team id this player is a member of.
+Returns the type of slot this player is. See slotTypes for more information.
+Fetch this player's slot data over the network.
+The type of the slot data that is returned, for better typing information.
+Returns this slot's current status. See clientStatuses for more information.
+Manages tracking and updating all players in the room session.
+Returns a record of basic information for each slot.
+Slot information is shared across each team. For accessing player data, see PlayersManager.
+Attempt to find a player by their team or slot name.
+The team id associated with the searched player.
+The slot id associated with the searched player.
+The player's metadata or undefined
if not found.
Removes an existing event listener.
+This object.
+Add an event listener for a specific event.
+This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: PlayerEvents[Event]Managers room state information, notifies subscribers of changes, and exposes helper methods for interacting with the +room.
+Returns a list of all location ids for this slot.
+Returns a list of location ids that have been checked.
+Returns the list of games present in the current room.
+Returns the version of Archipelago the seed was generated from.
+Returns the amount of hint points this player needs to request a hint.
+Returns the percentage of locations that need to be checked to have enough points to hint from the server.
+Returns the amount of hint points this player currently has.
+Returns the amount of hint points received per location checked.
+Returns a list of location ids that have not been checked.
+Returns true
if the room requires a password to join.
Returns the current room's command permission bitflags.
+Experimental
Returns if this seed was generated with race mode enabled (to be used to obscure unnecessary details to make +clients race legal depending on rules).
+Get the seed name for this room.
+Returns the version of Archipelago the server is currently running.
+Returns a list of tags the server is currently capable of.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: RoomStateEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: RoomStateEvents[Event]This object.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: RoomStateEvents[Event]Manages socket-level communication and exposes helper methods/events for interacting with the Archipelago API +directly.
+Returns true
if currently connected to a websocket server.
Returns the current connection's URL or an empty string, if not connected.
+Establish a connection to an Archipelago server before authenticating; useful if there might be tasked that are +needed to be performed before authenticating, but after connecting (e.g., DataPackage).
+The url of the server, including the protocol (e.g., wss://archipelago.gg:38281
).
The RoomInfoPacket received on initial connection.
+Removes an existing event listener.
+The event name associated with this listener to remove.
+The callback function to remove.
+Rest
...args: SocketEvents[Event]This object.
+Add an event listener for a specific event.
+The event name to listen for.
+The callback function to fire when this event is received.
+Rest
...args: SocketEvents[Event]This object.
+Send a list of raw client packets to the server.
+Rest
...packets: ClientPacket[]List of client packets to send.
+This SocketManager.
+Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments +dispatched with the event.
+The event name to listen for.
+An optional predicate to check on incoming events to validate if the correct event has +been received. If omitted, will return immediately on next event type received.
+Rest
...args: SocketEvents[Event]Before we begin, make sure you fulfil the following prerequisites:
+To start a new project with archipelago.js, you'll need to set up a project directory.
+If you're using a runtime like Node, you can install archipelago.js by running the following command in your
+project directory: npm install archipelago.js
, then following the rest of this tutorial.
If you're looking to run this in a web browser without packaging as a part of a tool like vite or webpack, you
+can add a <script type="module">
tag to your HTML to write your JavaScript in and replace any mention of
import { /* ... */ } from "archipelago.js";
+
+
+to
+import { /* ... */ } from "https://unpkg.com/archipelago.js/dist/archipelago.min.js";
// or any other path to archipelago.js as desired
+
+
+as appropriate for your project and all the code examples will still work.
+To create a basic client that can listen for chat messages and print them to the console, you can use the following +example:
+import { Client } from "archipelago.js";
// Create a new instance of the Client class.
const client = new Client();
// Setup a listener for incoming chat messages and print them to the console.
client.messages
.on("chatMessage", (message, _, sender) => {
console.log(`${sender}: ${message}`);
});
// Connect to the Archipelago server (replace url, slot name, and game as appropriate for your scenario).
await client.login("wss://archipelago.gg:38281", "Phar", "Clique");
// Send a message after connecting.
client.messages.say("Hello, multiworld!")
+
+
+Then, run this in your runtime of choice and see incoming messages print to console and your "Hello, multiworld!" +message get broadcast to all clients (and back to yourself).
+You can also listen for events, such as when your client receives items from the server:
+// Setup a listener for whenever items are received and log the details.
client.items
.on("itemsReceived", (items) => {
for (const item of items) {
console.log(`Received item ${item} from player ${item.sender}.`);
}
});
// ... misc client code below ...
+
+
+Or if another player changes their alias:
+// Setup a listener for when a player's alias (name) changes.
client.players
.on("aliasUpdated", (_, oldAlias, newAlias) => {
console.log(`${oldAlias} has changed their alias to ${newAlias}.`);
});
// ... misc client code below ...
+
+
+Or if you're using the DeathLink mechanic and another player dies:
+// Setup a listener for when another DeathLink player dies.
client.deathLink
.on("deathReceived", (source, time, cause) => {
if (cause) {
console.log(`DeathLink received from ${source}: ${cause}`);
return;
}
// No cause was supplied.
console.log(`DeathLink received from ${source}!`);
});
// ... misc client code below ...
+
+
+You can also inform the server of actions you take as a client, such as checking locations:
+// Mark a list of location ids as checked.
client.check(1001, 1002, 1003);
+
+
+Updating keys in the data storage:
+// Add 1 to a data storage key.
client.storage
.prepare("my_key", 0) /* 0 is the default if the key doesn't exist yet. */
.add(1)
.commit() // Commit changes.
+
+
+Or sending your own DeathLinks to other players if you die.
+// Send a DeathLink to all DeathLink enabled players.
client.deathLink.sendDeathLink("Phar", "Phar spontanously combusted after pressing a large red button.");
+
+
+Congratulations! You are now a client developer and hopefully got a taste of what this library is capable of. For more +information, check out the rest of the API documentation for archipelago.js (Client might be a good one to start +with) and explore the available features.
+If you encounter any issues or have any questions, you can reach out on the GitHub repository for support, or in the +Archipelago Discord, specifically in this +thread once you've joined. Thanks for checking +out my little pet project for Archipelago!
++ + + +
+A runtime-agnostic and zero dependency TypeScript/JavaScript library for communicating with Archipelago servers.
+Targeted to work on all major desktop and mobile browsers (Firefox, +Chromium, and Safari) and server-side runtimes such as +Node.js, Bun, and Deno.
+Install via npm install archipelago.js
(or via your preferred package manager's flavor).
Check out the quick start documentation here!
+The full API documentation is located here. Please be sure to reference it +while you are developing your JavaScript-based clients.
+This library supports 100% of the Archipelago network protocol referenced +here as of 2024-11-03 +(0.5.1 RC1). See more information about Archipelago at their website.
+Archipelago.js is built using TypeScript and the Bun bundler. You can set up your development environment by cloning +this repository to a desired location on your computer and installing its devDependencies.
+git clone https://github.com/ThePhar/archipelago.js
cd archipelago.js
npm install # or pnpm install
+
+
+Then to build, have Bun installed and run npm run build
(or pnpm build
).
Archipelago.js is written in TypeScript and includes a strong ESLint config file to ensure code consistency. Be sure
+to follow the code standards of this repository and check your work with npm run lint
.
Currently, there are no automated tests for this library, so all testing in browser, Node, Deno, and Bun are done +manually. This is certainly one area that can be expanded upon.
+Alternatively, expanding upon the documentation (either through the JSDoc or tutorial-like guides) would be appreciated.
+Sent to relevant clients to broadcast the result of an admin command.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to be broadcast from the server to all connected clients that match any one of the filter +arguments.
+Readonly
cmdReadonly
dataAny data you want to send.
+Optional
Readonly
gamesOptional. Games that should receive this message.
+Optional
Readonly
slotsOptional. Player ids that should receive this message.
+Optional
Readonly
tagsOptional. Client tags that should receive this message.
+Sent to clients after a client requested this message be sent to them, more info in the BouncePacket.
+Readonly
cmdReadonly
dataA verbatim copy of the data in the BouncePacket package.
+Optional
Readonly
gamesOptional. Game names this message is targeting.
+Optional
Readonly
slotsOptional. Player slot IDs that this message is targeting.
+Optional
Readonly
tagsOptional. Client tags this message is targeting.
+Sent to clients to broadcast a normal chat message.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
messageOriginal chat message without sender prefix.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has collected all their remaining items from the multi-world.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast the result of a chat command.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to authenticate a connection to an Archipelago session.
+Readonly
cmdReadonly
gameThe name of the game the client is playing.
+Readonly
items_Bit flags configuring which items should be sent by the server. See itemsHandlingFlags for information +on individual flags.
+Readonly
nameThe slot name for this client.
+Readonly
passwordIf the game session requires a password, it should be passed here.
+Readonly
slot_If true
, the ConnectedPacket will contain slot data.
Readonly
tagsDenotes special features or capabilities that the sender is currently capable of.
+Readonly
uuidUnique identifier for player client.
+Readonly
versionAn object representing the minimum Archipelago server version this client supports.
+Update arguments from the Connect packet, currently only updating tags
and items_handling
is supported.
Readonly
cmdReadonly
items_Bit flags configuring which items should be sent by the server. See itemsHandlingFlags for additional +information.
+Readonly
tagsDenotes special features or capabilities that the sender is currently capable of.
+Sent to clients when the connection handshake is successfully completed.
+Readonly
checked_Contains integer ids of all locations that have been checked. Useful for trackers, among other things. Location +ids are valid in the range of -2^53^ to +(2^53)-1 (inclusive), with negative values and zero reserved for +Archipelago.
+Readonly
cmdReadonly
hint_Number of hint points that the current player has.
+Readonly
missing_Contains integer ids of remaining locations that need to be checked. Useful for trackers, among other things.
+Readonly
playersList denoting other players in the multi-world, whether connected or not.
+Readonly
slotYour slot number on your team. See NetworkPlayer for more info on the slot number.
+Readonly
slot_Contains an object of slot related data, which differs per slot. If slot data was not requested in the +ConnectPacket, this value be an empty object.
+Readonly
slot_Object of each slot with their NetworkSlot information.
+Readonly
teamYour team number. See NetworkPlayer for more info on team number.
+Sent to clients when the server refuses connection. This is sent during the initial connection handshake.
+Readonly
cmdOptional
Readonly
errorsOptional. When provided, should contain one or more ConnectionError values. See ConnectionError +for additional information on what each error means.
+Sent to clients to broadcast a countdown message, usually for counting down the start of a game.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
countdownAmount of seconds remaining on the countdown.
+Readonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to provide what is known as a 'data package' which contains information to enable a client to most +easily communicate with the Archipelago server. Contents include things like location id to name mappings, among +others; see DataPackage for more info.
+Readonly
cmdReadonly
dataThe data package as an object of DataPackage.
+Sent by the client to request the data package from the server. Does not require client authentication.
+Sent by the client to request a single or multiple values from the server's data storage, see the SetPacket +for how to write values to the data storage. A GetPacket will be answered with a RetrievedPacket.
+Additional properties sent in this package will also be added to the RetrievedPacket it triggers.
+Some special read-only keys exist with specific return data:
+_read_hints_{team}_{slot}
: NetworkHint[] - All hinted NetworkHint items relevant to the requested
+player._read_slot_data_{slot}
: JSONSerializable - slot_data
belonging to the requested slot._read_item_name_groups_{game}
: Record<string, string[]>
- An object of item groups and their members._read_location_name_groups_{game}
: Record<string, string[]>
- An object of location groups and their
+members._read_client_status_{team}_{slot}
: number
- The current status for the requested player. See
+clientStatuses for all known client statues._read_race_mode
: number
- Returns 0
if race mode is disabled, 1
if it's enabled.Additional arguments to be returned in RetrievedPacket.
+Sent to clients to broadcast a player has met their goal condition.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast item hint information.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
foundWhether the location hinted for was checked.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients if the server caught a problem with a given packet's arguments.
+InvalidPacketPacket for all possible InvalidPacket
packet subtypes.
Sent to clients if the server caught a problem with a given packet's cmd
property.
InvalidPacketPacket for all possible InvalidPacket
packet subtypes.
Sent to clients to broadcast a player has received a cheated item (via !getitem
).
PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has received an item.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a client has connected.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
tagsTags of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to inform the server of locations that the client has checked. Used to inform the server of new +checks that are made, as well as to sync state.
+Sent to clients to acknowledge a received LocationScoutsPacket and responds with the item in each location +being scouted.
+Sent by the client to inform the server of locations the client has seen, but not checked. Useful in cases in which +the item may appear in the game world, but may not be immediately gettable. The server will always respond with a +LocationInfoPacket with the items located in the scouted location.
+Readonly
cmdReadonly
create_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.Readonly
locationsThe ids of the locations seen by the client. May contain any number of locations, even ones sent before; +duplicates do not cause issues with the Archipelago server.
+Sent to clients to broadcast a client has disconnected.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has released all remaining items in their world.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients as a response to a GetPacket.
+Additional arguments added to the GetPacket that triggered this RetrievedPacket will also be passed +along.
+Additional arguments that were passed in from GetPacket.
+Readonly
cmdReadonly
keysA key-value collection containing all the values for the keys requested in the GetPacket.
+Sent to clients when they connect to an Archipelago server, but before they authenticate.
+Readonly
cmdReadonly
datapackage_Checksum hash of the individual games' data packages the server will send. Used by newer clients to decide which +games' caches are outdated. See DataPackage for more information on the data package.
+Readonly
gamesList of games present in this multi-world.
+Readonly
generator_Object denoting the version of Archipelago which generated the multi-world.
+Readonly
hint_The amount of points it costs to receive a hint from the server.
+Readonly
location_The amount of hint points you receive per item/location check completed.
+Readonly
passwordDenoted whether a password is required to join this room.
+Readonly
permissionsMapping of restrict-able commands to their current PermissionValue level.
+Readonly
seed_Uniquely identifying name for this generation. Based on the seed
, but not identical to prevent spoilers.
Readonly
tagsDenotes special features or capabilities that the sender is capable of. Example: WebHost
Readonly
timeUnix time stamp in seconds of "now". Sent for time synchronization if wanted for things like a DeathLink +BouncePacket.
+Readonly
versionObject denoting the version of Archipelago which the server is running.
+Sent when there is a need to update information about the present game session. Generally useful for async games. +Once authenticated, this may also contain data from ConnectedPacket.
+All arguments for this packet are optional, only changes are sent.
+Optional
Readonly
checked_Might be a partial update, containing new locations that were checked, especially from a co-op partner in the +same slot.
+Readonly
cmdOptional
Readonly
hint_The amount of points it costs to receive a hint from the server.
+Optional
Readonly
hint_Number of hint points that the current player has.
+Optional
Readonly
location_The amount of hint points you receive per item/location check completed.
+Optional
Readonly
passwordDenoted whether a password is required to join this room.
+Readonly
permissionsMapping of restrict-able commands to their current PermissionValue level.
+Optional
Readonly
playersInformation on the players, whether connected or not.
+Optional
Readonly
tagsDenotes special features or capabilities that the sender is capable of. Example: WebHost
Optional
Readonly
timeUnix time stamp of "now". Send for time synchronization if wanted for things like a DeathLink +BouncePacket.
+Sent to clients to broadcast a server-side chat message.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
messageOriginal chat message without sender prefix.
+Readonly
typeThe PrintJSONPacket subtype.
+Used to register your current session for receiving all SetReplyPackets of certain keys to allow your client +to keep track of changes.
+Readonly
cmdReadonly
keysKeys to receive all SetReplyPackets for.
+Sent by the client to write data to the server's data storage, that data can then be shared across worlds or just +saved for later. Values for keys in the data storage can be retrieved with a GetPacket, or monitored with a +SetNotifyPacket.
+Additional arguments sent in this package will also be added to the SetReplyPacket it triggers.
+Additional arguments to be returned in SetReplyPacket.
+Readonly
cmdReadonly
defaultThe default value to use in case the key has no value on the server.
+Readonly
keyThe key to manipulate.
+Readonly
operationsOperations to apply to the value, multiple operations can be present, and they will be executed in order of +appearance. See DataStorageOperation for information on supported operations.
+Readonly
want_If set, the server will send a SetReplyPacket back to the client.
+Sent to clients in response to a SetPacket if want_reply
was set to true, or if the client has registered
+to receive updates for a certain key using the SetNotifyPacket. SetReplyPackets are sent even if a
+SetPacket package did not alter the value for the key.
Additional arguments added to the SetPacket that triggered this SetReplyPacket will also be passed +along.
+Additional arguments that were passed in from SetPacket.
+Sent to the server to update on the client's status. Examples include readiness or goal completion.
+Readonly
cmdReadonly
statusThe new client status value to set this slot to. See clientStatuses for all known values.
+This packet is ignored if the client status was set to clientStatuses.goal.
+Sent to server to request a ReceivedItemsPacket with all items ever received.
+Sent to clients to broadcast a client has changed their tags.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
tagsTags of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast tutorial information, usually on first connection.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+An interface of client options that can be set on a Client object.
+Optional
autoAutomatically requests the DataPackage from the server during Client.login, if the packages are missing +in the DataPackageManager.
+If enabled, logs the game, library version, and user agent to data storage, which can be used for debugging +purposes.
+Optional
maximumDetermines the maximum number of chat messages to log in MessageManager.
+Optional
timeoutThe maximum number of milliseconds to wait for a response from the server when awaiting a response to a client +packet.
+An interface of additional connection arguments when authenticating to an Archipelago server.
+Optional
itemsDetermines the kinds of received item events the server will broadcast to this client when locations are checked.
+Value is an integer bitflag combination of values that is documented in itemsHandlingFlags.
+Optional
Readonly
passwordThe room password, if the server requires a password to join. Otherwise, optional.
+Optional
Readonly
slotRequest this slot's data during connection. If false
, server will respond with an empty object ({}
) instead.
Optional
tagsA list of strings that denote special features or capabilities this sender is currently capable of. A list of +common tags is documented here:
+https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/network%20protocol.md#tags.
+Optional
Readonly
uuidA unique identifier for this client.
+Not currently used for anything server side, but may change or be deprecated in a future Archipelago update.
+Optional
Readonly
versionThe version of Archipelago this client was designed for. This can be enforced on the server side to force a user +to update their client, if a new version was released.
+Readonly
build: numberThe build version component.
+Readonly
major: numberThe major version component.
+Readonly
minor: numberThe minor version component.
+Sent to relevant clients to broadcast the result of an admin command.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to be broadcast from the server to all connected clients that match any one of the filter +arguments.
+Readonly
cmdReadonly
dataAny data you want to send.
+Optional
Readonly
gamesOptional. Games that should receive this message.
+Optional
Readonly
slotsOptional. Player ids that should receive this message.
+Optional
Readonly
tagsOptional. Client tags that should receive this message.
+Sent to clients after a client requested this message be sent to them, more info in the BouncePacket.
+Readonly
cmdReadonly
dataA verbatim copy of the data in the BouncePacket package.
+Optional
Readonly
gamesOptional. Game names this message is targeting.
+Optional
Readonly
slotsOptional. Player slot IDs that this message is targeting.
+Optional
Readonly
tagsOptional. Client tags this message is targeting.
+Sent to clients to broadcast a normal chat message.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
messageOriginal chat message without sender prefix.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has collected all their remaining items from the multi-world.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast the result of a chat command.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to authenticate a connection to an Archipelago session.
+Readonly
cmdReadonly
gameThe name of the game the client is playing.
+Readonly
items_Bit flags configuring which items should be sent by the server. See itemsHandlingFlags for information +on individual flags.
+Readonly
nameThe slot name for this client.
+Readonly
passwordIf the game session requires a password, it should be passed here.
+Readonly
slot_If true
, the ConnectedPacket will contain slot data.
Readonly
tagsDenotes special features or capabilities that the sender is currently capable of.
+Readonly
uuidUnique identifier for player client.
+Readonly
versionAn object representing the minimum Archipelago server version this client supports.
+Update arguments from the Connect packet, currently only updating tags
and items_handling
is supported.
Readonly
cmdReadonly
items_Bit flags configuring which items should be sent by the server. See itemsHandlingFlags for additional +information.
+Readonly
tagsDenotes special features or capabilities that the sender is currently capable of.
+Sent to clients when the connection handshake is successfully completed.
+Readonly
checked_Contains integer ids of all locations that have been checked. Useful for trackers, among other things. Location +ids are valid in the range of -2^53^ to +(2^53)-1 (inclusive), with negative values and zero reserved for +Archipelago.
+Readonly
cmdReadonly
hint_Number of hint points that the current player has.
+Readonly
missing_Contains integer ids of remaining locations that need to be checked. Useful for trackers, among other things.
+Readonly
playersList denoting other players in the multi-world, whether connected or not.
+Readonly
slotYour slot number on your team. See NetworkPlayer for more info on the slot number.
+Readonly
slot_Contains an object of slot related data, which differs per slot. If slot data was not requested in the +ConnectPacket, this value be an empty object.
+Readonly
slot_Object of each slot with their NetworkSlot information.
+Readonly
teamYour team number. See NetworkPlayer for more info on team number.
+Sent to clients when the server refuses connection. This is sent during the initial connection handshake.
+Readonly
cmdOptional
Readonly
errorsOptional. When provided, should contain one or more ConnectionError values. See ConnectionError +for additional information on what each error means.
+Sent to clients to broadcast a countdown message, usually for counting down the start of a game.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
countdownAmount of seconds remaining on the countdown.
+Readonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to provide what is known as a 'data package' which contains information to enable a client to most +easily communicate with the Archipelago server. Contents include things like location id to name mappings, among +others; see DataPackage for more info.
+Readonly
cmdReadonly
dataThe data package as an object of DataPackage.
+Sent by the client to request the data package from the server. Does not require client authentication.
+Sent by the client to request a single or multiple values from the server's data storage, see the SetPacket +for how to write values to the data storage. A GetPacket will be answered with a RetrievedPacket.
+Additional properties sent in this package will also be added to the RetrievedPacket it triggers.
+Some special read-only keys exist with specific return data:
+_read_hints_{team}_{slot}
: NetworkHint[] - All hinted NetworkHint items relevant to the requested
+player._read_slot_data_{slot}
: JSONSerializable - slot_data
belonging to the requested slot._read_item_name_groups_{game}
: Record<string, string[]>
- An object of item groups and their members._read_location_name_groups_{game}
: Record<string, string[]>
- An object of location groups and their
+members._read_client_status_{team}_{slot}
: number
- The current status for the requested player. See
+clientStatuses for all known client statues._read_race_mode
: number
- Returns 0
if race mode is disabled, 1
if it's enabled.Additional arguments to be returned in RetrievedPacket.
+Sent to clients to broadcast a player has met their goal condition.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast item hint information.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
foundWhether the location hinted for was checked.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients if the server caught a problem with a given packet's arguments.
+InvalidPacketPacket for all possible InvalidPacket
packet subtypes.
Sent to clients if the server caught a problem with a given packet's cmd
property.
InvalidPacketPacket for all possible InvalidPacket
packet subtypes.
Sent to clients to broadcast a player has received a cheated item (via !getitem
).
PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has received an item.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
itemSource player's identifier, location identifier, item identifier and item flags.
+Readonly
receivingDestination player's identifier.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a client has connected.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
tagsTags of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent by the client to inform the server of locations that the client has checked. Used to inform the server of new +checks that are made, as well as to sync state.
+Sent to clients to acknowledge a received LocationScoutsPacket and responds with the item in each location +being scouted.
+Sent by the client to inform the server of locations the client has seen, but not checked. Useful in cases in which +the item may appear in the game world, but may not be immediately gettable. The server will always respond with a +LocationInfoPacket with the items located in the scouted location.
+Readonly
cmdReadonly
create_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.Readonly
locationsThe ids of the locations seen by the client. May contain any number of locations, even ones sent before; +duplicates do not cause issues with the Archipelago server.
+Sent to clients to broadcast a client has disconnected.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients to broadcast a player has released all remaining items in their world.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to clients as a response to a GetPacket.
+Additional arguments added to the GetPacket that triggered this RetrievedPacket will also be passed +along.
+Additional arguments that were passed in from GetPacket.
+Readonly
cmdReadonly
keysA key-value collection containing all the values for the keys requested in the GetPacket.
+Sent to clients when they connect to an Archipelago server, but before they authenticate.
+Readonly
cmdReadonly
datapackage_Checksum hash of the individual games' data packages the server will send. Used by newer clients to decide which +games' caches are outdated. See DataPackage for more information on the data package.
+Readonly
gamesList of games present in this multi-world.
+Readonly
generator_Object denoting the version of Archipelago which generated the multi-world.
+Readonly
hint_The amount of points it costs to receive a hint from the server.
+Readonly
location_The amount of hint points you receive per item/location check completed.
+Readonly
passwordDenoted whether a password is required to join this room.
+Readonly
permissionsMapping of restrict-able commands to their current PermissionValue level.
+Readonly
seed_Uniquely identifying name for this generation. Based on the seed
, but not identical to prevent spoilers.
Readonly
tagsDenotes special features or capabilities that the sender is capable of. Example: WebHost
Readonly
timeUnix time stamp in seconds of "now". Sent for time synchronization if wanted for things like a DeathLink +BouncePacket.
+Readonly
versionObject denoting the version of Archipelago which the server is running.
+Sent when there is a need to update information about the present game session. Generally useful for async games. +Once authenticated, this may also contain data from ConnectedPacket.
+All arguments for this packet are optional, only changes are sent.
+Optional
Readonly
checked_Might be a partial update, containing new locations that were checked, especially from a co-op partner in the +same slot.
+Readonly
cmdOptional
Readonly
hint_The amount of points it costs to receive a hint from the server.
+Optional
Readonly
hint_Number of hint points that the current player has.
+Optional
Readonly
location_The amount of hint points you receive per item/location check completed.
+Optional
Readonly
passwordDenoted whether a password is required to join this room.
+Readonly
permissionsMapping of restrict-able commands to their current PermissionValue level.
+Optional
Readonly
playersInformation on the players, whether connected or not.
+Optional
Readonly
tagsDenotes special features or capabilities that the sender is capable of. Example: WebHost
Optional
Readonly
timeUnix time stamp of "now". Send for time synchronization if wanted for things like a DeathLink +BouncePacket.
+Sent to clients to broadcast a server-side chat message.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
messageOriginal chat message without sender prefix.
+Readonly
typeThe PrintJSONPacket subtype.
+Used to register your current session for receiving all SetReplyPackets of certain keys to allow your client +to keep track of changes.
+Readonly
cmdReadonly
keysKeys to receive all SetReplyPackets for.
+Sent by the client to write data to the server's data storage, that data can then be shared across worlds or just +saved for later. Values for keys in the data storage can be retrieved with a GetPacket, or monitored with a +SetNotifyPacket.
+Additional arguments sent in this package will also be added to the SetReplyPacket it triggers.
+Additional arguments to be returned in SetReplyPacket.
+Readonly
cmdReadonly
defaultThe default value to use in case the key has no value on the server.
+Readonly
keyThe key to manipulate.
+Readonly
operationsOperations to apply to the value, multiple operations can be present, and they will be executed in order of +appearance. See DataStorageOperation for information on supported operations.
+Readonly
want_If set, the server will send a SetReplyPacket back to the client.
+Sent to clients in response to a SetPacket if want_reply
was set to true, or if the client has registered
+to receive updates for a certain key using the SetNotifyPacket. SetReplyPackets are sent even if a
+SetPacket package did not alter the value for the key.
Additional arguments added to the SetPacket that triggered this SetReplyPacket will also be passed +along.
+Additional arguments that were passed in from SetPacket.
+Sent to the server to update on the client's status. Examples include readiness or goal completion.
+Readonly
cmdReadonly
statusThe new client status value to set this slot to. See clientStatuses for all known values.
+This packet is ignored if the client status was set to clientStatuses.goal.
+Sent to server to request a ReceivedItemsPacket with all items ever received.
+Sent to clients to broadcast a client has changed their tags.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
slotSlot of the triggering player.
+Readonly
tagsTags of the triggering player.
+Readonly
teamTeam of the triggering player.
+Readonly
typeThe PrintJSONPacket subtype.
+Sent to relevant clients to broadcast tutorial information, usually on first connection.
+PrintJSONPacket for all possible PrintJSON
packet subtypes.
Readonly
cmdReadonly
dataAll the textual metadata for this packet.
+Readonly
typeThe PrintJSONPacket subtype.
+An interface of client options that can be set on a Client object.
+Optional
autoAutomatically requests the DataPackage from the server during Client.login, if the packages are missing +in the DataPackageManager.
+If enabled, logs the game, library version, and user agent to data storage, which can be used for debugging +purposes.
+Optional
maximumDetermines the maximum number of chat messages to log in MessageManager.
+Optional
timeoutThe maximum number of milliseconds to wait for a response from the server when awaiting a response to a client +packet.
+An interface of additional connection arguments when authenticating to an Archipelago server.
+Optional
itemsDetermines the kinds of received item events the server will broadcast to this client when locations are checked.
+Value is an integer bitflag combination of values that is documented in itemsHandlingFlags.
+Optional
Readonly
passwordThe room password, if the server requires a password to join. Otherwise, optional.
+Optional
Readonly
slotRequest this slot's data during connection. If false
, server will respond with an empty object ({}
) instead.
Optional
tagsA list of strings that denote special features or capabilities this sender is currently capable of. A list of +common tags is documented here:
+https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/network%20protocol.md#tags.
+Optional
Readonly
uuidA unique identifier for this client.
+Not currently used for anything server side, but may change or be deprecated in a future Archipelago update.
+Optional
Readonly
versionThe version of Archipelago this client was designed for. This can be enforced on the server side to force a user +to update their client, if a new version was released.
+Readonly
build: numberThe build version component.
+Readonly
major: numberThe major version component.
+Readonly
minor: numberThe minor version component.
+A collection of types, constants, and enumerations that get passed over the Archipelago network protocol.
+You can read more information about the Network Protocol in the Archipelago +Network Protocol +documentation on their GitHub repository. +API
+A collection of types, constants, and enumerations that get passed over the Archipelago network protocol.
+You can read more information about the Network Protocol in the Archipelago +Network Protocol +documentation on their GitHub repository. +API
+Adds value
to the current value of the key, if both the current value and value
are arrays then value
will be
+appended to the current value.
Readonly
operation: "add"Readonly
value: number | JSONSerializable[]A value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Applies a bitwise AND to the current value of the key with value
.
Readonly
operation: "and"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Rounds up the current value to the nearest integer.
+Readonly
operation: "ceil"Readonly
value: nullIgnored for this operation.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing color metadata.
+Readonly
color: ValidJSONColorTypeIncludes the color to print this text with.
+Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "color"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+A union of known errors the Archipelago server can send back to the client when they receive a +ConnectionRefusedPacket.
+A DataPackage is an object which contains arbitrary metadata about each game to enable a client to interact +with the Archipelago server easily.
+Note:
+name
is unique to its type across its own Game only: Single Arrow can exist in two games.id
s from the game Archipelago
may be used in any other game. Especially Location ID -1
: Cheat Console
+and -2
: Server
(typically Remote Start Inventory).Readonly
games: Record<string, GamePackage>Mapping of all Games and their respective data. See GamePackage for additional info.
+A union of all possible DataStorages. An operation manipulates or alters the value of a key in the data +storage. If the operation transforms the value from one state to another then the current value of the key is used +as the starting point otherwise the SetPacket's default is used if the key does not exist on the server +already.
+Each operation object consists of an object containing both the operation to be applied, provided in the form of a
+string
, and the value
to be used for that operation,
If the key has no value yet, sets the current value of the key to default
of the SetPacket's (value
is
+ignored).
Readonly
operation: "default"Readonly
value: nullA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Rounds down the current value to the nearest integer.
+Readonly
operation: "floor"Readonly
value: nullIgnored for this operation.
+DataStorageOperation for all possible operation subtypes.
+Collection of data that contains meta information for a particular game.
+Readonly
checksum: stringSHA1 checksum of this game's data.
+Readonly
item_Mapping of all item names to their respective id.
+Readonly
location_Mapping of all location names to their respective id.
+A union of possible InvalidPacket
packets. Sent to clients if the server caught a problem with a packet. See each
+packet subtype for more details.
A textual node containing item metadata.
+Readonly
flags: numberBit flags that determine if an item is progression, "nice to have", filler, or a trap.
+Readonly
player: numberThe id
of the player who owns this item.
Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "item_id" | "item_name"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+A union of all message node subtypes sent along with PrintJSONPacket, which can be reconstructed into a +legible message. Each node is intended to be read in the order provided in the packet.
+A record of JSON-serializable data.
+A type union of all basic JSON-compatible types.
+Applies a bitwise left-shift to the current value of the key by value
.
Readonly
operation: "left_shift"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing location metadata.
+Readonly
player: numberThe id
of the player who has this location.
Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "location_id" | "location_name"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+Sets the current value of the key to value
if value
is bigger.
Readonly
operation: "max"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to value
if value
is lower.
Readonly
operation: "min"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to the remainder after division by value
.
Readonly
operation: "mod"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Multiplies the current value of the key by value
.
Readonly
operation: "mul"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+An object representing a hint information for a particular item and location that contains it.
+Readonly
entrance: stringThe name of the entrance to the location where this item is located.
+Readonly
finding_The id of the player who has this item in their world.
+Readonly
found: booleanWhether this item has already been found.
+Readonly
item: numberThe id of this item.
+Readonly
item_The classification bit flags for this item. See itemsHandlingFlags for known flags.
+Readonly
location: numberThe id of the location for this item.
+Readonly
receiving_The id of the player who owns this item.
+Items that are sent over the network.
+Readonly
flags: numberThe classification bit flags for this item. See itemsHandlingFlags for known flags.
+Readonly
item: numberThe item id of the item. Item ids are in the range of -2^53 to +2^53-1.
+Readonly
location: numberThe location id of the location inside the world. Location ids are in the range of -2^53 to +2^53 - 1.
+Readonly
player: numberThe slot id for the player whose world the item was located in, except when inside a LocationInfoPacket, +then it will be the slot id of the player the item belongs to.
+An object that contains metadata about an individual player on the network.
+Readonly
alias: stringRepresents the player's name in current time. Can be changed during a game with the !alias <name>
command by
+the player.
Readonly
name: stringThe original slot name as defined by the player's configuration file. Individual names are unique among players.
+Readonly
slot: numberDetermines the slot id for this player. Slot numbers are unique per team and start at 1
. Slot number 0
refers
+to the Archipelago server; this may appear in instances where the server grants the player an item.
Readonly
team: numberDetermines the team the player is on. Useful for competitive seeds. Team numbers start at 0
.
An object representing metadata about a given slot on each team.
+Readonly
game: stringThe game this slot is playing.
+Readonly
group_Contains a list of player ids, if the type
is slotTypes.group. Used for item links, otherwise empty.
Readonly
name: stringThe original slot name as defined by the player's configuration file. Individual names are unique among players.
+Readonly
type: typeof slotTypes[keyof typeof slotTypes]The type of slot this is. See slotTypes for known slot types.
+An object representing software versioning. Used in the ConnectPacket to allow the client to inform the +server the minimum Archipelago version it supports.
+Readonly
build: numberThe build/patch component of the version number. (e.g., 0.0.X)
+Readonly
class: "Version"Apparently required to be present to ensure the Archipelago server parses this object correctly.
+Readonly
major: numberThe major component of the version number. (e.g., X.0.0)
+Readonly
minor: numberThe minor component of the version number. (e.g., 0.X.0)
+Applies a bitwise OR to the current value of the key with value.
+Readonly
operation: "or"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Mapping of restrict-able commands to their current permissions level.
+Readonly
collect: PermissionValueDictates what is allowed when it comes to a player collecting their run. A collect is an action which sends +the rest of the items in a player's run.
+!collect
at any time in the game.!collect
command once a player completes their
+goal (disabled until goal completion).Readonly
release: PermissionValueDictates what is allowed when it comes to a player releasing their run. A release is an action which +distributes the rest of the items in a player's run to those other players awaiting them.
+!release
at any time in the game.!release
command once a player completes their
+goal (disabled until goal completion).Readonly
remaining: Omit<PermissionValue, typeof auto | typeof autoEnabled>Dictates what is allowed when it comes to a player querying the items remaining in their run.
+This command cannot have the permissions.auto or permissions.autoEnabled permission.
+The type for a given permission value.
+List or Dict only: for lists
it will remove the index of the value
given. For dicts
it removes the element with
+the specified key of value
.
Readonly
operation: "pop"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Multiplies the current value of the key to the power of value
.
Readonly
operation: "pow"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A union of possible PrintJSON
packets. Sent to clients purely to display a message to the player. While various
+message types provide additional arguments, clients only need to evaluate the data
argument to construct the
+human-readable message text. All other arguments may be ignored safely.
A union of all known PrintJSONPacket types.
+List only: removes the first instance of value
found in the list.
Readonly
operation: "remove"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to value
.
Readonly
operation: "replace"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Applies a bitwise right-shift to the current value of the key by value
.
Readonly
operation: "right_shift"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing plaintext metadata.
+Readonly
text: stringUsed to supply text data for this node.
+Optional
Readonly
type?: Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+Dict only: Updates the dictionary with the specified elements given in value
creating new keys, or updating old
+ones if they previously existed.
Readonly
operation: "update"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+This is a type union of all supported "colors" denoting a console color to display the message part with and is only
+sent if the type
is color
. This is limited to console colors due to backwards compatibility needs with games such
+as A Link to the Past
. Although background colors as well as foreground colors are listed, only one may be applied
+to a JSONMessagePart at a time.
This is a type union of all supported message types for denoting the intent of the message part. This can be used to +indicate special information which may be rendered differently depending on client.
+text
: Regular text content. This is also the default type and is often omitted.player_id
: Player id of someone on your team, should be resolved to player Name.player_name
: Player Name, could be a player within a multiplayer game or from another team, not id resolvable.item_id
: Item id, should be resolved to an item name.item_name
: Item name, not currently used over network, but supported by reference clients.location_id
: Location id, should be resolved to a location name.location_name
: Location name, not currently used over network, but supported by reference clients.entrance_name
: Entrance name. No id mapping exists.color
: Regular text that should be colored. Only type that will contain color data.Applies a bitwise XOR to the current value of the key with value
.
Readonly
operation: "xor"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A type alias for any known client status. See clientStatuses for more information.
+A callback that fires when a monitored key is updated in data storage.
+An interface with all supported death events and their respective callback arguments. To be called from +MessageManager.
+Fired when a DeathLink-enabled player has sent a DeathLink.
+An interface with all supported item/hint events and their respective callback arguments. To be called from +ItemsManager.
+Fired when a hint has been found.
+Fired when a new hint has been received.
+Fired shortly after initial connection with all current hints relevant to this player.
+Fired when items have been received.
+The ItemsManager.received index for the first item in the items
array.
An interface with all supported message events and their respective callback arguments. To be called from +MessageManager.
+Fires when a player message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
Fires when a countdown message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
Fires when any message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
An interface with all supported room events and their respective callback arguments. To be called from +RoomStateManager.
+Fires when the hint cost has been updated.
+Fires when the player's hint points value has updated.
+Fires when the location check points have been updated.
+Fires when new locations have been checked (or all locations on initial connection).
+Fires when the room password has been toggled.
+Fires when command permissions have been updated.
+An interface with all supported socket events and their respective callback arguments. To be called from +SocketManager.
+Fires when the client receives a BouncedPacket.
+The raw BouncedPacket.
+Fires when the client receives a ConnectedPacket
+The raw ConnectedPacket packet.
+Fires when the client receives a ConnectionRefusedPacket.
+The raw ConnectionRefusedPacket.
+Fires when the client receives a DataPackagePacket.
+The raw DataPackagePacket.
+Fires when the client has lost connection to the server, intentionally or not.
+Fires when the client receives a InvalidPacketPacket.
+The raw InvalidPacketPacket.
+Fires when the client receives a LocationInfoPacket.
+The raw LocationInfoPacket.
+Fires when the client receives a PrintJSONPacket.
+The raw PrintJSONPacket packet.
+Fires when the client receives a ReceivedItemsPacket.
+The raw ReceivedItemsPacket.
+Fires when the client receives any ServerPacket.
+Any received ServerPacket. Additional checks on the cmd
property will be required to
+determine the type of packet received.
Fires when the client receives a RetrievedPacket.
+The raw RetrievedPacket.
+Fires when the client receives a RoomInfoPacket.
+The raw RoomInfoPacket.
+Fires when the client receives a RoomUpdatePacket.
+The raw RoomUpdatePacket.
+Fires when the client sends an array of ClientPacket.
+An array of ClientPacket sent to the server.
+Fires when the client receives a SetReplyPacket.
+The raw SetReplyPacket.
+Adds value
to the current value of the key, if both the current value and value
are arrays then value
will be
+appended to the current value.
Readonly
operation: "add"Readonly
value: number | JSONSerializable[]A value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Applies a bitwise AND to the current value of the key with value
.
Readonly
operation: "and"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Rounds up the current value to the nearest integer.
+Readonly
operation: "ceil"Readonly
value: nullIgnored for this operation.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing color metadata.
+Readonly
color: ValidJSONColorTypeIncludes the color to print this text with.
+Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "color"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+A union of known errors the Archipelago server can send back to the client when they receive a +ConnectionRefusedPacket.
+A DataPackage is an object which contains arbitrary metadata about each game to enable a client to interact +with the Archipelago server easily.
+Note:
+name
is unique to its type across its own Game only: Single Arrow can exist in two games.id
s from the game Archipelago
may be used in any other game. Especially Location ID -1
: Cheat Console
+and -2
: Server
(typically Remote Start Inventory).Readonly
games: Record<string, GamePackage>Mapping of all Games and their respective data. See GamePackage for additional info.
+A union of all possible DataStorages. An operation manipulates or alters the value of a key in the data +storage. If the operation transforms the value from one state to another then the current value of the key is used +as the starting point otherwise the SetPacket's default is used if the key does not exist on the server +already.
+Each operation object consists of an object containing both the operation to be applied, provided in the form of a
+string
, and the value
to be used for that operation,
If the key has no value yet, sets the current value of the key to default
of the SetPacket's (value
is
+ignored).
Readonly
operation: "default"Readonly
value: nullA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Rounds down the current value to the nearest integer.
+Readonly
operation: "floor"Readonly
value: nullIgnored for this operation.
+DataStorageOperation for all possible operation subtypes.
+Collection of data that contains meta information for a particular game.
+Readonly
checksum: stringSHA1 checksum of this game's data.
+Readonly
item_Mapping of all item names to their respective id.
+Readonly
location_Mapping of all location names to their respective id.
+A union of possible InvalidPacket
packets. Sent to clients if the server caught a problem with a packet. See each
+packet subtype for more details.
A textual node containing item metadata.
+Readonly
flags: numberBit flags that determine if an item is progression, "nice to have", filler, or a trap.
+Readonly
player: numberThe id
of the player who owns this item.
Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "item_id" | "item_name"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+A union of all message node subtypes sent along with PrintJSONPacket, which can be reconstructed into a +legible message. Each node is intended to be read in the order provided in the packet.
+A record of JSON-serializable data.
+A type union of all basic JSON-compatible types.
+Applies a bitwise left-shift to the current value of the key by value
.
Readonly
operation: "left_shift"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing location metadata.
+Readonly
player: numberThe id
of the player who has this location.
Readonly
text: stringUsed to supply text data for this node.
+Readonly
type: "location_id" | "location_name"Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+Sets the current value of the key to value
if value
is bigger.
Readonly
operation: "max"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to value
if value
is lower.
Readonly
operation: "min"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to the remainder after division by value
.
Readonly
operation: "mod"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Multiplies the current value of the key by value
.
Readonly
operation: "mul"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+An object representing a hint information for a particular item and location that contains it.
+Readonly
entrance: stringThe name of the entrance to the location where this item is located.
+Readonly
finding_The id of the player who has this item in their world.
+Readonly
found: booleanWhether this item has already been found.
+Readonly
item: numberThe id of this item.
+Readonly
item_The classification bit flags for this item. See itemsHandlingFlags for known flags.
+Readonly
location: numberThe id of the location for this item.
+Readonly
receiving_The id of the player who owns this item.
+Items that are sent over the network.
+Readonly
flags: numberThe classification bit flags for this item. See itemsHandlingFlags for known flags.
+Readonly
item: numberThe item id of the item. Item ids are in the range of -2^53 to +2^53-1.
+Readonly
location: numberThe location id of the location inside the world. Location ids are in the range of -2^53 to +2^53 - 1.
+Readonly
player: numberThe slot id for the player whose world the item was located in, except when inside a LocationInfoPacket, +then it will be the slot id of the player the item belongs to.
+An object that contains metadata about an individual player on the network.
+Readonly
alias: stringRepresents the player's name in current time. Can be changed during a game with the !alias <name>
command by
+the player.
Readonly
name: stringThe original slot name as defined by the player's configuration file. Individual names are unique among players.
+Readonly
slot: numberDetermines the slot id for this player. Slot numbers are unique per team and start at 1
. Slot number 0
refers
+to the Archipelago server; this may appear in instances where the server grants the player an item.
Readonly
team: numberDetermines the team the player is on. Useful for competitive seeds. Team numbers start at 0
.
An object representing metadata about a given slot on each team.
+Readonly
game: stringThe game this slot is playing.
+Readonly
group_Contains a list of player ids, if the type
is slotTypes.group. Used for item links, otherwise empty.
Readonly
name: stringThe original slot name as defined by the player's configuration file. Individual names are unique among players.
+Readonly
type: typeof slotTypes[keyof typeof slotTypes]The type of slot this is. See slotTypes for known slot types.
+An object representing software versioning. Used in the ConnectPacket to allow the client to inform the +server the minimum Archipelago version it supports.
+Readonly
build: numberThe build/patch component of the version number. (e.g., 0.0.X)
+Readonly
class: "Version"Apparently required to be present to ensure the Archipelago server parses this object correctly.
+Readonly
major: numberThe major component of the version number. (e.g., X.0.0)
+Readonly
minor: numberThe minor component of the version number. (e.g., 0.X.0)
+Applies a bitwise OR to the current value of the key with value.
+Readonly
operation: "or"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Mapping of restrict-able commands to their current permissions level.
+Readonly
collect: PermissionValueDictates what is allowed when it comes to a player collecting their run. A collect is an action which sends +the rest of the items in a player's run.
+!collect
at any time in the game.!collect
command once a player completes their
+goal (disabled until goal completion).Readonly
release: PermissionValueDictates what is allowed when it comes to a player releasing their run. A release is an action which +distributes the rest of the items in a player's run to those other players awaiting them.
+!release
at any time in the game.!release
command once a player completes their
+goal (disabled until goal completion).Readonly
remaining: Omit<PermissionValue, typeof auto | typeof autoEnabled>Dictates what is allowed when it comes to a player querying the items remaining in their run.
+This command cannot have the permissions.auto or permissions.autoEnabled permission.
+The type for a given permission value.
+List or Dict only: for lists
it will remove the index of the value
given. For dicts
it removes the element with
+the specified key of value
.
Readonly
operation: "pop"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Multiplies the current value of the key to the power of value
.
Readonly
operation: "pow"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A union of possible PrintJSON
packets. Sent to clients purely to display a message to the player. While various
+message types provide additional arguments, clients only need to evaluate the data
argument to construct the
+human-readable message text. All other arguments may be ignored safely.
A union of all known PrintJSONPacket types.
+List only: removes the first instance of value
found in the list.
Readonly
operation: "remove"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Sets the current value of the key to value
.
Readonly
operation: "replace"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+Applies a bitwise right-shift to the current value of the key by value
.
Readonly
operation: "right_shift"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A textual node containing plaintext metadata.
+Readonly
text: stringUsed to supply text data for this node.
+Optional
Readonly
type?: Used to denote the intent of the message part.
+JSONMessagePart for all possible message part node subtypes.
+Dict only: Updates the dictionary with the specified elements given in value
creating new keys, or updating old
+ones if they previously existed.
Readonly
operation: "update"Readonly
value: JSONSerializableA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+This is a type union of all supported "colors" denoting a console color to display the message part with and is only
+sent if the type
is color
. This is limited to console colors due to backwards compatibility needs with games such
+as A Link to the Past
. Although background colors as well as foreground colors are listed, only one may be applied
+to a JSONMessagePart at a time.
This is a type union of all supported message types for denoting the intent of the message part. This can be used to +indicate special information which may be rendered differently depending on client.
+text
: Regular text content. This is also the default type and is often omitted.player_id
: Player id of someone on your team, should be resolved to player Name.player_name
: Player Name, could be a player within a multiplayer game or from another team, not id resolvable.item_id
: Item id, should be resolved to an item name.item_name
: Item name, not currently used over network, but supported by reference clients.location_id
: Location id, should be resolved to a location name.location_name
: Location name, not currently used over network, but supported by reference clients.entrance_name
: Entrance name. No id mapping exists.color
: Regular text that should be colored. Only type that will contain color data.Applies a bitwise XOR to the current value of the key with value
.
Readonly
operation: "xor"Readonly
value: numberA value for the operation to apply against the current data storage value.
+DataStorageOperation for all possible operation subtypes.
+A type alias for any known client status. See clientStatuses for more information.
+A callback that fires when a monitored key is updated in data storage.
+An interface with all supported death events and their respective callback arguments. To be called from +MessageManager.
+Fired when a DeathLink-enabled player has sent a DeathLink.
+An interface with all supported item/hint events and their respective callback arguments. To be called from +ItemsManager.
+Fired when a hint has been found.
+Fired when a new hint has been received.
+Fired shortly after initial connection with all current hints relevant to this player.
+Fired when items have been received.
+The ItemsManager.received index for the first item in the items
array.
An interface with all supported message events and their respective callback arguments. To be called from +MessageManager.
+Fires when a player message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
Fires when a countdown message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
Fires when any message is received.
+The index of this message in MessageManager.messages, when this event was fired. If message
+logging is disabled, this will return -1
.
An interface with all supported room events and their respective callback arguments. To be called from +RoomStateManager.
+Fires when the hint cost has been updated.
+Fires when the player's hint points value has updated.
+Fires when the location check points have been updated.
+Fires when new locations have been checked (or all locations on initial connection).
+Fires when the room password has been toggled.
+Fires when command permissions have been updated.
+An interface with all supported socket events and their respective callback arguments. To be called from +SocketManager.
+Fires when the client receives a BouncedPacket.
+The raw BouncedPacket.
+Fires when the client receives a ConnectedPacket
+The raw ConnectedPacket packet.
+Fires when the client receives a ConnectionRefusedPacket.
+The raw ConnectionRefusedPacket.
+Fires when the client receives a DataPackagePacket.
+The raw DataPackagePacket.
+Fires when the client has lost connection to the server, intentionally or not.
+Fires when the client receives a InvalidPacketPacket.
+The raw InvalidPacketPacket.
+Fires when the client receives a LocationInfoPacket.
+The raw LocationInfoPacket.
+Fires when the client receives a PrintJSONPacket.
+The raw PrintJSONPacket packet.
+Fires when the client receives a ReceivedItemsPacket.
+The raw ReceivedItemsPacket.
+Fires when the client receives any ServerPacket.
+Any received ServerPacket. Additional checks on the cmd
property will be required to
+determine the type of packet received.
Fires when the client receives a RetrievedPacket.
+The raw RetrievedPacket.
+Fires when the client receives a RoomInfoPacket.
+The raw RoomInfoPacket.
+Fires when the client receives a RoomUpdatePacket.
+The raw RoomUpdatePacket.
+Fires when the client sends an array of ClientPacket.
+An array of ClientPacket sent to the server.
+Fires when the client receives a SetReplyPacket.
+The raw SetReplyPacket.
+Const
A const of known containing the possible client states that may be used to inform the server during a status update.
+Readonly
connected: 5Client is currently connected. This status is set automatically when a client connects.
+Readonly
disconnected: 0Client is in an unknown or disconnected state. This status is set automatically initially and when all connected +clients have disconnected from the server.
+Readonly
goal: 30Client has completed their goal. Once set, cannot be changed.
+Readonly
playing: 20Client is currently playing.
+Readonly
ready: 10Client is ready to start, but hasn't started playing yet.
+Const
Bit flags that define the special characteristics of a NetworkItem.
+Readonly
normal: 0A shorthand with no flags set, also known as 'filler' or 'junk' items.
+Readonly
progression: 1If set, indicates the item may unlock logical advancement.
+Readonly
trap: 4If set, indicates the item can inconvenience a player.
+Readonly
useful: 2If set, indicates the item is classified as useful to have.
+Const
Bit flags configuring which items should be sent by the server to this client.
+Readonly
all: 7Shorthand for REMOTE_DIFFERENT_WORLDS
, REMOTE_OWN_WORLD
, and REMOTE_STARTING_INVENTORY
.
Readonly
minimal: 0Indicates the client only receives items created by cheat commands.
+Readonly
others: 1Indicates the client get items sent from other worlds.
+Readonly
own: 2Indicates the client get items sent from your own world. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Readonly
starting: 4Indicates the client get your starting inventory sent. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Const
A const containing the possible command permissions, for commands that may be restricted.
+Readonly
auto: 6Forces players to use this command after they have completed their goal.
+Readonly
autoAllows players to use this command manually at any time and forces them to use this command after they have +completed their goal.
+Readonly
disabled: 0Prevents players from using this command at any time.
+Readonly
enabled: 1Allows players to use this command manually at any time.
+Readonly
goal: 2Allows players to use this command manually after they have completed their goal.
+Const
An enumeration representing the nature of the slot.
+Readonly
group: 2This client is an item links group containing at least 1 player with active item links.
+Readonly
player: 1This client is a player and is participating in the current game.
+Readonly
spectator: 0This client is a spectator and not participating in the current game.
+Const
A const of known containing the possible client states that may be used to inform the server during a status update.
+Readonly
connected: 5Client is currently connected. This status is set automatically when a client connects.
+Readonly
disconnected: 0Client is in an unknown or disconnected state. This status is set automatically initially and when all connected +clients have disconnected from the server.
+Readonly
goal: 30Client has completed their goal. Once set, cannot be changed.
+Readonly
playing: 20Client is currently playing.
+Readonly
ready: 10Client is ready to start, but hasn't started playing yet.
+Const
Bit flags that define the special characteristics of a NetworkItem.
+Readonly
normal: 0A shorthand with no flags set, also known as 'filler' or 'junk' items.
+Readonly
progression: 1If set, indicates the item may unlock logical advancement.
+Readonly
trap: 4If set, indicates the item can inconvenience a player.
+Readonly
useful: 2If set, indicates the item is classified as useful to have.
+Const
Bit flags configuring which items should be sent by the server to this client.
+Readonly
all: 7Shorthand for REMOTE_DIFFERENT_WORLDS
, REMOTE_OWN_WORLD
, and REMOTE_STARTING_INVENTORY
.
Readonly
minimal: 0Indicates the client only receives items created by cheat commands.
+Readonly
others: 1Indicates the client get items sent from other worlds.
+Readonly
own: 2Indicates the client get items sent from your own world. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Readonly
starting: 4Indicates the client get your starting inventory sent. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Const
A const containing the possible command permissions, for commands that may be restricted.
+Readonly
auto: 6Forces players to use this command after they have completed their goal.
+Readonly
autoAllows players to use this command manually at any time and forces them to use this command after they have +completed their goal.
+Readonly
disabled: 0Prevents players from using this command at any time.
+Readonly
enabled: 1Allows players to use this command manually at any time.
+Readonly
goal: 2Allows players to use this command manually after they have completed their goal.
+Const
An enumeration representing the nature of the slot.
+Readonly
group: 2This client is an item links group containing at least 1 player with active item links.
+Readonly
player: 1This client is a player and is participating in the current game.
+Readonly
spectator: 0This client is a spectator and not participating in the current game.
+Const
Const
Archipelago version this library attempts to target. Support for older versions of the Archipelago API is not +guaranteed and some newer enhancements may no longer work or be supported.
+Const
Const
Archipelago version this library attempts to target. Support for older versions of the Archipelago API is not +guaranteed and some newer enhancements may no longer work or be supported.
+
The client that connects to an Archipelago server and provides helper methods and objects to facilitate +communication, listen for events, and manage data.
+