The SteamLobbyBrowser provides access to the list of game lobbies available on the Steam.
Call refresh() to refresh the list.
Call num_lobbies() to get the number of available lobbies, and call lobby() to retrieve detailed information about each of those lobbies. You can use these details to determine if you want to join the lobby, and the Steam ID needed in order to connect.
Constructors and accessors
Other related reference items
add_distance_filter ( self, distance )Adds a filter for lobby distance, which you can use to restrict available lobbies based on their geographical distance from the player.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
distance : | integer | A distance filter constant that indicates the required distance relationship between the player and the lobbies. |
This function does not return any values. |
Other related reference items
add_filter ( self, key, value, comp )Adds a string or numeric filter for a specific key.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
key : | string | The key that the filter applies to. |
value : | any(string, integer) | The string or integer value to compare with the value stored in the lobby. The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses. |
comp : | integer | A comparison constant that indicates how the filter value should be compared to the lobby value. |
This function does not return any values. |
Other related reference items
add_near_filter ( self, key, value )Adds a numeric filter that looks for near matches against a specific key of the lobby.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
key : | string | The key that the filter applies to. |
value : | integer | The number to match. Note that this does not specify how close an integer must be to be a match. |
This function does not return any values. |
add_slots_filter ( self, slots )Adds a filter that sets a minimum number of slots that must be free in the lobby.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
slots : | integer | The minimum number of free slots. |
This function does not return any values. |
clear_filters ( self )Removes all filters used by the browser to restrict its list of lobbies.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
This function does not return any values. |
data ( self, index, key ) : stringReturns the data set for the specified in the specified lobby.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
index : | integer | The index of the lobby whose data you want to retrieve, within the list maintained by the lobby browser. |
key : | string | A string key that describes the value. |
string |
The value stored for the specified key. |
is_refreshing ( self ) : booleanIndicates whether or not the lobby browser is currently refreshing its list of lobbies.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
boolean |
Returns true if the list is currently refreshing, or false otherwise. |
If this function returns true, calling refresh() will have no effect.
lobby ( self, i ) : network_steam_lobby_infoReturns information about the specified lobby, including the address that you can use to join the lobby.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. | |
i : | integer | The index of the lobby whose data you want to retrieve, within the list maintained by the lobby browser. |
A table that contains the information retrieved for the lobby. |
Other related reference items
num_lobbies ( self ) : integerReturns the number of lobbies found by the lobby browser.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
integer |
The number of available lobbies. |
refresh ( self )Refreshes the list of game lobbies.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
This function does not return any values. |
Other related reference items
The constants you can use when adding a comparison filter to the lobby browser in a call to add_filter().
EQUAL : integerEquals to.
|
GREATER : integerGreater than.
|
GREATER_OR_EQUAL : integerGreater or equal to.
|
LESS : integerLess than.
|
LESS_OR_EQUAL : integerLess than or equal to.
|
NOT_EQUAL : integerNot equal to.
|
The constants you can use when adding a distance-based filter to the lobby browser in a call to add_distance_filter().
CLOSE : integerOnly same immediate region.
|
DEFAULT : integerOnly same region or close, but looking further if the current region has infrequent lobby activity.
|
This is the default.
FAR : integerAbout half-way around the globe (expect high latency).
|
WORLD : integerNo filtering (not recommended, expect multiple seconds of latency between the clients).
|