Get the DataManager helper object. See DataManager for additional information.
-Get the HintsManager helper object. See HintsManager for additional information.
-Get the ItemsManager helper object. See ItemsManager for additional information.
-Get the LocationsManager helper object. See LocationsManager for additional information.
-Get the PlayersManager helper object. See PlayersManager for additional information.
-Get the current WebSocket connection status to the Archipelago server.
-Get the URI of the current connection, including protocol.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Add an eventListener to fire depending on an event from the Archipelago server or the client.
-The event to listen for.
-The listener callback function to run when an event is fired.
-Connects to the given address with given connection information.
-All the necessary connection information to connect to an Archipelago server.
-On successful connection and authentication to the room.
+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.
+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"
});
+
-If web socket connection failed to establish connection or server refused connection, promise will
-return a string[]
of error messages.
Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Remove an eventListener from this client's event emitter.
-The event to stop listening for.
-The listener callback function to remove.
-Send a list of raw packets to the Archipelago server in the order they are listed as arguments.
-Rest
...packets: ClientPacket[]An array of raw ClientPackets to send to the AP server. They are processed in -the order they are listed as arguments.
-Update the status for this client.
-The status code to send.
-Generated using TypeDoc
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.Request the server update the kinds of item received events this client should receive.
+New item handling flags. See API.itemsHandlingFlags for more information.
+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.
+Manages and watches for events regarding session data and the data package. Most other mangers use this information -to create helper functions and track other information.
-Creates a new DataManager and sets up events on the Client to listen for to start -updating its internal state.
-Returns an array of all games that exist in this room.
-Returns how many hint points a player needs to spend to receive a hint.
-Returns how many hint points a player has.
-Returns a map of all GamePackage mapped to their game name
.
Get the current permissions for the room.
-Return the seed for this room.
-Returns this player's slot. Returns -1
if player is not connected.
Returns the slot data for this game. Will be undefined
if no connection has been established.
Returns this player's team. Returns -1
if player is not connected.
Send a series of set operations to the server. Promise returns a SetReplyPacket if want_reply
was
-requested.
The set builder to do operations on the data storage.
-Generated using TypeDoc
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.
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 provided keys from data storage.
+A list of keys to be fetched.
+Adds keys to local cache and request the server to update client when changes are made to speed up +subsequent lookups. For one-off adhoc lookups, should be omitted.
+An object containing all current values for each key requested.
+Gets a single provided key from data storage.
+The keys to be fetched.
+Adds key to local cache and request the server to update client when changes are made to speed up +subsequent lookups. For one-off adhoc lookups, should be omitted.
+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.
)
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.
+Manages and watches for hint events to this player slot and provides helper functions to make working with hints -easier.
-Get all hints that are relevant for this slot.
-Generated using TypeDoc
Manages and watches for hint events to this player slot and provides helper functions to make working with hints -easier.
-Generated using TypeDoc
An intermediate abstract object holding an array of data storage operations to be performed in order by the server.
+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 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 and watches for events regarding item data and provides helper functions to make working with items easier.
-Creates a new ItemsManager and sets up events on the Client to listen for to start -updating its internal state.
-Returns the current item index. If this value is larger than expected, that means new items have been received.
-Returns an array of all items that have been received.
-Returns the name
of a given item id
.
The id
of the player this item belongs to.
The id
of this item.
Returns the name of the item or Unknown Item: <id>
if item or player is not in data.
Throws an error if player
or id
is not a safe integer.
Returns the name
of a given item id
.
The name
of the game this item belongs to.
The id
of this item.
Returns the name of the item or Unknown Item: <id>
if item or player is not in data.
Throws an error if id
is not a safe integer.
Generated using TypeDoc
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 watches for events regarding location data and provides helper functions to make checking, scouting, or -working with locations in general easier.
-Creates a new LocationsManager and sets up events on the Client to listen for to start -updating its internal state.
-An array of all checked locations.
-An array of all locations that are not checked.
-Returns the name
of a given location id
.
The id
of the player this location belongs to.
The id
of this location.
Returns the name of the location or Unknown Location: <id>
if location or player is not in data.
Throws an error if player
or id
is not a safe integer.
Returns the name
of a given location id
.
The name
of the game this location belongs to.
The id
of this location.
Returns the name of the location or Unknown Location: <id>
if location or player is not in data.
Throws an error if id
is not a safe integer.
Generated using TypeDoc
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.
+Returns this slot's current status. See clientStatuses for more information.
+Manages and watches for events regarding player data and provides helper functions to make working with players -easier.
-Creates a new PlayersManager and sets up events on the Client to listen for to start -updating its internal state.
-Returns the alias
of a given player id
. Returns "Unknown Player #" if player does not exist in the room.
Special cases:
-0
, returns Archipelago
.The slot id
of a player.
Throws an error if unable to find a player with the given id
.
Returns the name
of a given player id
. Returns "Unknown Player #" if player does not exist in the room.
Special cases:
-0
, returns Archipelago
.The slot id
of a player.
Throws an error if unable to find a player with the given id
.
Generated using TypeDoc
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]A helper class of data operations to perform server-side on a given key.
-Generated using TypeDoc
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]- - - -
-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.
-npm install archipelago.js
import { /* ... */ } from "https://unpkg.com/archipelago.js/dist/archipelago.min.js";
in a
-<script type="module"></script>
block.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 -setting up a client and connecting to an Archipelago server.
-Before you begin, make sure you have the following prerequisites:
-To start a new project with Archipelago.js follow these steps:
-npm install archipelago.js
.npm install -D typescript
..js
" with ".ts
" in this quick start guide.Follow the steps below to quickly set up a client and connect to an Archipelago server:
-client.js
in your project directory.client.js
file with your preferred code editor and add the following code:// ES module import, but you can use CommonJS syntax as well, if you prefer.
import { Client, ITEMS_HANDLING_FLAGS } from "archipelago.js";
// Create a new instance of the Client class.
const client = new Client();
// Set up the connection information.
const connectionInfo = {
hostname: "your-server-hostname", // Replace with the actual AP server hostname.
port: 38281, // Replace with the actual AP server port.
game: "your-game-name", // Replace with the game name for this player.
name: "your-player-name", // Replace with the player slot name.
items_handling: ITEMS_HANDLING_FLAGS.REMOTE_ALL,
};
// Connect to the Archipelago server
client
.connect(connectionInfo)
.then(() => {
console.log("Connected to the server");
// You are now connected and authenticated to the server. You can add more code here if need be.
})
.catch((error) => {
console.error("Failed to connect:", error);
// Handle the connection error.
});
-
-Make sure to replace "your-server-hostname", 38281, "your-game-name", "your-player-name", and set items_handling
with
-the appropriate values for your game and room.
Then just run your client script using node client.js
or if you're using TypeScript: npx ts-node client.ts
.
That's it! You have now set up a client and connected to an Archipelago server using archipelago.js. You can start -sending packets, handling server events, and building your multiplayer experience.
-Archipelago.js can also run in the browser. Here's an example that works in most major browsers:
-<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Archipelago.js Client Example</title>
</head>
<body>
<script type="module">
import {
Client,
ITEMS_HANDLING_FLAGS,
SERVER_PACKET_TYPE,
} from "https://unpkg.com/archipelago.js/dist/archipelago.min.js";
// Create a new Archipelago client
const client = new Client();
const connectionInfo = {
hostname: "your-server-hostname", // Replace with the actual AP server hostname.
port: 38281, // Replace with the actual AP server port.
game: "your-game-name", // Replace with the game name for this player.
name: "your-player-name", // Replace with the player slot name.
items_handling: ITEMS_HANDLING_FLAGS.REMOTE_ALL,
};
// Set up event listeners
client.addListener(SERVER_PACKET_TYPE.CONNECTED, (packet) => {
console.log("Connected to server: ", packet);
});
client.addListener(SERVER_PACKET_TYPE.ROOM_UPDATE, (packet) => {
console.log("Room update: ", packet);
});
// Connect to the Archipelago server
client
.connect(connectionInfo)
.then(() => {
console.log("Connected to the server");
// You are now connected and authenticated to the server. You can add more code here if need be.
})
.catch((error) => {
console.error("Failed to connect:", error);
// Handle the connection error.
});
// Disconnect from the server when unloading window.
window.addEventListener("beforeunload", () => {
client.disconnect();
});
</script>
</body>
</html>
-
-In this example, the Archipelago client is included as a script from the -https://unpkg.com/archipelago.js/dist/archipelago.min.js CDN. You can also use a locally hosted version of the library -if you prefer.
-You can listen for server events and handle them in your code. Here's an example of adding an event listener for the -"PrintJSON" event:
-import { /* ... */, SERVER_PACKET_TYPE } from "archipelago.js";
// Add an event listener for the PRINT_JSON event
client.addListener(SERVER_PACKET_TYPE.PRINT_JSON, (packet, message) => {
console.log("Received a PrintJSON: ", message);
// Add any additional logic here.
});
-
-You can also respond to the server at at time while you're connected. Here's a few examples of built-in events you can -send.
-Say: Use the say
method to send a normal chat message.
client.say("Hello, archipelago!");
-
-Update Status: Use the updateStatus
method to update your status from Ready to Playing or even Goal
-Complete, once your game has completed.
import { /* ... */, CLIENT_STATUS } from "archipelago.js";
// See documentation for all possible statuses.
client.updateStatus(CLIENT_STATUS.READY);
client.updateStatus(CLIENT_STATUS.PLAYING);
client.updateStatus(CLIENT_STATUS.GOAL);
-
-Send Raw Packets: You can also just send raw packets to the server if none of the built-in methods work for your -use cases. Be sure to add a listener for the response from the server though (see above)!
-import { /* ... */, CLIENT_PACKET_TYPE } from "archipelago.js";
const syncPacket = {
cmd: CLIENT_PACKET_TYPE.SYNC,
}
client.send(syncPacket);
-
-Player objects returned from PlayersManager
contain the following data and helper functions for easy item and location
-name lookups:
name
: The slot name for this player.alias
: The aliased name for this player.slot
: The slot number for this player.team
: The team number for this player.game
: The name of the game this player is playing.type
: Whether this player is a spectator, actual player, or item link group.group_members
: If this player is an item link group, this is the ids of all players that belong to this group.item(itemId)
: A function that returns the name for a given item id in the game of this player.const itemName = player.item(1000);
location(locationId)
: A function that returns the name for a given location id in the game of this player.const locationName = player.location(1000);
The LocationsManager
class in archipelago.js provides functionality for managing locations within the game. Here are
-some tips for working with the LocationsManager
:
Check Locations: Use the check
method to mark locations as found. Pass the location IDs as arguments to the
-method.
client.locations.check(locationId1, locationId2, locationId3);
-
-Scout Locations: Use the scout
method to scout locations without marking them as found. You can also create
-hints for these locations by passing the CREATE_AS_HINT_MODE
as the first argument followed by the location IDs.
client.locations.scout(CREATE_AS_HINT_MODE.NO_HINT, locationId1, locationId2, locationId3);
-
-Retrieve Location Name: Use the name
method to retrieve the name of a location based on its ID and game name.
-If the location or game is not found, it will return an "Unknown Location" string instead.
const locationName = client.locations.name("your-game-name", locationId);
-
-Retrieve Location Group: Use the group
method to retrieve an array of location names belonging to a specific
-group in a game. If the game or group is not found, it will return an empty array.
const locationGroup = client.locations.group("your-game-name", "group-name");
-
-Automatically Release All Locations: Use the autoRelease
method to send all missing locations as checked.
client.locations.autoRelease();
-
-The PlayersManager
class in archipelago.js provides functionality for managing and looking up player data within the
-game. Here are some helpful methods for working with the PlayersManager
:
Retrieve Player Name: Use the name
method to retrieve the name of a player based on their ID. If the player is
-not found, it will throw an error.
const playerName = client.players.name(playerId);
-
-Retrieve Player Alias: Use the alias
method to retrieve the alias of a player based on their ID. If the player
-is not found, it will throw an error.
const playerAlias = client.players.alias(playerId);
-
-Retrieve Player Game: Use the game
method to retrieve the game name of a player based on their ID. If the
-player is not found, it will throw an error.
const playerGame = client.players.game(playerId);
-
-Retrieve Group Members: Use the members
method to retrieve an array of player IDs belonging to an item links
-group. If the id is of someone who is not an item links group or the group is not found, it will return an empty
-array.
const groupMembers = client.players.members(groupId);
-
-Retrieve all Players: Use the all
method to return an array of all Player
objects that are in this room.
const players = client.players.all;
-
-Retrieve a specific Player: Use the get
method to return a Player
object with that id. Returns undefined
if
-player does not exist.
const playerOne = client.players.get(1);
-
-Special Cases: The methods in PlayersManager handle some special cases. For example, if the player ID is 0
, it
-represents the server (Archipelago), and the methods will return appropriate values for these cases. See documentation
-for full exceptions.
The DataManager
class in archipelago.js is responsible for managing room session data and the data package. Here are
-some tips for working with the DataManager
:
Retrieve Games List: Use the games
property to get an array of all games present in the room.
const gamesList = client.data.games;
-
-Retrieve Hint Cost: Use the hintCost
property to get the number of hint points required to receive a hint.
const hintCost = client.data.hintCost;
-
-Retrieve Hint Points: Use the hintPoints
property to get the number of hint points the player has.
const hintPoints = client.data.hintPoints;
-
-Retrieve Slot Data: Use the slotData
property to access the slot data for the game.
const slotData = client.data.slotData;
-
-Retrieve Slot and Team: Use the slot
and team
properties to get the player's slot and team.
const slot = client.data.slot;
const team = client.data.team;
-
-Retrieve Seed: Use the seed
property to get the seed for the room.
const seed = client.data.seed;
-
-Retrieve Permissions: Use the permissions
property to get the current permissions for the room.
const permissions = client.data.permissions;
-
-Send Set Operations: Use the set
method to send a series of set operations using the SetOperationBuilder
-object to the server. This method returns a promise that resolves with a SetReplyPacket
if wantReply
was
-requested.
import { /* ... */, SetOperationsBuilder } from "archipelago.js";
// Add additional set operations to the SetOperationBuilder.
const setOperation = new SetOperationsBuilder("key", 0 /* default value */, true /* wantReply */)
.add(12) // Add to it!
.multiply(4) // Multiply it!
.shiftLeft(2); // Shift bits!
const setReply = await client.data.set(setOperation);
-
-The ItemsManager
class in archipelago.js is responsible for managing item data. Here are some tips for working with
-the ItemsManager
:
Retrieve Item Name: Use the name method to retrieve the name of an item based on its ID and game name. If the -item or game is not found, it will return a default message.
-const itemName = client.items.name(gameName, itemId);
-
-Retrieve Item ID: Use the id
method to retrieve the ID of an item based on its name and game name. If the item
-or game is not found, it will throw an error.
const itemId = client.items.id(gameName, itemName);
-
-Retrieve Item Group: Use the group
method to retrieve an array of item names belonging to a specific group in
-a game. If the game or group is not found, it will return an empty array.
const itemGroup = client.items.group(gameName, groupName);
-
-Retrieve all received items: Use the received
property to retrieve an array of all items that have been sent
-by the server.
const allItems = client.items.received;
-
-Retrieve ReceivedItem index: Returns the index
of the next expected item to be received from the server. Any
-items with a lower index are stored in ItemsManager.received
. Useful for tracking if new items have been received
-or to check if a de-sync event occurred.
const receivedItemIndex = client.items.index;
-
-The HintsManager
class in archipelago.js is responsible for managing hint events for a specific player slot. Here are
-some tips for working with the HintsManager
:
mine
property to access an array of hints that are relevant to the player slot.const relevantHints = client.hints.mine;
-
-Hints update automatically for the slot the player is in when new hints are made that are relevant for the player.
-Congratulations! You have successfully set up a client and hopefully learned a good amount of what this library is -capable of! You are now ready to integrate Archipelago functionality into your application.
-For more information, check out the archipelago.js API documentation and explore the available features and -capabilities.
-If you encounter any issues or have questions, feel free to reach out on the GitHub repository for support or directly -to Phar (thephar) in the Archipelago Discord, and thanks for checking out my little pet -project for Archipelago!
-To develop further or contribute to Archipelago.JS itself, just clone this repository to a desired location on your -computer:
-git clone https://github.com/ThePhar/archipelago.js && cd archipelago.js
-
-Then run npm install
to install all dependencies.
Archipelago.JS is written in TypeScript and includes a strong ESLint and Prettier config file to ensure code
-consistency. Be sure to follow the code standards and check your work with npm run lint
. You can build your code by
-running npm run pack
(to package in a .tgz
file) or npm run build
(for a full dist/
folder).
It is recommended to work in a branch other than main
, even if you fork, to avoid merge conflicts with GitHub when
-pull requests and squash merges happen.
The full API documentation is located here. Please be sure to reference it, +
+ + + +
+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).
import { Client } from "archipelago.js";
const client = new Client();
// Connect to Archipelago session.
client.connect("wss://archipelago.gg:38281", "Phar", "Clique")
.then(() => client.messages.chat("Hello, multiworld!"));
+
+
+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 at -here as of 2023-07-08. See more -information about Archipelago at their website.
-Generated using TypeDoc
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:src
(or pnpm build:docs
).
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}
: JSONSerializableData - 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.
+The base packet structure for all client packets.
-Readonly
cmdThe type of packet this is.
-Generated using TypeDoc
The base packet structure for all server packets.
-Readonly
cmdThe type of packet this is.
-Generated using TypeDoc
Sent by the client to have the server forward data to all clients that satisfy any given search criteria.
-The type of packet this is.
-Any data you want to send.
-Optional
gamesOptional. Game names that should receive this message.
-Optional
slotsOptional. Player IDs that should receive this message.
-Optional
tagsOptional. Client tags that should receive this message.
-Generated using TypeDoc
Sent to clients after a client requested this message be sent to them, more info in the BouncePacket.
-The type of packet this is.
-A verbatim copy of the data in the BouncePacket package.
-Optional
gamesOptional. Game names this message is targeting.
-Optional
slotsOptional. Player slot IDs that this message is targeting.
-Optional
tagsOptional. Client tags this message is targeting.
-Generated using TypeDoc
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.
+Sent by the client to initiate a connection to an Archipelago game session. Sent automatically during -connect.
-The type of packet this is.
-The name of the game the client is playing.
-Bit flags configuring which items should be sent by the server. Read ItemsHandlingFlags for information -on individual flags.
-The slot name for this client.
-If the game session requires a password, it should be passed here.
-Denotes special features or capabilities that the sender is currently capable of.
-Unique identifier for player client.
-An object representing the minimum Archipelago server version this client supports.
-Generated using TypeDoc
Update arguments from the Connect packet, currently only updating tags
and items_handling
is supported.
The type of packet this is.
-Bit flags configuring which items should be sent by the server. See ItemsHandlingFlags for additional -information.
-Denotes special features or capabilities that the sender is currently capable of.
-Generated using TypeDoc
Sent to clients when the connection handshake is successfully completed.
-Contains ids of all locations that have been checked. Useful for trackers, among other things. Location ids are -in the range of -2^53^ to +2^53^-1.
-The type of packet this is.
-Number of hint points that the current player has.
-Contains ids of remaining locations that need to be checked. Useful for trackers, among other things.
-List denoting other players in the multi-world, whether connected or not.
-Your slot number on your team. See NetworkPlayer for more info on the slot number.
-Contains a json object for slot related data, differs per game. Empty if not required.
-Object of each slot with their NetworkSlot information.
-Your team number. See NetworkPlayer for more info on team number.
-Generated using TypeDoc
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 clients when the server refuses connection. This is sent during the initial connection handshake.
-The type of packet this is.
-Optional
errorsOptional. When provided, should contain any one of the following ConnectionError enumerations or other -errors. See ConnectionError for additional information on what each error means.
-Generated using TypeDoc
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.
-The type of packet this is.
-The data package as an object of DataPackage.
-Generated using TypeDoc
Sent by the client to request the data package from the server. Does not require client authentication. Sent -automatically during connect.
-The type of packet this is.
-Optional
gamesOptional. If specified, will only send back the specified data. Such as, ["Factorio"]
➔
-DataPackagePacket with only Factorio game data.
Generated using TypeDoc
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 keys exist with specific return data, all of them have the prefix _read_
.
_read_hints_{team}_{slot}
: Hint[] - All known Hints belonging to the requested player._read_slot_data_{slot}
: JSONSerializableData - slot_data
belonging to the requested slot.The type of packet this is.
-Keys to retrieve the values for.
-Generated using TypeDoc
Sent to clients if the server caught a problem with a packet. This only occurs for errors that are explicitly checked -for.
-The type of packet this is.
-Optional
original_The cmd
argument of the faulty packet, will be undefined
if the cmd
failed to be parsed.
A descriptive message of the problem at hand.
-The PacketProblemType that was detected in the packet.
-Generated using TypeDoc
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.
-The type of packet this is.
-The ids of the locations checked by the client. May contain any number of checks, even ones sent before; -duplicates do not cause issues with the Archipelago server.
-Generated using TypeDoc
Sent to clients to acknowledge a received LocationScoutsPacket and responds with the item in each location -being scouted.
-The type of packet this is.
-Contains list of item(s) in the location(s) scouted.
-Generated using TypeDoc
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, such as 'ledge items' in A Link to the Past
. The server will always respond
-with a LocationInfoPacket with the items located in the scouted location.
The type of packet this is.
-If non-zero, the scouted locations get created and broadcast as a player-visible hint. If HINT_ONLY_NEW
, only
-new hints are broadcast, however this does not remove them from the LocationInfo reply.
The 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.
-Generated using TypeDoc
Sent to clients when they receive an item.
-The type of packet this is.
-The next empty slot in the list of items for the receiving client. Useful for tracking items.
-The items which the client is receiving.
-Generated using TypeDoc
Sent to clients as a response to a GetPacket.
-Additional arguments added to the GetPacket that triggered this RetrievedPacket will also be passed -along.
-The type of packet this is.
-A key-value collection containing all the values for the keys requested in the GetPacket.
-Generated using TypeDoc
Sent to clients when they connect to an Archipelago server, but before they authenticate.
-The type of packet this is.
-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.
-List of games present in this multiworld.
-Object denoting the version of Archipelago which generated the multiworld.
-The amount of points it costs to receive a hint from the server.
-The amount of hint points you receive per item/location check completed.
-Denoted whether a password is required to join this room.
-Mapping of permission name to Permission, keys are: release
, collect
and remaining
.
Dictates 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)Dictates 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)Dictates what is allowed when it comes to a player querying the items remaining in their run.
-Uniquely identifying name of this generation.
-Denotes special features or capabilities that the sender is capable of. Example: WebHost
Unix time stamp in seconds of "now". Send for time synchronization if wanted for things like a DeathLink -BouncePacket.
-Object denoting the version of Archipelago which the server is running.
-Generated using TypeDoc
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
checked_Might be a partial update, containing new locations that were checked, especially from a co-op partner in the -same slot.
-The type of packet this is.
-Optional
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.
-Optional
gamesList of games present in this multiworld.
-Optional
hint_The amount of points it costs to receive a hint from the server.
-Optional
hint_Number of hint points that the current player has.
-Optional
location_The amount of hint points you receive per item/location check completed.
-Optional
passwordDenoted whether a password is required to join this room.
-Optional
permissionsMapping of permission name to Permission, keys are: release
, collect
and remaining
.
Dictates 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)Dictates 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)Dictates what is allowed when it comes to a player querying the items remaining in their run.
-Optional
playersInformation on the players, whether connected or not.
-Optional
seed_Uniquely identifying name of this generation.
-Optional
tagsDenotes special features or capabilities that the sender is capable of. Example: WebHost
Optional
timeUnix time stamp of "now". Send for time synchronization if wanted for things like a DeathLink -BouncePacket.
-Optional
versionObject denoting the version of Archipelago which the server is running.
-Generated using TypeDoc
Basic chat-type packet which sends text to the server to be distributed to other clients.
-The type of packet this is.
-Text to send to others.
-Generated using TypeDoc
Used to register your current session for receiving all SetReplyPackets of certain keys to allow your client -to keep track of changes.
-The type of packet this is.
-Keys to receive all SetReplyPackets for.
-Generated using TypeDoc
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.
-Readonly
cmdThe type of packet this is.
-Readonly
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.
-Generated using TypeDoc
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.
-Readonly
cmdThe type of packet this is.
-Readonly
keyThe key that was updated.
-Readonly
original_The value the key had before it was updated.
-Readonly
valueThe new value for the key.
-Generated using TypeDoc
Sent to the server to update on the client's status. Examples include readiness or goal completion. (Example:
-Defeated Ganon in A Link to the Past
)
The type of packet this is.
-One of ClientStatus enumerations. See link for more information.
-Generated using TypeDoc
Sent to server to request a ReceivedItemsPacket to resynchronize items if a "desync" ever occurs.
-The type of packet this is.
-Generated using TypeDoc
Generated using TypeDoc
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 | JSONSerializableData[]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 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: JSONSerializableDataA 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: JSONSerializableDataA 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: JSONSerializableDataA 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: JSONSerializableDataA 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.
+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.
-Generated using TypeDoc
All the data for this type of message.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
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.
-Generated using TypeDoc
A type union of all known and supported Archipelago packets.
-Generated using TypeDoc
A helper object for awaiting a key to return from a Set request.
-Generated using TypeDoc
All the data for this type of message.
-Original chat message without sender prefix.
-Slot of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
A type union of all known and supported Archipelago client packets.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
A type alias for any known client status. See clientStatuses for more information.
+All the data for this type of message.
-Slot of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Includes the color to print this text with.
-Used to supply text data for this node.
-Used to denote the intent of the message part.
-Generated using TypeDoc
All the data for this type of message.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
An object that holds credential information for a slot to connect.
-The name of the game the client is playing.
-The hostname or ip address of the Archipelago server to connect to.
-Bit flags configuring which items should be sent by the server. Read ItemsHandlingFlags for information -on individual flags.
-The slot/player name for this client.
-Optional
password?: stringIf the game session requires a password, it should be passed here.
-The port of the Archipelago server to connect to.
-Optional
protocol?: "ws" | "wss"Whether to explicitly use insecure websockets or secure websockets. If undefined
, client will attempt secure
-websockets first, then fallback to insecure websockets if it fails to connect.
Optional
tags?: string[]Denotes special features or capabilities that the sender is currently capable of.
-Optional
uuid?: stringUnique identifier for player client. If not specified, the client will generate one automatically.
-Optional
version?: { An object representing the minimum Archipelago server version this client supports. If not specified, -Client will send the minimum supported version by this library.
-Generated using TypeDoc
Generated using TypeDoc
Amount of seconds remaining on the countdown.
-All the data for this type of message.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Generated using TypeDoc
A callback that fires when a monitored key is updated in data storage.
+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).Mapping of all Games and their respective data. See GamePackage for additional info.
-Generated using TypeDoc
A promise that resolves to a record of key-value pairs from data storage.
+A DataStorageOperation 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.
-DataStorageOperations consist 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,
-Example:
-{ operation: "add", value: 12 }
-
-Generated using TypeDoc
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.
+The data for a special kind of BouncePacket that can be supported by any Archipelago game. It targets the tag -CommonTags.DEATH_LINK and carries the following data:
-Optional
cause?: stringOptional. Text to explain the cause of death, e.g. "Phar was shot after breaking core again."
-Name of the player who first died. Can be a slot name, but can also be a name from within a multiplayer game.
-Unix time stamp of time of death in seconds.
-Generated using TypeDoc
The DeathLink data structure.
+Optional
Readonly
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.
)
Readonly
source: stringThe name of the player who died. Can be a slot name, but could also be a name from within a multiplayer game.
+Readonly
time: numberUnix timestamp of time of death.
+If the key has no value yet, sets the current value of the key to default
of the SetPacket's (value
-is ignored).
A value for the operation to apply against the current data storage value.
-Generated using TypeDoc
Collection of data that contains meta information for a particular game.
-SHA1 checksum of this game's data. Used to validate if cached data package needs to be requested from the server.
-Mapping of all item ids to their respective names. Inverse of item_name_to_id
. This is not sent by the
-Archipelago server, but is built by DataManager when it loads the data package.
Mapping of all item groups.
-Mapping of all item names to their respective id.
-Mapping of all location ids to their respective names. Inverse of location_name_to_id
. This is not sent by the
-Archipelago server, but is built by DataManager when it loads the data package.
Mapping of all location groups.
-Mapping of all location names to their respective id.
-Generated using TypeDoc
All the data for this type of message.
-Slot of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
An object representing a hint information for a particular item and location that contains it.
-The name of the entrance to the location where this item is located.
-The id of the player who has this item in their world.
-Whether this item has already been found.
-The id of this item.
-The ItemFlags for this item.
-The id of the location for this item.
-The id of the player who owns this item.
-Generated using TypeDoc
All the data for this type of message.
-Whether the location hinted for was checked.
-Source player's identifier, location identifier, item identifier and item flags.
-Destination player's identifier.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
All the data for this type of message.
-Source player's identifier, location identifier, item identifier and item flags.
-Destination player's identifier.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
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.
Generated using TypeDoc
Bit flags that determine if an item is progression, "nice to have", filler, or a trap.
-The id
of the player who owns this item.
Used to supply text data for this node.
-Used to denote the intent of the message part.
-Generated using TypeDoc
All the data for this type of message.
-Source player's identifier, location identifier, item identifier and item flags.
-Destination player's identifier.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Generated using TypeDoc
Message nodes sent along with PrintJSONPacket to be reconstructed into a legible message. The nodes are -intended to be read in the order they are listed in the packet.
-Generated using TypeDoc
A type union of all basic JSON-compatible types that can be communicated with or from the server.
-Generated using TypeDoc
All the data for this type of message.
-Slot of the triggering player.
-Tags of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
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.
-Generated using TypeDoc
The id
of the player who has this location.
Used to supply text data for this node.
-Used to denote the intent of the message part.
-Generated using TypeDoc
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.
-Generated using TypeDoc
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
.
Sets the current value of the key to value
if value
is lower.
A value for the operation to apply against the current data storage value.
-Generated using TypeDoc
Used to supply text data for this node.
-Optional
type?: "text" | "entrance_name" | "player_id" | "player_name"Used to denote the intent of the message part.
-Generated using TypeDoc
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.
-Generated using TypeDoc
Multiplies the current value of the key by value
.
A value for the operation to apply against the current data storage value.
-Generated using TypeDoc
Items that are sent over the network.
-Bit flags for the type of item this is. See ItemFlags for additional information.
-The item id of the item. Item ids are in the range of -2^53^ to +2^53^-1.
-The location id of the location inside the world. Location ids are in the range of -2^53^ to +2^53^-1.
-The 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.
-Generated using TypeDoc
An object that contains information about a player on the network.
-Represents the player's name in current time. Can be changed during a game with the !alias <name>
command by
-the player.
The original slot name as defined by the player's configuration file. Individual names are unique among players.
-Determines 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.
Determines the team the player is on. Useful for competitive seeds. Team numbers start at 0
.
Generated using TypeDoc
An object representing static information about a slot.
-The game this slot is playing.
-Contains a list of player ids, if the type
is SlotType.GROUP. Used for item links, otherwise empty.
The original slot name as defined by the player's configuration file. Individual names are unique among players.
-The type of slot this is. See SlotType for additional information on allowed types.
-Generated using TypeDoc
An object representing software versioning. Used in the ConnectPacket to allow the client to inform the -server the minimum Archipelago version it supports.
-Always required for Archipelago to parse NetworkVersion data.
-Generated using TypeDoc
Generated using TypeDoc
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.
-Generated using TypeDoc
Generated using TypeDoc
All the data for this type of message.
-Slot of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Generated using TypeDoc
All three Permission values for a given room.
-Readonly
collect: PermissionReadonly
release: PermissionReadonly
remaining: ReducedPermissionGenerated using TypeDoc
An object that contains information about a player. Combination of NetworkPlayer, NetworkSlot and -some helper functions.
-Helper function for looking up an item name for this player.
-Helper function for looking up a location name for this player.
-Generated using TypeDoc
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.
-Generated using TypeDoc
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.
-Generated using TypeDoc
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.
Only some of these attributes are present on PrintJSONPacket packets, see -PrintJSON in AP Docs -for more information.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
All the data for this type of message.
-Slot of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
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.
-Generated using TypeDoc
Sets the current value of the key to value
.
A value for the operation to apply against the current data storage value.
-Generated using TypeDoc
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.
-Generated using TypeDoc
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.
+All the data for this type of message.
-Original chat message without sender prefix.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
A type union of all known and supported Archipelago server packets.
-Generated using TypeDoc
Generated using TypeDoc
A stand in for unknown slot data.
-Generated using TypeDoc
Generated using TypeDoc
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.
+All the data for this type of message.
-Slot of the triggering player.
-Tags of the triggering player.
-Team of the triggering player.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
All the data for this type of message.
-May be present to indicate the nature of this message. Known types are specified in PRINT_JSON_TYPE.
-Generated using TypeDoc
Generated using TypeDoc
An abstract type for unknown slot data.
+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.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
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.
-Generated using TypeDoc
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 all possible packet types the client can send to the server. See each packet's documentation page for -additional information on each packet type.
-Readonly
BOUNCE: "Bounce"Readonly
CONNECT: "Connect"Readonly
CONNECT_Readonly
GET: "Get"Readonly
GET_Readonly
LOCATION_Readonly
LOCATION_Readonly
SAY: "Say"Readonly
SET: "Set"Readonly
SET_Readonly
STATUS_Readonly
SYNC: "Sync"Generated using TypeDoc
Const
An enumeration containing the possible client states that may be used to inform the server in -StatusUpdatePacket.
-Readonly
CONNECTED: 5Client is currently connected.
-Readonly
GOAL: 30Client has completed their goal.
-Readonly
PLAYING: 20Client is currently playing.
-Readonly
READY: 10Client is current ready to start.
-Readonly
UNKNOWN: 0Client is in an unknown state.
-Generated using TypeDoc
Const
Tags are represented as a list of strings, these are some of the most common tags.
-Readonly
DEATH_Client participates in the DeathLink mechanic, therefore will send and receive DeathLink BouncePackets.
-Readonly
REFERENCE_Signifies that this client is a reference client, its usefulness is mostly in debugging to compare client -behaviours more easily.
-This tag should only be utilized by clients that come pre-packaged with Archipelago.
-Readonly
TEXT_Tells the server that this client will not send locations and is intended for chat. When specified and used with
-an empty game
in the ConnectPacket, game
and game
's version validation will be skipped.
Readonly
TRACKER: "Tracker"Tells the server that this client will not send locations and is actually a Tracker. When specified and used with
-an empty game
in the ConnectPacket, game
and game
's version validation will be skipped.
Generated using TypeDoc
Const
An enumeration of known errors the Archipelago server can send back to the client when they receive a -ConnectionRefusedPacket.
-Readonly
INCOMPATIBLE_Indicates a version mismatch or an unsupported client version number.
-Readonly
INVALID_Indicates that a correctly named slot was found, but the game for it mismatched.
-Readonly
INVALID_Indicates a wrong value type or flag combination was sent.
-Readonly
INVALID_Indicates the wrong, or no password when it was required, was sent.
-Readonly
INVALID_Indicates that the name
field did not match any auth entry on the server.
Generated using TypeDoc
Const
A const of the current Client connection status to the Archipelago server.
-Readonly
CONNECTED: "Connected"Connected to the Archipelago server and authenticated to the current room.
-Readonly
CONNECTING: "Connecting"Attempting to establish a connection to the Archipelago server.
-Readonly
DISCONNECTED: "Disconnected"Currently not connected to any Archipelago server.
-Readonly
WAITING_Connected to the Archipelago server, but awaiting to authenticate to join the room.
-Generated using TypeDoc
Const
The hint type for create_as_hint
in LocationScoutsPacket.
Readonly
HINT_Mark all locations as hinted and show to all relevant clients.
-Readonly
HINT_Mark all locations as hinted and show only newly hinted locations to relevant clients.
-Readonly
NO_Does not mark any location to be hinted and broadcast to clients.
-Generated using TypeDoc
Const
Bit flags configuring which items should be sent by the server to this client.
-Readonly
LOCAL_No ReceivedItems is sent to you, ever.
-Readonly
REMOTE_Shorthand for REMOTE_DIFFERENT_WORLDS
, REMOTE_OWN_WORLD
, and REMOTE_STARTING_INVENTORY
.
Readonly
REMOTE_Indicates you get items sent from other worlds.
-Readonly
REMOTE_Indicates you get items sent from your own world. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Readonly
REMOTE_Indicates you get your starting inventory sent. Requires REMOTE_DIFFERENT_WORLDS
to be set.
Generated using TypeDoc
Const
Bit flags that determine if an item is progression, "nice to have", filler, or a trap.
-Readonly
FILLER: 0Nothing special about this item.
-Readonly
NEVER_If set, indicates the item is important but not in a way that unlocks advancement.
-Readonly
PROGRESSION: 1If set, indicates the item can unlock logical advancement.
-Readonly
TRAP: 4If set, indicates the item is a trap that can inconvenience the player.
-Generated using TypeDoc
Const
Minimum supported version of Archipelago this library supports.
-Generated using TypeDoc
Const
PacketProblemType indicates the type of problem that was detected in the faulty packet, the known problem types are -below but others may be added in the future.
-Readonly
ARGUMENTS: "arguments"Arguments of the faulty packet which were not correct.
-Readonly
CMD: "cmd"cmd
argument of the faulty packet that could not be parsed correctly.
Generated using TypeDoc
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. Only works for !release
and !collect
Readonly
AUTO_Allows 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.
-Generated using TypeDoc
Const
A const of known PrintJSONPacket types.
-Readonly
ADMIN_The client entered an !admin
command.
Readonly
CHAT: "Chat"A player sent a chat message.
-Readonly
COLLECT: "Collect"A player collected the remaining items for their world.
-Readonly
COMMAND_Someone (usually the client) entered an !
command.
Readonly
COUNTDOWN: "Countdown"The current server countdown has progressed.
-Readonly
GOAL: "Goal"A player reached their goal.
-Readonly
HINT: "Hint"A player hinted.
-Readonly
ITEM_A player used the !getitem
command.
Readonly
ITEM_A player received an item.
-Readonly
JOIN: "Join"A player connected.
-Readonly
PART: "Part"A player disconnected.
-Readonly
RELEASE: "Release"A player released the remaining items in their world.
-Readonly
SERVER_The server broadcast a message.
-Readonly
TAGS_A player changed their tags.
-Readonly
TUTORIAL: "Tutorial"The client has triggered a tutorial message, such as when first connecting.
-Generated using TypeDoc
Const
A const containing the possible command permissions, for commands that may be restricted and do not support auto -modes.
-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.
-Generated using TypeDoc
Const
A const of all possible packet types the server can send to the client. See each packet's documentation page for -additional information on each packet type.
-Readonly
BOUNCED: "Bounced"Readonly
CONNECTED: "Connected"Readonly
CONNECTION_Readonly
DATA_Readonly
INVALID_Readonly
LOCATION_Readonly
PRINT_Readonly
RECEIVED_Readonly
RETRIEVED: "Retrieved"Readonly
ROOM_Readonly
ROOM_Readonly
SET_Generated using TypeDoc
Const
A const 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.
-Generated using TypeDoc
Const
This is a const 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.
Readonly
BLACK: "black"Readonly
BLACK_Readonly
BLUE: "blue"Readonly
BLUE_Readonly
BOLD: "bold"Readonly
CYAN: "cyan"Readonly
CYAN_Readonly
GREEN: "green"Readonly
GREEN_Readonly
MAGENTA: "magenta"Readonly
PURPLE_Readonly
RED: "red"Readonly
RED_Readonly
UNDERLINE: "underline"Readonly
WHITE: "white"Readonly
WHITE_Readonly
YELLOW: "yellow"Readonly
YELLOW_Generated using TypeDoc
Const
This is a const 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. Is the default type and as such may be 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.Readonly
COLOR: "color"Readonly
ENTRANCE_Readonly
ITEM_Readonly
ITEM_Readonly
LOCATION_Readonly
LOCATION_Readonly
PLAYER_Readonly
PLAYER_Readonly
TEXT: "text"Generated using TypeDoc
Const
Const
Archipelago version this library attempts to target. Support for older versions of the Archipelago API is not +guarenteed and some newer enhancements may no longer work or be supported.
+
The client that connects to an Archipelago server and facilitates communication, listens for events, and manages -data.
-