Class ArchipelagoSession
- Namespace
- Archipelago.MultiClient.Net
- Assembly
- Archipelago.MultiClient.Net.dll
ArchipelagoSession is the overarching class to access and modify and respond to the multiworld state
public class ArchipelagoSession : IArchipelagoSession, IArchipelagoSessionActions
- Inheritance
-
ArchipelagoSession
- Implements
- Inherited Members
- Extension Methods
Properties
ConnectionInfo
Provides information about your current connection
public IConnectionInfoProvider ConnectionInfo { get; }
Property Value
DataStorage
Provides access to a server side data storage to share and store values across sessions and players
public IDataStorageHelper DataStorage { get; }
Property Value
Items
Provides simplified methods to receive items
public IReceivedItemsHelper Items { get; }
Property Value
Locations
Provides way to mark locations as checked
public ILocationCheckHelper Locations { get; }
Property Value
MessageLog
Provides simplified handlers to receive messages about events that happen in the multiworld
public IMessageLogHelper MessageLog { get; }
Property Value
Players
Provides information about all players in the multiworld
public IPlayerHelper Players { get; }
Property Value
RoomState
Provides information about the current state of the server
public IRoomStateHelper RoomState { get; }
Property Value
Socket
Provides access to the underlying websocket, so send or receive messages
public IArchipelagoSocketHelper Socket { get; }
Property Value
Methods
Say(string)
Send a message on behalf of the current player Can also be used to send commands like !hint item
public void Say(string message)
Parameters
messagestringThe message that will be broadcasted to the server and all clients
SetClientState(ArchipelagoClientState)
Updates the status of the current player
public void SetClientState(ArchipelagoClientState state)
Parameters
stateArchipelagoClientStatethe state to send to the server
SetGoalAchieved()
Informs the server that the current player has reached their goal This cannot be reverted
public void SetGoalAchieved()
TryConnectAndLogin(string, string, ItemsHandlingFlags, Version, string[], string, string, bool)
Attempt to log in to the Archipelago server by opening a websocket connection and sending a Connect packet. Determining success for this attempt is done by attaching a listener to Socket.PacketReceived and listening for a Connected packet.
public LoginResult TryConnectAndLogin(string game, string name, ItemsHandlingFlags itemsHandlingFlags, Version version = null, string[] tags = null, string uuid = null, string password = null, bool requestSlotData = true)
Parameters
gamestringThe game this client is playing.
namestringThe slot name of this client.
itemsHandlingFlagsItemsHandlingFlagsInforms the AP server how you want ReceivedItem packets to be sent to you.
versionVersionThe minimum AP protocol version this client supports.
tagsstring[]The tags this client supports.
uuidstringThe uuid of this client.
passwordstringThe password to connect to this AP room.
requestSlotDataboolDecides if the LoginSuccessful result will contain any slot data
Returns
- LoginResult
LoginSuccessful if the connection is succeeded and the server accepted the login attempt. LoginFailure if the connection to the server failed in some way.
Remarks
The connect attempt is synchronous and will lock for up to 5 seconds as it attempts to connect to the server. Most connections are instantaneous however the timeout is 5 seconds before it returns LoginFailure.