Functions | Parties

Here is a list of all the functions available in the GodotSteam module. The descriptions are pulled from the official Steamworks SDK documentation with modifications made to fit GodotSteam's implementation of the functions. Naturally, any GodotSteam-specific functions will be noted as such.


cancelReservation( int beacon_id, int steam_id ) cancelReservation( uint64_t beacon_id, uint64_t steam_id )

  • To cancel a reservation (due to timeout or user input), call this. Steam will open a new reservation slot.
  • Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party.
  • Returns nothing; void.

changeNumOpenSlots( int beacon_id, int open_slots ) changeNumOpenSlots( uint64_t beacon_id, uint32 open_slots )

  • If a user joins your party through other matchmaking (perhaps a direct Steam friend, or your own matchmaking system), your game should reduce the number of open slots that Steam is managing through the party beacon. For example, if you created a beacon with five slots, and Steam sent you two reservation_notification callbacks, and then a third user joined directly, you would want to call changeNumOpenSlots with a value of 2 for open_slots. That value represents the total number of new users that you would like Steam to send to your party.
  • Triggers a change_num_open_slots call result.
  • Returns nothing; void.

createBeacon( int open_slots, int location_id, int type, string connect_string, string metadata ) createBeacon( uint32 open_slots, uint64_t location_id, int type, string connect_string, string metadata )

  • Create a beacon. You can only create one beacon at a time. Steam will display the beacon in the specified location, and let up to open_slots users "follow" the beacon to your party.
  • If users join your party through other matchmaking, adjust the number of remaining open slots using changeNumOpenSlots.
  • Triggers a create_beacon call result.
  • Returns nothing; void.

destroyBeacon( int beacon_id ) destroyBeacon( uint6_t beacon_id )

  • Call this method to destroy the Steam party beacon. This will immediately cause Steam to stop showing the beacon in the target location. Note that any users currently in-flight may still arrive at your party expecting to join.
  • Returns a bool.

getAvailableBeaconLocations( int max ) getAvailableBeaconLocations( uint32 max )

  • Get the list of locations in which you can post a party beacon.
  • Returns an array of:
    • beaconData (dictionary)
      • type (int)
      • location_id (int)
      • type (int)
      • location_id (uint64_t)

getBeaconByIndex( int index ) getBeaconByIndex( uint32 index )

  • Use with getNumActiveBeacons to iterate the active beacons visible to the current user. Argument index is a zero-based index, so iterate over the range [0, getNumActiveBeacons() - 1]. The return is a beacon_id that can be used with getBeaconDetails to get information about the beacons suitable for display to the user.
  • Returns an int. Returns a uint64_t.

getBeaconDetails( int beacon_id ) getBeaconDetails( uint64_t beacon_id )

  • Get details about the specified beacon. You can use the Friends API to get further details about owner_id, and getBeaconLocationData to get further details about location_id. The metadata contents are specific to your game, and will be whatever was set (if anything) by the game process that created the beacon.
  • Returns a dictionary:
    • beacon_id (int)
    • owner_id (int)
    • type (int)
    • location_id (int)
    • metadata (string)
    • beacon_id (uint64_t)
    • owner_id (uint64_t)
    • type (int)
    • location_id (uint64_t)
    • metadata (string)

getBeaconLocationData( int location_id, int location_type, int location_data )

  • Query general metadata for the given beacon location. For instance the Name, or the URL for an icon if the location type supports icons (for example, the icon for a Steam Chat Room Group).
  • Returns a string.

getNumActiveBeacons()

  • Get the number of active party beacons created by other users for your game, that are visible to the current user.
  • Returns an int. Returns a uint32.

joinParty( int beacon_id ) joinParty( uint64_t beacon_id )

  • When the user indicates they wish to join the party advertised by a given beacon, call this method. On success, Steam will reserve a slot for this user in the party and return the necessary "join game" string to use to complete the connection.
  • Triggers a join_party call result.
  • Returns nothing; void.

onReservationCompleted( int beacon_id, int steam_id ) onReservationCompleted( uint64_t beacon_id, uint64_t steam_id )

  • When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a reservation_notification callback. When that user joins your party, call onReservationCompleted to notify Steam that the user has joined successfully.
  • Triggers a reservation_notification callback.
  • Returns nothing; void.