Functions | UGC

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.


addAppDependency( int published_file_id, int app_id ) addAppDependency( uint64_t published_file_id, uint32_t app_id )

  • 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.
  • Triggers a add_app_dependency_result callback.
  • Returns nothing; void.

addDependency( int published_file_id, int child_published_file_id )

  • Adds a workshop item as a dependency to the specified item. If the published_file_id item is of type k_EWorkshopFileTypeCollection (2), than the child_published_file_id 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 numChildren key returned from getQueryUGCResult and getQueryUGCChildren.
  • Triggers a add_ugc_dependency_result callback.
  • Returns nothing; void.

addExcludedTag( int query_handle, string tag_name ) addExcludedTag( uint64_t query_handle, string tag_name )

  • Adds a excluded tag to a pending UGC Query. This will only return UGC without the specified tag.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

addItemKeyValueTag( int update_handle, string key, string value ) addItemKeyValueTag( uint64_t update_handle, string key, string value )

  • Adds a key-value tag pair to an item. Keys can map to multiple different values (1-to-many relationship).
  • Key names are restricted to alpha-numeric characters and the '_' character.
  • Both keys and values cannot exceed 255 characters in length.
  • Key-value tags are searchable by exact match only.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

addItemPreviewFile( int query_handle, string preview_file, int type ) addItemPreviewFile( uint64_t query_handle, string preview_file, int type )

  • Adds an additional preview file for the item.
  • Then the format of the image should be one that both the web and the application (if necessary) can render, and must be under 1MB. Suggested formats include JPG, PNG and GIF.
  • Note: Using 1 or 2 in type are not currently supported with this API. For YouTube videos you should use addItemPreviewVideo.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

addItemPreviewVideo( int query_handle, string video_id ) addItemPreviewVideo( uint64_t query_handle, string video_id )

  • Adds an additional video preview from YouTube for the item.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

addItemToFavorites( int app_id, int published_file_id ) addItemToFavorites( uint32_t app_id, uint64_t published_file_id )

  • Adds a workshop item to the users favorites list.
  • Triggers a user_favorite_items_list_changed callback.
  • Returns nothing; void.

addRequiredKeyValueTag( int query_handle, string key, string value ) addRequiredKeyValueTag( uint64_t query_handle, string key, string value )

  • Adds a required key-value tag to a pending UGC Query. This will only return workshop items that have a key and a value.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

addRequiredTag( int query_handle, string tag_name ) addRequiredTag( uint64_t query_handle, string tag_name )

  • Adds a required tag to a pending UGC Query. This will only return UGC with the specified tag.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

addRequiredTagGroup( int query_handle, array tag_array ) addRequiredTagGroup( uint64_t query_handle, array tag_array )

  • Adds the requirement that the returned items from the pending UGC Query have at least one of the tags in the given set (logical "or"). For each tag group that is added, at least one tag from each group is required to be on the matching items.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

initWorkshopForGameServer( int workshop_depot_id ) initWorkshopForGameServer( uint32_t workshop_depot_id )

  • Lets game servers set a specific workshop folder before issuing any UGC commands.
  • This is helpful if you want to support multiple game servers running out of the same install folder.
  • Returns a bool.

createItem( int app_id, int file_type ) createItem( uint32 app_id, int file_type )

  • Creates a new workshop item with no content attached yet.
  • Triggers a item_created callback.
  • Returns nothing; void.

createQueryAllUGCRequest( int query_type, int matching_type, int creator_id, int consumer_id, int page ) createQueryAllUGCRequest( int query_type, int matching_type, uint32_t creator_id, uint32_t consumer_id, int page )

  • Query for all matching UGC. You can use this to list all of the available UGC for your app.
  • This will return up to 50 results. You can make subsequent calls to this function, increasing the page each time to get the next set of results.
  • Note: Either consumer_id or creator_id must have a valid app ID.
  • Note: You must release the handle returned by this function by calling releaseQueryUGCRequest when you are done with it.
  • To query for the UGC associated with a single user you can use createQueryUserUGCRequest instead.
  • Returns an int. Returns a uint64_t.

createQueryUGCDetailsRequest( array published_file_ids )

  • Query for the details of specific workshop items.
  • This will return up to 50 results.
  • Note: Either consumer_id or creator_id must have a valid app ID.
  • Note: You must release the handle returned by this function by calling releaseQueryUGCRequest when you are done with it.
  • To query all the UGC for your app you can use createQueryAllUGCRequest instead.
  • Returns an int. Returns a uint64_t.

createQueryUserUGCRequest( int steam_id, int list_type, int matching_ugc_type, int sort_order, int creator_id, int consumer_id, int page ) createQueryUserUGCRequest( uint64_t steam_id, int list_type, int matching_ugc_type, int sort_order, uint32_t creator_id, uint32_t consumer_id, int page )

  • Query UGC associated with a user. You can use this to list the UGC the user is subscribed to amongst other things.
  • This will return up to 50 results.
  • Note: Either consumer_id or creator_id must have a valid app ID.
  • Note: You must release the handle returned by this function by calling releaseQueryUGCRequest when you are done with it.
  • To query all the UGC for your app you can use createQueryAllUGCRequest instead.
  • Returns an int. Returns a uint64_t.

deleteItem( int published_file_id ) deleteItem( uint64_t published_file_id )

  • Deletes the item without prompting the user.
  • Triggers a item_deleted callback.
  • Returns nothing; void.

downloadItem( int published_file_id, bool high_priority ) downloadItem( uint64_t published_file_id, bool high_priority )

  • Download new or update already installed item.
  • If the return value is true then register and wait for the callback item_downloaded before calling getItemInstallInfo or accessing the workshop item on disk.
  • If the user is not subscribed to the item (e.g. a Game Server using anonymous login), the workshop item will be downloaded and cached temporarily.
  • If the workshop item has an item state of 8, then this function can be called to initiate the update. Do not access the workshop item on disk until the callback item_downloaded is called.
  • Returns a bool.

getAppDependencies( int published_file_id ) getAppDependencies( uint64_t published_file_id )

  • Get the app dependencies associated with the given published_file_id. These are "soft" dependencies that are shown on the web. It is up to the application to determine whether an item can be used or not.
  • Triggers a get_app_dependencies_result callback.
  • Returns nothing; void.

getItemDownloadInfo( int file_id ) getItemDownloadInfo( uint64_t file_id )

  • Get info about a pending download of a workshop item that has 8 set.
  • Returns a dictionary:
    • ret (bool)
    • downloaded (int)
    • total (int)
    • ret (bool)
    • downloaded (uint64_t)
    • total (uint64_t)

getItemInstallInfo( int file_id ) getItemInstallInfo( uint64_t file_id )

  • Gets info about currently installed content on the disc for workshop items that have k_EItemStateInstalled (4) set.
  • Calling this sets the "used" flag on the workshop item for the current player and adds it to their k_EUserUGCList_UsedOrPlayed (7) list.
  • If k_EItemStateLegacyItem (2) is set then folder contains the path to the legacy file itself, not a folder.
  • Returns a dictionary:
    • ret (bool)
    • size (int)
    • folder (string)
    • folder_size (int)
    • timestamp (int)
    • ret (bool)
    • size (int)
    • folder (string)
    • folder_size (uint32)
    • timestamp (uint32)

getItemState( int published_file_id ) getItemState( uint64_t published_file_id )

  • Gets the current state of a workshop item on this client.
  • Returns an int: Returns a uint32:
    • 0 - None
    • 1 - Subscribed
    • 2 - Legacy
    • 4 - Installed
    • 8 - Update
    • 16 - Downloading
    • 32 - Pending

getItemUpdateProgress( int update_handle ) getItemUpdateProgress( uint64_t update_handle )

  • Gets the progress of an item update.
  • Returns a dictionary:
    • status (int)
    • processed (int)
    • total (int)
    • status (int)
    • processed (uint64)
    • total (uint64)

getNumSubscribedItems()

  • Gets the total number of items the current user is subscribed to for the game or application.
  • Returns an int. Returns a uint32.

getQueryUGCAdditionalPreview( int query_handle, int index, int preview_index ) getQueryUGCAdditionalPreview( uint64_t query_handle, uint32 index, uint32 preview_index )

  • Retrieve the details of an additional preview associated with an individual workshop item after receiving a querying UGC call result.
  • You should call this in a loop to get the details of all the workshop items returned.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Before calling this you should call getQueryUGCNumAdditionalPreviews to get number of additional previews.
  • Returns a dictionary:
    • success (bool)
    • handle (int)
    • index (int)
    • preview (int)
    • url_or_video (string)
    • filename (string)
    • type (int)
    • success (bool)
    • handle (uint64_t)
    • index (uint32)
    • preview (uint32)
    • url_or_video (string)
    • filename (string)
    • type (int)

getQueryUGCChildren( int query_handle, int index, int child_count ) getQueryUGCChildren( uint64_t query_handle, uint32 index, int32_t child_count )

  • Retrieve the IDs of any child items of an individual workshop item after receiving a querying UGC call result. These items can either be a part of a collection or some other dependency (see addDependency).
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • You should create published_file_id with num_children provided in returned dictionary after getting the UGC details with getQueryUGCResult.
  • Returns a dictionary:
    • success (bool)
    • handle (int)
    • index (int)
    • children (int)
    • success (bool)
    • handle (uint64_t)
    • index (uint32)
    • children (uint64_t)

getQueryUGCKeyValueTag( int query_handle, int index, int key_value_tag_index ) getQueryUGCKeyValueTag( uint64_t query_handle, uint32 index, uint32 key_value_tag_index )

  • Retrieve the details of a key-value tag associated with an individual workshop item after receiving a querying UGC call result.
  • You should call this in a loop to get the details of all the workshop items returned.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Before calling this you should call getQueryUGCNumKeyValueTags to get number of tags.
  • Returns a dictionary:
    • success (bool)
    • handle (int)
    • index (int)
    • tag (int)
    • key (string)
    • value (string)
    • success (bool)
    • handle (uint64_t)
    • index (uint32)
    • tag (uint32)
    • key (string)
    • value (string)

getQueryUGCMetadata( int query_handle, int index ) getQueryUGCMetadata( uint64_t query_handle, uint32 index )

  • Retrieve the developer set metadata of an individual workshop item after receiving a querying UGC call result.
  • You should call this in a loop to get the details of all the workshop items returned.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Returns a string.

getQueryUGCNumAdditionalPreviews( int query_handle, int index ) getQueryUGCNumAdditionalPreviews( uint64_t query_handle, uint32 index )

  • Retrieve the number of additional previews of an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • You can then call getQueryUGCAdditionalPreview to get the details of each additional preview.
  • Returns an int. Returns a uint32.

getQueryUGCNumKeyValueTags( int query_handle, int index ) getQueryUGCNumKeyValueTags( uint64_t query_handle, uint32 index )

  • Retrieve the number of key-value tags of an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • You can then call getQueryUGCKeyValueTag to get the details of each tag.
  • Returns an int. Returns a uint32.

getQueryUGCNumTags( int query_handle, int index ) getQueryUGCNumTags( uint64_t query_handle, uint32 index )

  • Available in SDK v1.51.
  • Retrieve the number of tags for an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • You can then call getQueryUGCTag to get the tag name or getQueryUGCTagDisplayName to get the localized tag string (if any).
  • Returns an int. Returns a uint32.

getQueryUGCPreviewURL( int query_handle, int index ) getQueryUGCPreviewURL( uint64_t query_handle, uint32 index )

  • Retrieve the URL to the preview image of an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • You can use this URL to download and display the preview image instead of having to download it using the handle_preview_file key in the return dictionary from getQueryUGCResult.
  • Returns a string.

getQueryUGCResult( int query_handle, int index ) getQueryUGCResult( uint64_t query_handle, uint32 index )

  • Retrieve the details of an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Returns a dictionary:
    • result (int)
    • file_id (int)
    • file_type (int)
    • creator_app_id (int)
    • consumer_app_id (int)
    • title (string)
    • description (string)
    • steam_id_owner (int)
    • time_created (int)
    • time_updated (int)
    • time_added_to_user_list (int)
    • visibility (int)
    • banned (bool)
    • accepted_for_use (bool)
    • tags_truncated (bool)
    • tags (string)
    • handle_file (int)
    • handle_preview-file (int)
    • file_name (string)
    • file_size (int)
    • preview_file_size (int)
    • url (string)
    • votes_up (int)
    • votes_down (int)
    • score (float)
    • num_children (int)
    • result (uint64_t)
    • file_id (uint64_t)
    • file_type (uint64_t)
    • creator_app_id (uint32_t)
    • consumer_app_id (uint32_t)
    • title (string)
    • description (string)
    • steam_id_owner (uint64_t)
    • time_created (uint32)
    • time_updated (uint32)
    • time_added_to_user_list (uint32)
    • visibility (int)
    • banned (bool)
    • accepted_for_use (bool)
    • tags_truncated (bool)
    • tags (string)
    • handle_file (uint64_t)
    • handle_preview-file (uint64_t)
    • file_name (string)
    • file_size (int32)
    • preview_file_size (int32)
    • url (string)
    • votes_up (uint32)
    • votes_down (uint32)
    • score (float)
    • num_children (uint32)

getQueryUGCStatistic( int query_handle, int index, int stat_type ) getQueryUGCStatistic( uint64_t query_handle, uint32 index, int stat_type )

  • Retrieve various statistics of an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Returns a dictionary:
    • success (bool)
    • handle (int)
    • index (int)
    • type (int)
    • value (int)
    • success (bool)
    • handle (uint64_t)
    • index (uint32)
    • type (int)
    • value (uint64_t)

getQueryUGCTag( int query_handle, int index, int tag_index ) getQueryUGCTag( uint64_t query_handle, uint32 index, uint32 tag_index )

  • Available in SDK v1.51.
  • Retrieve the "nth" tag associated with an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Before calling this you should call getQueryUGCNumTags to get number of tags.
  • Returns a string.

getQueryUGCTagDisplayName( int query_handle, int index, int tag_index ) getQueryUGCTagDisplayName( uint64_t query_handle, uint32 index, uint32 tag_index )

  • Available in SDK v1.51.
  • Retrieve the "nth" display string (usually localized) for a tag, which is associated with an individual workshop item after receiving a querying UGC call result.
  • Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.
  • Before calling this you should call getQueryUGCNumTags to get number of tags.
  • Returns a string.

getSubscribedItems()

  • Gets a list of all of the items the current user is subscribed to for the current game.
  • Returns an array of published_file_ids.

getWorkshopEULAStatus()

  • Asynchronously retrieves data about whether the user accepted the Workshop EULA for the current app.
  • Returns nothing; void.

getUserItemVote( int published_file_id ) getUserItemVote( uint64_t published_file_id )

  • Gets the users vote status on a workshop item.
  • Triggers a get_item_vote_result callback.
  • Returns nothing; void.

releaseQueryUGCRequest( int query_handle ) releaseQueryUGCRequest( uint64_t query_handle )

  • Releases a UGC query handle when you are done with it to free up memory.
  • Returns a bool.

removeAppDependency( int published_file_id, int app_id ) removeAppDependency( uint64_t published_file_id, uint32_t app_id )

  • Removes the dependency between the given item and the appid. This list of dependencies can be retrieved by calling getAppDependencies.
  • Triggers a remove_app_dependency_result callback.
  • Returns nothing; void.

removeDependency( int published_file_id, int child_published_file_id ) removeDependency( uint64_t published_file_id, uint64_t child_published_file_id )

  • Removes a workshop item as a dependency from the specified item.
  • Triggers a remove_ugc_dependency_result callback.
  • Returns nothing; void.

removeItemFromFavorites( int app_id, int published_file_id ) removeItemFromFavorites( uint32_t app_id, uint64_t published_file_id )

  • Removes a workshop item from the users favorites list.
  • Triggers a user_favorite_items_list_changed callback.
  • Returns nothing; void.

removeItemKeyValueTags( int update_handle, string key ) removeItemKeyValueTags( uint64_t update_handle, string key )

  • Removes an existing key value tag from an item.
  • You can only call this up to 100 times per item update. If you need remove more tags than that you'll need to make subsequent item updates.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

removeItemPreview( int update_handle, int index ) removeItemPreview( uint64_t update_handle, uint32 index )

  • Removes an existing preview from an item.
  • Returns a bool.

sendQueryUGCRequest( int update_handle ) sendQueryUGCRequest( uint64_t update_handle )

  • Send a UGC query to Steam.
  • This must be called with a handle obtained from createQueryUserUGCRequest, createQueryAllUGCRequest, or createQueryUGCDetailsRequest to actually send the request to Steam. Before calling this you should use one or more of the following APIs to customize your query: addRequiredTag, addExcludedTag, setReturnOnlyIDs, setReturnKeyValueTags, setReturnLongDescription, setReturnMetadata, setReturnChildren, setReturnAdditionalPreviews, setReturnTotalOnly, setLanguage, setAllowCachedResponse, setCloudFileNameFilter, setMatchAnyTag, setSearchText, setRankedByTrendDays, or addRequiredKeyValueTag.
  • Triggers a ugc_query_completed callback.
  • Returns nothing; void.

setAllowCachedResponse( int update_handle, int max_age_seconds ) setAllowCachedResponse( uint64_t update_handle, uint32 max_age_seconds )

  • Sets whether results will be returned from the cache for the specific period of time on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setCloudFileNameFilter( int update_handle, string match_cloud_filename ) setCloudFileNameFilter( uint64_t update_handle, string match_cloud_filename )

  • Sets to only return items that have a specific filename on a pending UGC Query.
  • Note: This can only be used with createQueryUserUGCRequest.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setItemContent( int update_handle, string content_folder ) setItemContent( uint64_t update_handle, string content_folder )

  • Sets the folder that will be stored as the content for an item.
  • For efficient upload and download, files should not be merged or compressed into single files (e.g. zip files).
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemDescription( int update_handle, string description ) setItemDescription( uint64_t update_handle, string description )

  • Sets a new description for an item.
  • The description must be limited to the length defined by k_cchPublishedDocumentDescriptionMax (8000).
  • You can set what language this is for by using setItemUpdateLanguage, if no language is set then "english" is assumed.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemMetadata( int update_handle, string metadata ) setItemMetadata( uint64_t update_handle, string metadata )

  • Sets arbitrary metadata for an item. This metadata can be returned from queries without having to download and install the actual content.
  • The metadata must be limited to the size defined by k_cchDeveloperMetadataMax (5000).
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemPreview( int update_handle, string preview_file ) setItemPreview( uint64_t update_handle, string preview_file )

  • Sets the primary preview image for the item.
  • The format should be one that both the web and the application (if necessary) can render. Suggested formats include JPG, PNG and GIF.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemTags( int update_handle, array tag_array) setItemTags( uint64_t update_handle, array tag_array)

  • Sets arbitrary developer specified tags on an item.
  • Each tag must be limited to 255 characters. Tag names can only include printable characters, excluding ','. For reference on what characters are allowed, refer to http://en.cppreference.com/w/c/string/byte/isprint
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemTitle( int update_handle, string title ) setItemTitle( uint64_t update_handle, string title )

  • Sets a new title for an item.
  • The title must be limited to the size defined by k_cchPublishedDocumentTitleMax (128).
  • You can set what language this is for by using setItemUpdateLanguage, if no language is set then "english" is assumed.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemUpdateLanguage( int update_handle, string language ) setItemUpdateLanguage( uint64_t update_handle, string language )

  • Sets the language of the title and description that will be set in this item update.
  • This must be in the format of the API language code.
  • If this is not set then "english" is assumed.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setItemVisibility( int update_handle, int visibility ) setItemVisibility( uint64_t update_handle, int visibility )

  • Sets the visibility of an item.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

setLanguage( int query_handle, string language ) setLanguage( uint64_t query_handle, string language )

  • Sets the language to return the title and description in for the items on a pending UGC Query.
  • This must be in the format of the API language code.
  • If this is not set then "english" is assumed.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setMatchAnyTag( int query_handle, bool match_any_tag ) setMatchAnyTag( uint64_t query_handle, bool match_any_tag )

  • 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.
  • Note: This can only be used with createQueryAllUGCRequest.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setRankedByTrendDays( int query_handle, int days ) setRankedByTrendDays( uint64_t query_handle, uint32 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.
  • Note: This can only be used with createQueryAllUGCRequest.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnAdditionalPreviews( int query_handle, bool return_additional_previews ) setReturnAdditionalPreviews( uint64_t query_handle, bool return_additional_previews )

  • Sets whether to return any additional images/videos attached to the items on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnChildren( int query_handle, bool return_children ) setReturnChildren( uint64_t query_handle, bool return_children )

  • Sets whether to return the IDs of the child items of the items on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnKeyValueTags( int query_handle, bool return_key_value_tags ) setReturnKeyValueTags( uint64_t query_handle, bool return_key_value_tags )

  • Sets whether to return any key-value tags for the items on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnLongDescription( int query_handle, bool return_long_description ) setReturnLongDescription( uint64_t query_handle, bool return_long_description )

  • Sets whether to return the full description for the items on a pending UGC Query.
  • If you don't set this then you only receive the summary which is the description truncated at 255 bytes.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnMetadata( int query_handle, bool return_metadata ) setReturnMetadata( uint64_t query_handle, bool return_metadata )

  • Sets whether to return the developer specified metadata for the items on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnOnlyIDs( int query_handle, bool return_only_ids ) setReturnOnlyIDs( uint64_t query_handle, bool return_only_ids )

  • Sets whether to only return IDs instead of all the details on a pending UGC Query.
  • This is useful for when you don't need all the information (e.g. you just want to get the IDs of the items a user has in their favorites list.)
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnPlaytimeStats( int query_handle, int days ) setReturnPlaytimeStats( uint64_t query_handle, uint32 days )

  • Sets whether to return the the playtime stats on a pending UGC Query.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setReturnTotalOnly( int query_handle, bool return_total_only ) setReturnTotalOnly( uint64_t query_handle, bool return_total_only )

  • Sets whether to only return the the total number of matching items on a pending UGC Query.
  • The actual items will not be returned when ugc_query_completed is called.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setSearchText( int query_handle, string search_text ) setSearchText( uint64_t query_handle, string search_text )

  • Sets a string to that items need to match in either the title or the description on a pending UGC Query.
  • Note: This can only be used with createQueryAllUGCRequest.
  • Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.
  • Returns a bool.

setUserItemVote( int published_file_id, bool vote_up ) setUserItemVote( uint64_t published_file_id, bool vote_up )

  • Allows the user to rate a workshop item up or down.
  • Triggers a set_user_item_vote callback.
  • Returns nothing; void.

showWorkshopEULA()

  • Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not.
  • Returns a bool.

startItemUpdate( int app_id, int published_file_id ) startItemUpdate( uint32_t app_id, uint64_t published_file_id )

  • Starts the item update process.
  • This gets you a handle that you can use to modify the item before finally sending off the update to the server with submitItemUpdate.
  • Returns an int. Returns a uint64_t.

startPlaytimeTracking( array published_file_ids )

  • Start tracking playtime on a set of workshop items.
  • When your app shuts down, playtime tracking will automatically stop.
  • Triggers a start_playtime_tracking callback.
  • Returns nothing; void.

stopPlaytimeTracking( array published_file_ids )

  • Stop tracking playtime on a set of workshop items.
  • When your app shuts down, playtime tracking will automatically stop.
  • Triggers a stop_playtime_tracking callback.
  • Returns nothing; void.

stopPlaytimeTrackingForAllItems()

  • Stop tracking playtime of all workshop items.
  • When your app shuts down, playtime tracking will automatically stop.
  • Triggers a stop_playtime_tracking callback.
  • Returns nothing; void.

submitItemUpdate( int update_handle, string change_note ) submitItemUpdate( uint64_t update_handle, string change_note )

  • Uploads the changes made to an item to the Steam Workshop.
  • You can track the progress of an item update with getItemUpdateProgress.
  • Triggers a item_updated callback.
  • Returns nothing; void.

subscribeItem( int published_file_id ) subscribeItem( uint64_t published_file_id )

  • Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
  • Triggers a subscribe_item callback.
  • Returns nothing; void.

suspendDownloads( bool suspend )

  • Suspends and resumes all workshop downloads.
  • If you call this with suspend set to true then downloads will be suspended until you resume them by setting suspend to false or when the game ends.
  • Returns nothing; void.

unsubscribeItem( int published_file_id ) unsubscribeItem( uint64_t published_file_id )

  • Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
  • Triggers a unsubscribe_item callback.
  • Returns nothing; void.

updateItemPreviewFile( int update_handle, int index, string preview_file ) updateItemPreviewFile( uint64_t update_handle, uint32 index, string preview_file )

  • Updates an additional video preview from YouTube for the item.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.

updateItemPreviewVideo( int update_handle, int index, string video_id ) updateItemPreviewVideo( uint64_t update_handle, uint32 index, string video_id )

  • Updates an additional video preview from YouTube for the item.
  • Note: This must be set before you submit the UGC update handle using submitItemUpdate.
  • Returns a bool.