Clans.Client
Access the Steam Clan aka Steam Group system with Heathen's Steam API
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
This leverages features of ISteamFriends, ISteamUser and ISteamUGC to simplify working with Steam "clans" aka "groups" aka "guilds" ... known by a lot of names but these are the "communities" you see in Steam which can have chats, news, etc.
What is a clan?
Also known as a Community Group, Steam lets user's create there own social groups, these could be groups of active players similar to a guild in an MMO or simply an interest group e.g. a collection of Steam users with similar interests. You can search the existing community groups here:
What can it do?
You can list the clan owner, its officers, open the clan chat in overlay or join the clan's chat in game. The most common use game developers look for and the most complex is to join the clan chat in game.
Related Components
Related Objects
Events
EventChatMessageRecieved
Called when a chat message has been received in a Steam group chat that we are in.
Its generally easier to use the Clan Chat Director than to manually listen on this event.
The handler for this event should look like this
You can learn more about ClanChatMsg in its article.
EventGameConnectedChatJoin
Called when a user has joined a Steam group chat that the we are in.
The handler for this event should look like this
EventGameConnectedChatLeave
Called when a user leaves a Steam group that we are in
The handler for this event should look like this
Fields and Attributes
JoinedChatRooms
This is provided for debugging purposes and generally shouldn't be used
Methods
JoinChatRoom
Joins the chat for a target clan
The callback for this method should look like this
LeaveChatRoom
Leaves a specific chat room
GetChatMemberByIndex
Gets the Steam ID at the given index in a Steam group chat.
GetActivityCounts
Gets the most recent information we have about what the users in a Steam Group are doing.
clan The group to get the activity for
online The number of members that are online
inGame The number of members that are in game
chatting The number of members that are in the chat group
GetClanByIndex
Gets the Steam group's Steam ID at the given index. Get the number of clans using the GetClanCount method.
Its generally simpler to just call GetClans() and return the whole array at once
GetClans
Get the list of clans the current user is a member of
GetChatMemberCount
Get the number of users in a Steam group chat.
GetChatMembers
Returns a list of the members of the given clans chat
Get the number of users in a Steam group chat. This is used for iteration, after calling this then GetChatMemberByIndex can be used to get the Steam ID of each person in the chat.
Large steam groups cannot be iterated by the local user.
GetChatMessage
You generally do not need to call this if your using the EventChatMessageReceievd or the ClanChatDirector.
This gets the data regarding a specific chat message in given clan chat room.
clanChat The ID of the group chat room to read
index The index of the message, this should be the m_iMessageID fireld of the callback if your using the raw API
type The type of chat entry that was received
chatter The ID of the user that caused the message
GetClanCount
Gets the number of Steam groups that the current user is a member of.
GetName
Gets the display name for the specified Steam group; if the local client knows about it.
GetOfficerByIndex
Gets the Steam ID of the officer at the given index in a Steam group.
GetOfficers
Gets the list of officers for the given clan.
GetOfficersCount
Gets the number of officers (administrators and moderators) in a specified Steam group. This also includes the owner of the Steam group. This is used for iteration, after calling this then GetClanOfficerByIndex can be used to get the Steam ID of each officer.
GetOwner
Gets the owner of a Steam Group.
GetTag
Gets the unique tag (abbreviation) for the specified Steam group; If the local client knows about it. The Steam group abbreviation is a unique way for people to identify the group and is limited to 12 characters.In some games this will appear next to the name of group members.
OpenChatWindowInSteam
Opens the specified Steam group chat room in the Steam UI.
SendChatMessage
Sends a message to a Steam group chat room.
IsClanChatAdmin
Is the indicated user a admin for this clan chat
IsClanPublic
IsClanOfficialGameGroup
Checks if the Steam group is an official game group/community hub.
IsClanChatWindowOpenInSteam
Checks if the Steam Group chat room is open in the Steam UI.
RequestClanOfficerList
CloseClanChatWindowInSteam
Closes the specified Steam group chat room in the Steam UI.
DownloadClanActivityCounts
Refresh the Steam Group activity data or get the data from groups other than one that the current user is a member.
How To
Create a Clan / Group
This cannot be done from within the Steam API at current you can however direct your player's to the appropriate location in Steam to create there own clans.
The above URL can be passed into the Steam Overlay
Get Clans / Groups
Return an array of the clans the user is a member of
The Clan object contains various helpful members such as Clan.Name, ClanOwner, Clan.JoinChat and more.
List Clan officers
Using the Clan object
Last updated