Functions For Servers

Here is a list of all the functions available in the GodotSteam Server module. Many will reference appID or steamID. AppID always references to a game, applications, or DLC's ID number in Steam. The steamID, however, can reference a user, lobby session, server, or such.


Core

serverInit(dictionary connectData, int serverMode, string versionString)

  • Initialize the server to Steam.
  • Returns a BOOL (true / false).

serverReleaseCurrentThreadMemory()

  • Frees all API-related memory associated with the calling thread. This memory is released automatically by RunCallbacks so single-threaded servers do not need to call this.
  • Returns nothing; VOID.

serverShutdown()

  • Shut down the server connection to Steam.
  • Returns nothing; VOID.

Apps

getDLCDataByIndex()

  • Returns metadata for a DLC by index.
  • Returns an ARRAY. Provides the following values, in order:
    • DLC's ID (int)
    • if available (bool)
    • name (string)

isAppInstalled(int value)

  • Check if given application/game is installed, not necessarily owned.
  • Returns a BOOL (true / false).

isCybercafe()

  • Checks whether the current App ID is for Cyber Cafes.
  • Returns a BOOL (true / false).

isDLCInstalled(int value)

  • Checks if the user owns a specific DLC and if the DLC is installed
  • Returns a BOOL (true / false).

isLowViolence()

  • Checks if the license owned by the user provides low violence depots.
  • Returns a BOOL (true / false).

isSubscribed()

  • Checks if the active user is subscribed to the current app ID.
  • Returns a BOOL (true / false).

isSubscribedApp(int value)

  • Checks if the active user is subscribed to a specified app ID.
  • Returns a BOOL (true / false).

isSubscribedFromFamilySharing()

  • Checks if the active user is accessing the current app ID via a temporary Family Shared license owned by another user. If you need to determine the Steam ID of the permanent owner of the license, use getAppOwner.
  • Returns a BOOL (true / false).

isSubscribedFromFreeWeekend()

  • Checks if the user is subscribed to the current app through a free weekend. This function will return false for users who have a retail or other type of license. Suggested you contact Valve on how to package and secure your free weekend properly.
  • Returns a BOOL (true / false).

isTimedTrial()

  • Check if game is a timed trial with limited playtime.
  • Returns a DICTIONARY. Provides the following keys, in order:
    • seconds_allowed (int)
    • seconds_played (int).

isVACBanned()

  • Checks if the user has a VAC ban on their account.
  • Returns a BOOL (true / false).

getAppBuildId()

  • Return the build ID for this app; will change based on backend updates.
  • Returns an INT.

getAppInstallDir(int appID)

  • Gets the install folder for a specific app ID.
  • Returns a STRING.

getAppOwner()

  • Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed.
  • Returns an INT.

getAvailableGameLanguages()

  • Gets a comma separated list of the languages the current app supports.
  • Returns a STRING.

getCurrentBetaName()

  • Checks if the user is running from a beta branch, and gets the name of the branch if they are.
  • Returns a STRING.

getCurrentGameLanguage()

  • Gets the current language that the user has set.
  • Returns a STRING.

getDLCCount()

  • Get the number of DLC the user owns for a parent application/game.
  • Returns an INT.

getDLCDownloadProgress(int appID)

  • Gets the download progress for optional DLC.
  • Returns a DICTIONARY. Provides the following keys, in order:
    • ret (bool) - Retrieval success, or not
    • downloaded (int)
    • total (int).

getEarliestPurchaseUnixTime(int value)

  • Gets the time of purchase of the specified app in Unix epoch format (time since Jan 1st, 1970).
  • Returns an INT.

getFileDetails(string filename)

  • Asynchronously retrieves metadata details about a specific file in the depot manifest.
  • Returns nothing; VOID. It will trigger a file_details_result callback.

getInstalledDepots(int appID)

  • Gets a list of all installed depots for a given app ID in mount order.
  • Returns an ARRAY. Provides the following values, in order:
    • the depots' IDs (int)

getLaunchCommandLine()

  • Gets the command line if the game was launched via Steam URL, e.g. steam://run/(appid)//(command line)/. This method is preferable to launching with a command line via the operating system, which can be a security risk. In order for rich presence joins to go through this and not be placed on the OS command line, you must enable "Use launch command line" from the Installation > General page on your app.
  • Returns a STRING.

getLaunchQueryParam(string key)

  • Gets the associated launch parameter if the game is run via steam://run//?param1=value1;param2=value2;param3=value3 etc.
  • Returns a STRING.

installDLC(int value)

  • Allows you to install an optional DLC.
  • Returns nothing; VOID. It will trigger a dlc_installed callback.

markContentCorrupt(bool missingFilesOnly)

  • Allows you to force verify game content on next launch.
  • Returns a BOOL (true / false).

uninstallDLC(int value)

  • Allows you to uninstall an optional DLC.
  • Returns nothing; VOID.

HTTP

createCookieContainer(bool allowResponsesToModify)

  • Creates a cookie container to store cookies during the lifetime of the process. This API is just for during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across repeat executions of your process.
  • Returns an INT.

createHTTPRequest(int requestMethod, string absoluteURL)

  • Initializes a new HTTP request. Don't forget to free the HTTP request when you're done with it to prevent leaking memory by calling ReleaseHTTPRequest!
  • Returns an INT.

deferHTTPRequest(int request)

  • Defers a request which has already been sent by moving it at the back of the queue.
  • Returns a BOOL (true / false).

getHTTPDownloadProgressPct(int request)

  • Gets progress on downloading the body for the request.
  • Returns a FLOAT.

getHTTPRequestWasTimedOut(int request)

  • Check if the reason the request failed was because we timed it out (rather than some harder failure).
  • Returns a BOOL (true / false).

getHTTPResponseBodyData(int request, int bufferSize)

  • Gets the body data from an HTTP response.
  • Returns an INT.

getHTTPResponseBodySize(int request)

  • Gets the size of the body data from an HTTP response.
  • Returns an INT.

getHTTPResponseHeaderSize(int request, string headerName)

  • Checks if a header is present in an HTTP response and returns its size.
  • Returns an INT.

getHTTPResponseHeaderValue(int request, string headerName, int bufferSize)

  • Gets a header value from an HTTP response.
  • Returns an INT.

getHTTPStreamingResponseBodyData(int request, int offset, int bufferSize)

  • Gets the body data from a streaming HTTP response.
  • Returns an INT.

prioritizeHTTPRequest(int request)

  • Prioritizes a request which has already been sent by moving it at the front of the queue.
  • Returns a BOOL (true / false).

releaseCookieContainer(int cookieHandle)

  • Releases a cookie container, freeing the memory allocated within Steam.
  • Returns a BOOL (true / false).

releaseHTTPRequest(int request)

  • Releases an HTTP request handle, freeing the memory allocated within Steam.
  • Returns a BOOL (true / false).

sendHTTPRequest(int request)

  • Sends an HTTP request.
  • Returns a BOOL (true / false).

sendHTTPRequestAndStreamResponse(int request)

  • Sends an HTTP request and streams the response back in chunks.
  • Returns a BOOL (true / false).

setCookie(string host, string url, string cookie, int cookieHandle)

  • Adds a cookie to the specified cookie container that will be used with future requests.
  • Returns a BOOL (true / false).

setHTTPRequestAbsoluteTimeoutMS(int request, int milliseconds)

  • Set an absolute timeout in milliseconds for the HTTP request. This is the total time timeout which is different than the network activity timeout which is set with SetHTTPRequestNetworkActivityTimeout which can bump everytime we get more data.
  • Returns a BOOL (true / false).

setHTTPRequestContextValue(int request, int contextValue)

  • Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. Must be called before sending the request.
  • Returns a BOOL (true / false).

setHTTPRequestCookieContainer(int request, int cookieHandle)

  • Associates a cookie container to use for an HTTP request.
  • Returns a BOOL (true / false).

setHTTPRequestGetOrPostParameter(int request, string name, string value)

  • Set a GET or POST parameter value on the HTTP request. Must be called prior to sending the request.
  • Returns a BOOL (true / false).

setHTTPRequestHeaderValue(int request, string headerName, string headerValue)

  • Set a request header value for the HTTP request. Must be called before sending the request.
  • Returns a BOOL (true / false).

setHTTPRequestNetworkActivityTimeout(int request, int timeoutSeconds)

  • Set the timeout in seconds for the HTTP request.
  • Returns a BOOL (true / false).

setHTTPRequestRawPostBody(int request, string contentType, int bodyLen)

  • Sets the body for an HTTP Post request.
  • Returns an INT.

setHTTPRequestRequiresVerifiedCertificate(int request, bool requireVerifiedCertificate)

  • Sets that the HTTPS request should require verified SSL certificate via machines certificate trust store. This currently only works Windows and macOS.
  • Returns a BOOL (true / false).

setHTTPRequestUserAgentInfo(int request, string userAgentInfo)

  • Set additional user agent info for a request.
  • Returns a BOOL (true / false).

Inventory

Important note for the Inventory class: when dealing with any inventory handles, you should call CheckResultSteamID on the result handle when it completes to verify that a remote player is not pretending to have a different user's inventory. Also, you must call DestroyResult on the provided inventory result when you are done with it.

addPromoItem(int item)

  • Grant a specific one-time promotional item to the current user.
  • Returns a BOOL (true / false).

addPromoItems(PoolIntArray items)

  • Grant a specific one-time promotional items to the current user.
  • Returns a BOOL (true / false).

checkResultSteamID(int steamIDExpected)

  • Checks whether an inventory result handle belongs to the specified Steam ID.
  • Returns a BOOL (true / false).

consumeItem(int itemConsume, int quantity)

  • Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed.
  • Returns a BOOL (true / false).

deserializeResult()

  • Deserializes a result set and verifies the signature bytes.
  • Returns a BOOL (true / false).

destroyResult()

  • Destroys a result handle and frees all associated memory.
  • Returns nothing; VOID.

exchangeItems(PoolIntArray outputItems, int outputQuantity, int inputItems, int inputQuantity)

  • Grant one item in exchange for a set of other items.
  • Returns a BOOL (true / false).

generateItems(PoolIntArray items, int quantity)

  • Grants specific items to the current user, for developers only.
  • Returns a BOOL (true / false).

getAllItems()

  • Start retrieving all items in the current users inventory.
  • Returns a BOOL (true / false).

getItemDefinitionProperty(int definition, string name)

  • Gets a string property from the specified item definition. Gets a property value for a specific item definition.
  • Returns a STRING.

getItemsByID(int idArray, int count)

  • Gets the state of a subset of the current user's inventory.
  • Returns a BOOL (true / false).

getItemPrice(int definition)

  • After a successful call to RequestPrices, you can call this method to get the pricing for a specific item definition.
  • Returns an INT.

getItemsWithPrices(int length)

  • After a successful call to RequestPrices, you can call this method to get all the pricing for applicable item definitions. Use the result of GetNumItemsWithPrices as the the size of the arrays that you pass in.
  • Returns an ARRAY. Provides a list of dictionaries, one per item, containing:
    • item (int) - the item's Steam ID
    • price (int)
    • base_prices (int)

getNumItemsWithPrices()

  • After a successful call to RequestPrices, this will return the number of item definitions with valid pricing.
  • Returns an INT.

getResultItemProperty(int index, string name)

  • Gets the dynamic properties from an item in an inventory result set.
  • Returns a STRING.

getResultItems()

  • Get the items associated with an inventory result handle.
  • Returns an ARRAY. Provides the following values, in order:
    • items (int)

getResultStatus()

  • Find out the status of an asynchronous inventory result handle.
  • Returns a STRING.

grantPromoItems()

  • Grant all potential one-time promotional items to the current user.
  • Returns a BOOL (true / false).

loadItemDefinitions()

  • Triggers an asynchronous load and refresh of item definitions.
  • Returns a BOOL (true / false).

requestEligiblePromoItemDefinitionsIDs(int steamID)

  • Request the list of "eligible" promo items that can be manually granted to the given user.
  • Returns nothing; VOID. It will trigger a inventory_eligible_promo_item call result.

requestPrices()

  • Request prices for all item definitions that can be purchased in the user's local currency. A SteamInventoryRequestPricesResult_t call result will be returned with the user's local currency code. After that, you can call GetNumItemsWithPrices and GetItemsWithPrices to get prices for all the known item definitions, or GetItemPrice for a specific item definition.
  • Returns nothing; VOID. It will trigger a inventory_request_prices_result call result.

    serializeResult()

  • Serialized result sets contain a short signature which can't be forged or replayed across different game sessions.
  • Returns a BOOL (true / false).

transferItemQuantity(int itemID, int quantity, int itemDestination, bool split)

  • Transfer items between stacks within a user's inventory.
  • Returns a BOOL (true / false).

triggerItemDrop(int definition)

  • Trigger an item drop if the user has played a long enough period of time.
  • Returns a BOOL (true / false).

startUpdateProperties()

  • Starts a transaction request to update dynamic properties on items for the current user. This call is rate-limited by user, so property modifications should be batched as much as possible (e.g. at the end of a map or game session). After calling SetProperty or RemoveProperty for all the items that you want to modify, you will need to call SubmitUpdateProperties to send the request to the Steam servers. A SteamInventoryResultReady_t callback will be fired with the results of the operation.
  • Returns nothing; VOID. It will trigger a inventory_result_ready callback.

submitUpdateProperties()

  • Submits the transaction request to modify dynamic properties on items for the current user. See StartUpdateProperties.
  • Returns a BOOL (true / false).

removeProperty(int itemID, string name)

  • Removes a dynamic property for the given item.
  • Returns a BOOL (true / false).

setPropertyString(int itemID, string name, string value)

  • Sets a dynamic property for the given item. Supported value types are strings.
  • Returns a BOOL (true / false).

setPropertyBool(int itemID, string name, bool value)

  • Sets a dynamic property for the given item. Supported value types are boolean.
  • Returns a BOOL (true / false).

setPropertyInt(int itemID, string name, int value)

  • Sets a dynamic property for the given item. Supported value types are 64 bit integers.
  • Returns a BOOL (true / false).

setPropertyFloat(int itemID, string name, float value)

  • Sets a dynamic property for the given item. Supported value types are 32 bit floats.
  • Returns a BOOL (true / false).

Networking

acceptP2PSessionWithUser(int steamIDRemote)

  • This allows the game to specify accept an incoming packet.
  • Returns a BOOL (true / false).

allowP2PPacketRelay(bool allow)

  • Allow or disallow P2P connections to fall back to being relayed through the Steam servers if a direct connection or NAT-traversal cannot be established.
  • Returns a BOOL (true / false).

closeP2PChannelWithUser(int steamIDRemote, int channel)

  • Closes a P2P channel when you're done talking to a user on the specific channel.
  • Returns a BOOL (true / false).

closeP2PSessionWithUser(int steamIDRemote)

  • This should be called when you're done communicating with a user, as this will free up all of the resources allocated for the connection under-the-hood.
  • Returns a BOOL (true / false).

getP2PSessionState(int steamIDRemote)

  • Fills out a P2PSessionState_t structure with details about the connection like whether or not there is an active connection.
  • Returns a DICTIONARY. Provides these keys, in order:
    • connection_active (bool) - True if we've got an active open connection
    • connecting (bool) - True if we're currently trying to establish a connection
    • session_error (int) - Last error recorded (see enums in isteamnetworking.h)
    • using_relay(bool) - True if it's going through a relay server (TURN)
    • bytes_queued_for_send (int)
    • packets_queued_for_send (int)
    • remote_ip (int) - Potential IP:Port of remote host. Could be TURN server
    • remote_port (int) - Only exists for compatibility with older auth API's

readP2PPacket(int packet, int channel)

  • Reads in a packet that has been sent from another user via SendP2PPacket.
  • Returns a DICTIONARY. Provides these keys, in order:
    • data (PoolByteArray)
    • steamIDRemote (int) - The sender's Steam ID

sendP2PPacket(int steamIDRemote, PoolByteArray data, int sendType, int channel)

  • Sends a P2P packet to the specified user.
  • Returns a BOOL (true / false).

Server

initGameServer(dictionary connectData, int serverMode, string versionString)

  • NOTE: The following, if set, must be set before calling LogOn; they may not be changed after.
  • This is called by SteamGameServer_Init and will usually not need to be called directly.
  • Returns a BOOL (true / false).

setGameDescription(string description)

  • Description of the game; required field and is displayed in the Steam server browser.
  • Returns nothing; VOID.

setModDir(string modDir)

  • If your game is a mod, pass the string that identifies it. Default is empty meaning the app is the original game.
  • Returns nothing; VOID.

setDedicatedServer(bool dedicated)

  • Is this a dedicated server? Default is false.
  • Returns nothing; VOID.

logOn(string token)

  • Begin process to login to a persistent game server account. You need to register for callbacks to determine the result of this operation.
  • Returns nothing; VOID. This will trigger a server_connect_failure, server_connected, and server_disconnected callbacks.

logOnAnonymous()

  • Login to a generic, anonymous account.
  • Returns nothing; VOID. This will trigger a server_connect_failure, server_connected, and server_disconnected callbacks.

logOff()

  • Begin process of logging game server out of Steam.
  • Returns nothing; VOID. This will trigger a server_connect_failure, server_connected, and server_disconnected callbacks.

loggedOn()

  • Status functions.
  • Returns a BOOL (true / false).

secure()

  • Checks whether the game server is in "Secure" mode.
  • Returns a BOOL (true / false).

getSteamID()

  • Gets the Steam ID of the game server.
  • Returns an INT.

wasRestartRequested()

  • Returns true if the master server has requested a restart. Only returns true once per request.
  • Returns a BOOL (true / false).

NOTE: These are server state functions and can be changed at any time.

setMaxPlayerCount(int max)

  • Max player count that will be reported to server browser and client queries.

setBotPlayerCount(int bots)

  • Number of bots. Default is zero.
  • Returns nothing; VOID.

setServerName(string name)

  • Set the naem of the server as it will appear in the server browser.
  • Returns nothing; VOID.

setMapName(string map)

  • Set name of map to report in server browser.
  • Returns nothing; VOID.

setPasswordProtected(bool password)

  • Let people know if your server requires a password.
  • Returns nothing; VOID.

setSpectatorPort(int port)

  • Spectator server. Default is zero, meaning it is now used.
  • Returns nothing; VOID.

setSpectatorServerName(string name)

  • Name of spectator server. Only used if spectator port is non-zero.
  • Returns nothing; VOID.

clearAllKeyValues()

  • Call this to clear the whole list of key/values that are sent in rule queries.
  • Returns nothing; VOID.

setKeyValue(string key, string value)

  • Call this to add/update a key/value pair.
  • Returns nothing; VOID.

setGameTags(string tags)

  • Set a string defining game tags for this server; optional. Allows users to filter in matchmaking/server browser.
  • Returns nothing; VOID.

setGameData(string data)

  • Set a string defining game data for this server; optional. Allows users to filter in matchmaking/server browser.
  • Returns nothing; VOID.

setRegion(string region)

  • Region identifier; optional. Default is empty meaning 'world'.
  • Returns nothing; VOID.

NOTE: These functions are player list management / authentication.

getAuthSessionTicket()

  • Retrieve ticket to be sent to the entity who wishes to authenticate you (using BeginAuthSession API).
  • Returns an INT.

beginAuthSession(int authTicket, int steamID)

  • Authenticate the ticket from the entity Steam ID to be sure it is valid and isn't reused.
  • Returns an INT.

endAuthSession(int steamID)

  • Stop tracking started by beginAuthSession; called when no longer playing game with this entity.
  • Returns nothing; VOID.

cancelAuthTicket(int authTicket)

  • Cancel auth ticket from getAuthSessionTicket; called when no longer playing game with the entity you gave the ticket to.
  • Returns nothing; VOID.

userHasLicenceForApp(int steamID, AppId_t appID)

  • After receiving a user's authentication data, and passing it to sendUserConnectAndAuthenticate, use to determine if user owns DLC
  • Returns an INT.

requestUserGroupStatus(int steamID, int groupID)

  • Ask if user is in specified group; results returned by GSUserGroupStatus_t.
  • BOOL. This will also trigger a client_Group_Status callback.

NOTE: These are in GameSocketShare mode, where instead of ISteamGameServer creating sockets to talk to master server, it lets the game use its socket to forward messages back and forth.

handleIncomingPacket(int packet, string ip, int port)

  • These are used when you've elected to multiplex the game server's UDP socket rather than having the master server updater use its own sockets.
  • Returns a DICTIONARY. Provides these keys, in order:
    • data (PoolByteArray)

setHeartbeatInterval(int interval)

  • You usually don't need to modify this. Pass -1 to use the default value for iHeartbeatInterval. Some mods change this.
  • Returns nothing; VOID.

forceHeartbeat()

  • Force a heartbeat to Steam at next opportunity.
  • Returns nothing; VOID.

associateWithClan(int clanID)

  • Associate this game server with this clan for the purposes of computing player compatibility.
  • Returns nothing; VOID. This will trigger a associate_Clan callback.

computeNewPlayerCompatibility(int steamID)

  • Ask if any of the current players dont want to play with this new player - or vice versa.
  • Returns nothing; VOID. This will trigger a player_Compat callback.

Server Stats

clearUserAchievement(int steamID, string name)

  • Resets the unlock status of an achievement for the specified user.
  • Returns a BOOL (true / false).

getUserAchievement(int steamID, string name)

  • Gets the unlock status of the achievement.
  • Returns a DICTIONARY. Provides these keys, in order:
    • result (bool)
    • user (int)
    • name (string)
    • unlocked (bool

getUserStatFloat(int steamID, string name)

  • Gets the current value of the a stat for the specified user.
  • Returns a FLOAT.

requestUserStats(int steamID)

  • Asynchronously downloads stats and achievements for the specified user from the server.
  • Returns nothing; VOID. This will trigger a stat_received call result.

setUserAchievement(int steamID, string name)

  • Unlocks an achievement for the specified user.
  • Returns a BOOL (true / false).

setUserStatInt(int steamID, string name, int stat)

  • Sets / updates the value of a given stat for the specified user.
  • Returns a BOOL (true / false).

setUserStatFloat(int steamID, string name, float stat)

  • Sets / updates the value of a given stat for the specified user.
  • Returns a BOOL (true / false).

storeUserStats(int steamID)

  • Send the changed stats and achievements data to the server for permanent storage for the specified user.
  • Returns nothing; VOID. This will trigger a stats_stored callback.

updateUserAvgRateStat(int steamID, string name, float thisSession, double sessionLength)

  • Updates an AVGRATE stat with new values for the specified user.
  • Returns a BOOL (true / false).

UGC

addAppDependency(int publishedFileID, int appID)

  • Adds a dependency between the given item and the appid. This list of dependencies can be retrieved by calling GetAppDependencies. This is a soft-dependency that is displayed on the web. It is up to the application to determine whether the item can actually be used or not.
  • Returns nothing; VOID. This will trigger a add_app_dependency_result call result.

addDependency(int publishedFileID, int childPublishedFileID)

  • Adds a workshop item as a dependency to the specified item. If the nParentPublishedFileID item is of type k_EWorkshopFileTypeCollection, than the nChildPublishedFileID is simply added to that collection. Otherwise, the dependency is a soft one that is displayed on the web and can be retrieved via the ISteamUGC API using a combination of the m_unNumChildren member variable of the SteamUGCDetails_t struct and GetQueryUGCChildren.
  • Returns nothing; VOID. This will trigger a add_ugc_dependency_result call result.

addExcludedTag(int queryHandle, string tagName)

  • Adds a excluded tag to a pending UGC Query. This will only return UGC without the specified tag.
  • Returns a BOOL (true / false).

addItemKeyValueTag(int updateHandle, string key, string value)

  • Adds a key-value tag pair to an item. Keys can map to multiple different values (1-to-many relationship).
  • Returns a BOOL (true / false).

addItemPreviewFile(int queryHandle, string previewFile, int type)

  • Adds an additional preview file for the item.
  • Returns a BOOL (true / false).

addItemToFavorite(int appID, int publishedFileID)

  • Adds a workshop item to the users favorites list.
  • Returns nothing; VOID. This will trigger a user_favorite_items_list_changed call result.

setItemDescription(int updateHandle, string description)

  • Sets a new description for an item.
  • Returns a BOOL (true / false).

setItemMetadata(int updateHandle, string metadata)

  • Sets arbitrary metadata for an item. This metadata can be returned from queries without having to download and install the actual content.
  • Returns a BOOL (true / false).

setItemPreview(int updateHandle, string previewFile)

  • Sets the primary preview image for the item.
  • Returns a BOOL (true / false).

setItemTags(int updateHandle, array tagArray)

  • Sets arbitrary developer specified tags on an item.
  • Returns a BOOL (true / false).

setItemTitle(int updateHandle, string title)

  • Sets a new title for an item.
  • Returns a BOOL (true / false).

setItemUpdateLanguage(int updateHandle, string language)

  • Sets the language of the title and description that will be set in this item update.
  • Returns a BOOL (true / false).

setItemVisibility(int updateHandle, int visibility)

  • Sets the visibility of an item.
  • Returns a BOOL (true / false).

setLanguage(int queryHandle, string language)

  • Sets the language to return the title and description in for the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setMatchAnyTag(int queryHandle, bool matchAnyTag)

  • Sets whether workshop items will be returned if they have one or more matching tag, or if all tags need to match on a pending UGC Query.
  • Returns a BOOL (true / false).

setRankedByTrendDays(int queryHandle, int days)

  • Sets whether the order of the results will be updated based on the rank of items over a number of days on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnAdditionalPreviews(int queryHandle, bool returnAdditionalPreviews)

  • Sets whether to return any additional images/videos attached to the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnChildren(int queryHandle, bool returnChildren)

  • Sets whether to return the IDs of the child items of the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnKeyValueTags(int queryHandle, bool returnKeyValueTags)

  • Sets whether to return any key-value tags for the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnLongDescription(int queryHandle, bool returnLongDescription)

  • Sets whether to return the full description for the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnMetadata(int queryHandle, bool returnMetadata)

  • Sets whether to return the developer specified metadata for the items on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnOnlyIDs(int queryHandle, bool returnOnlyIDs)

  • Sets whether to only return IDs instead of all the details on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnPlaytimeStats(int queryHandle, int days)

  • Sets whether to return the the playtime stats on a pending UGC Query.
  • Returns a BOOL (true / false).

setReturnTotalOnly(int queryHandle, bool returnTotalOnly)

  • Sets whether to only return the the total number of matching items on a pending UGC Query.
  • Returns a BOOL (true / false).

setSearchText(int queryHandle, string searchText)

  • Sets a string to that items need to match in either the title or the description on a pending UGC Query.
  • Returns a BOOL (true / false).

setUserItemVote(int publishedFileID, bool voteUp)

  • Allows the user to rate a workshop item up or down.
  • Returns nothing; VOID. This will trigger a set_user_item_vote call result.

startItemUpdate(int appID, int publishedFileID)

  • Starts the item update process.
  • Returns an INT.

startPlaytimeTracking(array publishedFileIDs)

  • Start tracking playtime on a set of workshop items.
  • Returns nothing; VOID. This will trigger a start_playtime_tracking call result.

stopPlaytimeTracking(array publishedFileIDs)

  • Stop tracking playtime on a set of workshop items.
  • Returns nothing; VOID. This will trigger a stop_playtime_tracking call result.

stopPlaytimeTrackingForAllItems()

  • Stop tracking playtime of all workshop items.
  • Returns nothing; VOID. This will trigger a stop_playtime_tracking call result.

getAppDependencies(int publishedFileID)

  • Returns any app dependencies that are associated with the given item.
  • Returns nothing; VOID. This will trigger a get_app_dependencies_result call result.

submitItemUpdate(int updateHandle, string changeNote)

  • Uploads the changes made to an item to the Steam Workshop; to be called after setting your changes.
  • Returns nothing; VOID. This will trigger a item_updated call result.

subscribeItem(int publishedFileID)

  • Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
  • Returns nothing; VOID. This will trigger a subscribe_item call result.

suspendDownloads(bool suspend)

  • SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends.
  • Returns nothing; VOID.

unsubscribeItem(int publishedFileID)

  • Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
  • Returns nothing; VOID. This will trigger a unsubscribe_item call result.

updateItemPreviewFile(int updateHandle, int index, string previewFile)

  • Updates an existing additional preview file for the item.
  • Returns a BOOL (true / false).

updateItemPreviewVideo(int updateHandle, int index, string videoID)

  • Updates an additional video preview from YouTube for the item.
  • Returns a BOOL (true / false).

Utils

filterText(int context, int steamID, string message)

  • Filters the provided input message and places the filtered result into pchOutFilteredText.
  • Returns a STRING.

getAPICallFailureReason()

  • Used to get the failure reason of a call result. The primary usage for this function is debugging. The failure reasons are typically out of your control and tend to not be very important. Just keep retrying your API Call until it works.
  • Returns a STRING.

getAppID()

  • Get the Steam ID of the running application/game.
  • Returns an INT.

getCurrentBatteryPower()

  • Get the amount of battery power, clearly for laptops.
  • Returns an INT.

getImageRGBA(int image)

  • Gets the image bytes from an image handle.
  • Returns a DICTIONARY. Provides these keys, in order:
    • buffer (PoolByteArray)
    • success (bool)

getImageSize(int image)

  • Gets the size of a Steam image handle.
  • Returns a DICTIONARY. Provides these keys, in order:
    • width (int)
    • height (int)

getIPCCallCount()

  • Returns the number of IPC calls made since the last time this function was called.
  • Returns an INT.

getIPCountry()

  • Get the user's country by IP.
  • Returns a STRING.

getSecondsSinceAppActive()

  • Return amount of time, in seconds, user has spent in this session.
  • Returns an INT.

getSecondsSinceComputerActive()

  • Returns the number of seconds since the user last moved the mouse.
  • Returns an INT.

getServerRealTime()

  • Get the actual time.
  • Returns an INT.

getSteamUILanguage()

  • Get the Steam user interface language.
  • Returns a STRING.

initFilterText()

  • Initializes text filtering. Returns false if filtering is unavailable for the language the user is currently running in. If the language is unsupported, the FilterText API will act as a passthrough.
  • Returns a BOOL (true / false).

isAPICallCompleted()

  • Checks if an API Call is completed. Provides the backend of the CallResult wrapper.
  • Returns a DICTIONARY. Provides the following keys, in order:
    • ccompleted (bool)
    • failed (bool)

isSteamChinaLauncher()

  • Returns whether the current launcher is a Steam China launcher. You can cause the client to behave as the Steam China launcher by adding -dev -steamchina to the command line when running Steam.
  • Returns a BOOL (true / false).

isSteamInBigPictureMode()

  • Returns true if Steam & the Steam Overlay are running in Big Picture mode.
  • Returns a BOOL (true / false).

isSteamRunningInVR()

  • Is Steam running in VR?
  • Returns a BOOL (true / false).

isVRHeadsetStreamingEnabled()

  • Checks if the HMD view will be streamed via Steam In-Home Streaming.
  • Returns a BOOL (true / false).

overlayNeedsPresent()

  • Checks if the overlay needs a present. Only required if using event driven render updates.
  • Returns a BOOL (true / false).

setOverlayNotificationInset(int horizontal, int vertical)

  • Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.
  • Returns nothing; VOID.

setOverlayNotificationPosition(int pos)

  • Set the position where overlay shows notifications.
  • Returns nothing; VOID.

setVRHeadsetStreamingEnabled(bool enabled)

  • Set whether the HMD content will be streamed via Steam In-Home Streaming.
  • Returns nothing; VOID.

showGamepadTextInput(int inputMode, int lineInputMode, string description, int maxText, string presetText)

  • Activates the Big Picture text input dialog which only supports gamepad input.
  • Returns a BOOL (true / false).