############# ISteamParties ############# .. note:: This documentation is auto-generated. Methods marked with 🤖 are automatically generated bindings. Methods marked with ✍️ are manually implemented and methods marked with ✋ are currently not implemented. List of Functions ----------------- * :func:`Parties.CancelReservation` * :func:`Parties.ChangeNumOpenSlots` * :func:`Parties.CreateBeacon` * :func:`Parties.DestroyBeacon` * :func:`Parties.GetAvailableBeaconLocations` * :func:`Parties.GetBeaconByIndex` * :func:`Parties.GetBeaconDetails` * :func:`Parties.GetBeaconLocationData` * :func:`Parties.GetNumActiveBeacons` * :func:`Parties.GetNumAvailableBeaconLocations` * :func:`Parties.JoinParty` * :func:`Parties.OnReservationCompleted` List of Callbacks ----------------- * :func:`Parties.OnJoinPartyCallback` * :func:`Parties.OnCreateBeaconCallback` * :func:`Parties.OnReservationNotificationCallback` * :func:`Parties.OnChangeNumOpenSlotsCallback` * :func:`Parties.OnAvailableBeaconLocationsUpdated` * :func:`Parties.OnActiveBeaconsUpdated` Function Reference ------------------ .. function:: Parties.CancelReservation(ulBeacon, steamIDUser) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeacon: :param uint64 - CSteamID steamIDUser: :SteamWorks: `CancelReservation `_ **Example**:: -- Called by beacon owner when a reserved player cancels Steam.Parties.CancelReservation(beaconHandle, playerSteamID) .. function:: Parties.ChangeNumOpenSlots(ulBeacon, unOpenSlots, callback) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeacon: :param int unOpenSlots: :param function callback: CallResult callback receiving struct :func:`ChangeNumOpenSlotsCallback_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `ChangeNumOpenSlots `_ .. function:: Parties.CreateBeacon(unOpenSlots, pBeaconLocation, pchConnectString, pchMetadata, callback) 🤖 **Auto-generated binding** :param int unOpenSlots: :param pBeaconLocation: (:ref:`SteamPartyBeaconLocation_t `) :param str? pchConnectString: :param str? pchMetadata: :param function callback: CallResult callback receiving struct :func:`CreateBeaconCallback_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `CreateBeacon `_ .. function:: Parties.DestroyBeacon(ulBeacon) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeacon: :returns: (bool) Return value :SteamWorks: `DestroyBeacon `_ .. function:: Parties.GetAvailableBeaconLocations(uMaxNumLocations) 🤖 **Auto-generated binding** :param int? uMaxNumLocations: size of the buffer to allocate for ``pLocationList``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (:ref:`SteamPartyBeaconLocation_t `\ []) ``pLocationList`` :SteamWorks: `GetAvailableBeaconLocations `_ **Signature differences from C++ API:** * Parameter ``pLocationList`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: Parties.GetBeaconByIndex(unIndex) 🤖 **Auto-generated binding** :param int unIndex: :returns: (uint64 - PartyBeaconID_t) Return value :SteamWorks: `GetBeaconByIndex `_ **Notes:** * See :func:`Parties.GetNumActiveBeacons`'s example. .. function:: Parties.GetBeaconDetails(ulBeaconID, cchMetadata) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeaconID: :param int? cchMetadata: size of the buffer to allocate for ``pchMetadata``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (uint64) ``pSteamIDBeaconOwner`` :returns: (:ref:`SteamPartyBeaconLocation_t `) ``pLocation`` :returns: (str) ``pchMetadata`` :SteamWorks: `GetBeaconDetails `_ **Signature differences from C++ API:** * Parameter ``pSteamIDBeaconOwner`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pLocation`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pchMetadata`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Notes:** * See :func:`Parties.GetNumActiveBeacons`'s example. .. function:: Parties.GetBeaconLocationData(BeaconLocation, eData, cchDataStringOut) 🤖 **Auto-generated binding** :param BeaconLocation: (:ref:`SteamPartyBeaconLocation_t `) :param int - ESteamPartyBeaconLocationData eData: :param int? cchDataStringOut: size of the buffer to allocate for ``pchDataStringOut``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchDataStringOut`` :SteamWorks: `GetBeaconLocationData `_ **Signature differences from C++ API:** * Parameter ``pchDataStringOut`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: Parties.GetNumActiveBeacons() 🤖 **Auto-generated binding** :returns: (int) Return value :SteamWorks: `GetNumActiveBeacons `_ **Example**:: local count = Steam.Parties.GetNumActiveBeacons() for i = 0, count - 1 do local beaconID = Steam.Parties.GetBeaconByIndex(i) local ok, ownerID, loc, meta = Steam.Parties.GetBeaconDetails(beaconID, 256) if ok then print('Beacon owner:', Steam.Friends.GetFriendPersonaName(ownerID)) end end .. function:: Parties.GetNumAvailableBeaconLocations() 🤖 **Auto-generated binding** :returns: (bool) Return value :returns: (int) ``puNumLocations`` :SteamWorks: `GetNumAvailableBeaconLocations `_ **Signature differences from C++ API:** * Parameter ``puNumLocations`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local count = Steam.Parties.GetNumAvailableBeaconLocations() local locations = Steam.Parties.GetAvailableBeaconLocations(count) for _, loc in ipairs(locations) do print('Beacon location type:', loc.m_eType) end .. function:: Parties.JoinParty(ulBeaconID, callback) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeaconID: :param function callback: CallResult callback receiving struct :func:`JoinPartyCallback_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `JoinParty `_ **Example**:: Steam.Parties.JoinParty(beaconID, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Joined party, connect string:', data.m_rgchConnectString) connectToGame(data.m_rgchConnectString) end end) .. function:: Parties.OnReservationCompleted(ulBeacon, steamIDUser) 🤖 **Auto-generated binding** :param uint64 - PartyBeaconID_t ulBeacon: :param uint64 - CSteamID steamIDUser: :SteamWorks: `OnReservationCompleted `_ Callbacks --------- .. function:: Parties.OnJoinPartyCallback Callback for `JoinPartyCallback_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_ulBeaconID** *(uint64 - PartyBeaconID_t)* * **data.m_SteamIDBeaconOwner** *(uint64 - CSteamID)* * **data.m_rgchConnectString** *(string)* **Example**:: function Steam.Parties.OnJoinPartyCallback(data) if data.m_eResult == Steam.k_EResultOK then connectToGame(data.m_rgchConnectString) end end .. function:: Parties.OnCreateBeaconCallback Callback for `CreateBeaconCallback_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_ulBeaconID** *(uint64 - PartyBeaconID_t)* .. function:: Parties.OnReservationNotificationCallback Callback for `ReservationNotificationCallback_t `_ **callback(data)** receives: * **data.m_ulBeaconID** *(uint64 - PartyBeaconID_t)* * **data.m_steamIDJoiner** *(uint64 - CSteamID)* .. function:: Parties.OnChangeNumOpenSlotsCallback Callback for `ChangeNumOpenSlotsCallback_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* .. function:: Parties.OnAvailableBeaconLocationsUpdated Callback for `AvailableBeaconLocationsUpdated_t `_ **callback(data)** receives no fields (notification only). .. function:: Parties.OnActiveBeaconsUpdated Callback for `ActiveBeaconsUpdated_t `_ **callback(data)** receives no fields (notification only). **Example**:: function Steam.Parties.OnActiveBeaconsUpdated() local count = Steam.Parties.GetNumActiveBeacons() print('Active beacons updated, count:', count) end