Skip to content

UGC

Functions to create, consume, and interact with the Steam Workshop.

Available in both the main GodotSteam branches and GodotSteam Server branches

Functions

addAppDependency

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: void


Read more in the official Steamworks SDK documentation

addContentDescriptor

addContentDescriptor( uint64_t update_handle, int descriptor_id )

Add a content descriptor to a piece of UGC.

Returns: bool

Note: Valve has no documentation on this function currently.

addDependency

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: void


Read more in the official Steamworks SDK documentation

addExcludedTag

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

addItemKeyValueTag

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

addItemPreviewFile

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.

Returns: bool

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.


Read more in the official Steamworks SDK documentation

addItemPreviewVideo

addItemPreviewVideo( uint64_t query_handle, string video_id )

Adds an additional video preview from YouTube for the item.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

addItemToFavorites

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: void


Read more in the official Steamworks SDK documentation

addRequiredKeyValueTag

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

addRequiredTag

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: bool


Read more in the official Steamworks SDK documentation

addRequiredTagGroup

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

initWorkshopForGameServer

initWorkshopForGameServer( uint32_t workshop_depot_id, string folder )

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: bool


Read more in the official Steamworks SDK documentation

createItem

createItem( uint32 app_id, int file_type )

Creates a new workshop item with no content attached yet.

Triggers a item_created callback.

Returns: void


Read more in the official Steamworks SDK documentation

createQueryAllUGCRequest

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.

To query for the UGC associated with a single user you can use createQueryUserUGCRequest instead.

Returns: uint64_t

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.


Read more in the official Steamworks SDK documentation

createQueryUGCDetailsRequest

createQueryUGCDetailsRequest( array published_file_ids )

Query for the details of specific workshop items.

This will return up to 50 results.

To query all the UGC for your app you can use createQueryAllUGCRequest instead.

Returns: uint64_t

Note: You must release the handle returned by this function by calling releaseQueryUGCRequest when you are done with it.


Read more in the official Steamworks SDK documentation

createQueryUserUGCRequest

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.

To query all the UGC for your app you can use createQueryAllUGCRequest instead.

Returns: uint64_t

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.


Read more in the official Steamworks SDK documentation

deleteItem

deleteItem( uint64_t published_file_id )

Deletes the item without prompting the user.

Triggers a item_deleted callback.

Returns: void


Read more in the official Steamworks SDK documentation

downloadItem

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: bool


Read more in the official Steamworks SDK documentation

getAppDependencies

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: void


Read more in the official Steamworks SDK documentation

getItemDownloadInfo

getItemDownloadInfo( uint64_t file_id )

Get info about a pending download of a workshop item that has 8 set.

Returns: dictionary

Contains the following keys:

  • ret (bool)
  • downloaded (uint64_t)
  • total (uint64_t)

Read more in the official Steamworks SDK documentation

getItemInstallInfo

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: dictionary

Contains the following keys:

  • ret (bool)
  • size (int)
  • folder (string)
  • folder_size (uint32)
  • timestamp (uint32)

Read more in the official Steamworks SDK documentation

getItemState

getItemState( uint64_t published_file_id )

Gets the current state of a workshop item on this client.

Returns: uint32

It should be one of the following:

  • 0 - None
  • 1 - Subscribed
  • 2 - Legacy
  • 4 - Installed
  • 8 - Update
  • 16 - Downloading
  • 32 - Pending

Read more in the official Steamworks SDK documentation

getItemUpdateProgress

getItemUpdateProgress( uint64_t update_handle )

Gets the progress of an item update.

Returns: dictionary

Contains the following keys:

  • status (int)
  • processed (uint64)
  • total (uint64)

You may notice that data comes back in processed and total in status 2; unsure if this is a bug or intended.


Read more in the official Steamworks SDK documentation

getNumSubscribedItems

getNumSubscribedItems()

Gets the total number of items the current user is subscribed to for the game or application.

Returns: uint32


Read more in the official Steamworks SDK documentation

getQueryUGCAdditionalPreview

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.

Before calling this you should call getQueryUGCNumAdditionalPreviews to get number of additional previews.

Returns: dictionary

Contains the following keys:

  • success (bool)
  • handle (uint64_t)
  • index (uint32)
  • preview (uint32)
  • url_or_video (string)
  • filename (string)
  • type (int)

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCChildren

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).

You should create published_file_id with num_children provided in returned dictionary after getting the UGC details with getQueryUGCResult.

Returns: dictionary

Contains the following keys:

  • success (bool)
  • handle (uint64_t)
  • index (uint32)
  • children (uint64_t)

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCContentDescriptors

getQueryUGCContentDescriptors( uint64_t query_handle, uint32 index, uint32_t max_entries )

Get an UGC item's content descriptors for mature content.

Returns: dictionary

Contains the following keys:

  • result (uint32_t)
  • handle (uint64_t)
  • index (uint32)
  • descriptors (array)

Descriptors array will contain a list of integers that correspond to the following UGC enums for descriptors:

  • Nudity or sexual content - 1
  • Frequent violence or gore - 2
  • Adult only sexual content - 3
  • Gratuitous sexual content - 4
  • Any mature content - 5

Note: Valve does not have any documentation covering this function at this time.

getQueryUGCKeyValueTag

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.

Before calling this you should call getQueryUGCNumKeyValueTags to get number of tags.

Returns: dictionary

Contains the following keys:

  • success (bool)
  • handle (uint64_t)
  • index (uint32)
  • tag (uint32)
  • key (string)
  • value (string)

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCMetadata

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.

Returns: string

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCNumAdditionalPreviews

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.

You can then call getQueryUGCAdditionalPreview to get the details of each additional preview.

Returns: uint32

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCNumKeyValueTags

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.

You can then call getQueryUGCKeyValueTag to get the details of each tag.

Returns: uint32

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCNumTags

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.

You can then call getQueryUGCTag to get the tag name or getQueryUGCTagDisplayName to get the localized tag string (if any).

Returns: uint32

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCPreviewURL

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.

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: string

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCResult

getQueryUGCResult( uint64_t query_handle, uint32 index )

Retrieve the details of an individual workshop item after receiving a querying UGC call result.

Returns: dictionary

Contains the following keys:

  • 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)

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCStatistic

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.

Returns: dictionary

Contains the following keys:

  • success (bool)
  • handle (uint64_t)
  • index (uint32)
  • type (int)
  • value (uint64_t)

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCTag

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.

Before calling this you should call getQueryUGCNumTags to get number of tags.

Returns: string

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getQueryUGCTagDisplayName

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.

Before calling this you should call getQueryUGCNumTags to get number of tags.

Returns: string

Note: This must only be called with the handle obtained from a successful ugc_query_completed call result.


Read more in the official Steamworks SDK documentation

getSubscribedItems

getSubscribedItems()

Gets a list of all of the items the current user is subscribed to for the current game.

Returns: array of published_file_ids


Read more in the official Steamworks SDK documentation

getWorkshopEULAStatus

getWorkshopEULAStatus()

Asynchronously retrieves data about whether the user accepted the Workshop EULA for the current app.

Returns: void


Read more in the official Steamworks SDK documentation

getUserContentDescriptorPreferences

getUserContentDescriptorPreferences( uint32 max_entries )

Return the user's community content descriptor preferences.

Returns: Array

getUserItemVote

getUserItemVote( uint64_t published_file_id )

Gets the users vote status on a workshop item.

Triggers a get_item_vote_result callback.

Returns: void


Read more in the official Steamworks SDK documentation

releaseQueryUGCRequest

releaseQueryUGCRequest( uint64_t query_handle )

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

Returns: bool


Read more in the official Steamworks SDK documentation

removeAppDependency

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: void


Read more in the official Steamworks SDK documentation

removeContentDescriptor

removeContentDescriptor( uint64_t update_handle, int descriptor_id )

Removes a mature content descriptor from a piece of UGC.

Returns: bool

Notes: Valve has no documentation on this function currently.

removeDependency

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: void


Read more in the official Steamworks SDK documentation

removeItemFromFavorites

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: void


Read more in the official Steamworks SDK documentation

removeItemKeyValueTags

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

removeItemPreview

removeItemPreview( uint64_t update_handle, uint32 index )

Removes an existing preview from an item.

Returns: bool


Read more in the official Steamworks SDK documentation

sendQueryUGCRequest

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: void


Read more in the official Steamworks SDK documentation

setAllowCachedResponse

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setCloudFileNameFilter

setCloudFileNameFilter( uint64_t update_handle, string match_cloud_filename )

Sets to only return items that have a specific filename on a pending UGC Query.

Returns: bool

Note: This can only be used with createQueryUserUGCRequest.

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setItemContent

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).

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemDescription

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemMetadata

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).

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemPreview

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemTags

setItemTags( uint64_t update_handle, array tag_array, bool allow_admin_tags)

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

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemTitle

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemUpdateLanguage

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.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setItemVisibility

setItemVisibility( uint64_t update_handle, int visibility )

Sets the visibility of an item.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

setLanguage

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setMatchAnyTag

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.

Returns: bool

Note: This can only be used with createQueryAllUGCRequest.

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setRankedByTrendDays

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.

Returns: bool

Note: This can only be used with createQueryAllUGCRequest.

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setRequiredGameVersions

setRequiredGameVersions( uint64_t query_handle, String game_branch_min, String game_branch_max)

An empty string for either parameter means that it will match any version on that end of the range. This will only be applied if the actual content has been changed.

Returns: bool

setReturnAdditionalPreviews

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnChildren

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnKeyValueTags

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnLongDescription

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnMetadata

setReturnMetadata( uint64_t query_handle, bool return_metadata )

Sets whether to return the developer specified metadata for the items on a pending UGC Query.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnOnlyIDs

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.)

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnPlaytimeStats

setReturnPlaytimeStats( uint64_t query_handle, uint32 days )

Sets whether to return the the playtime stats on a pending UGC Query.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setReturnTotalOnly

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.

Returns: bool

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setSearchText

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.

Returns: bool

Note: This can only be used with createQueryAllUGCRequest.

Note: This must be set before you send a UGC Query handle using sendQueryUGCRequest.


Read more in the official Steamworks SDK documentation

setUserItemVote

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: void


Read more in the official Steamworks SDK documentation

showWorkshopEULA

showWorkshopEULA()

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

Returns: bool


Read more in the official Steamworks SDK documentation

startItemUpdate

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: uint64_t


Read more in the official Steamworks SDK documentation

startPlaytimeTracking

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: void


Read more in the official Steamworks SDK documentation

stopPlaytimeTracking

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: void


Read more in the official Steamworks SDK documentation

stopPlaytimeTrackingForAllItems

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: void


Read more in the official Steamworks SDK documentation

submitItemUpdate

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: void


Read more in the official Steamworks SDK documentation

subscribeItem

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: void


Read more in the official Steamworks SDK documentation

suspendDownloads

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: void


Read more in the official Steamworks SDK documentation

unsubscribeItem

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: void


Read more in the official Steamworks SDK documentation

updateItemPreviewFile

updateItemPreviewFile( uint64_t update_handle, uint32 index, string preview_file )

Updates an additional video preview from YouTube for the item.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

updateItemPreviewVideo

updateItemPreviewVideo( uint64_t update_handle, uint32 index, string video_id )

Updates an additional video preview from YouTube for the item.

Returns: bool

Note: This must be set before you submit the UGC update handle using submitItemUpdate.


Read more in the official Steamworks SDK documentation

Signals

These callbacks require you to run Steam.run_callbacks() in your _process() function to receive them.

add_app_dependency_result

add_app_dependency_result

The result of a call to addAppDependency.

Returns:

  • result (int)
  • file_id (uint64_t)
  • app_id (uint32_t)

Read more in the official Steamworks SDK documentation

add_ugc_dependency_result

add_ugc_dependency_result

The result of a call to addDependency.

Returns:

  • result (int)
  • file_id (uint64_t)
  • child_id (uint32_t)

Read more in the official Steamworks SDK documentation

get_app_dependencies_result

get_app_dependencies_result

Called when getting the app dependencies for an item.

Returns:

  • result (int)
  • file_id (uint64_t)
  • app_dependencies (uint32)
  • total_app_dependencies (uint32)

Read more in the official Steamworks SDK documentation

get_item_vote_result

get_item_vote_result

Called when getting the users vote status on an item.

Returns:

  • result (int)
  • file_id (uint64_t)
  • vote_up (bool)
  • vote_down (bool)
  • vote_skipped (bool)

Read more in the official Steamworks SDK documentation

item_created

item_created

Called when a new workshop item has been created.

Returns:

  • result (int)
  • file_id (uint64_t)
  • accept_tos (bool)

accept_tos should return false if the user has accepted the Workshop TOS. If it is true, direct the user to the TOS so they can accept it.


Read more in the official Steamworks SDK documentation

item_deleted

item_deleted

Called when an attempt at deleting an item completes.

Returns:

  • result (int)
  • file_id (uint64_t)

Read more in the official Steamworks SDK documentation

item_downloaded

item_downloaded

Called when a workshop item has been downloaded.

Returns:

  • result (int)
  • file_id (uint64_t)
  • app_id (uint32_t)

Read more in the official Steamworks SDK documentation

item_installed

item_installed

Called when a workshop item has been installed or updated.

Returns:

  • app_id (uint32_t)
  • file_id (uint64_t)

Read more in the official Steamworks SDK documentation

item_updated

item_updated

Called when an item update has completed. Emits signal in response to function submitItemUpdate.

Returns:

  • result (int)
  • need_to_accept_tos (bool)

If need_to_accept_tos comes back true, you should direct the user to accept the legal agreement.


Read more in the official Steamworks SDK documentation

remove_app_dependency_result

remove_app_dependency_result

Purpose: The result of a call to removeAppDependency.

Returns:

  • result (int)
  • file_id (uint64_t)
  • app_id (uint32_t)

Read more in the official Steamworks SDK documentation

remove_ugc_dependency_result

remove_ugc_dependency_result

Purpose: The result of a call to removeDependency.

Returns:

  • result (int)
  • file_id (uint64_t)
  • child_id (uint64_t)

Read more in the official Steamworks SDK documentation

set_user_item_vote

set_user_item_vote

Called when the user has voted on an item.

Returns:

  • result (int)
  • file_id (uint64_t)
  • vote_up (bool)

Read more in the official Steamworks SDK documentation

start_playtime_tracking

start_playtime_tracking

Called when workshop item playtime tracking has started.

Returns:

  • result (int)

Read more in the official Steamworks SDK documentation

stop_playtime_tracking

stop_playtime_tracking

Called when workshop item playtime tracking has stopped.

Returns:

  • result (int)

Read more in the official Steamworks SDK documentation

ugc_query_completed

ugc_query_completed

Called when a UGC query request completes.

Returns:

  • handle (uint64_t)
  • result (int)
  • results_returned (uint32)
  • total_matching (uint32)
  • cached (bool)

Read more in the official Steamworks SDK documentation

user_favorite_items_list_changed

user_favorite_items_list_changed

Called when the user has added or removed an item to/from their favorites.

Returns:

  • result (int)
  • file_id (uint64_t)
  • was_add_request (bool)

Read more in the official Steamworks SDK documentation

user_subscribed_items_list_changed

user_subscribed_items_list_changed

Signal that the list of subscribed items changed.

Returns:

  • app_id (uint32)

Read more in the official Steamworks SDK documentation

workshop_eula_status

workshop_eula_status

Status of the user's acceptable/rejection of the app's specific Workshop EULA.

Returns:

  • result (int)
  • app_id (uint32)
  • eula_data (dictionary)
    • version (uint32)
    • action (uint32)
    • accepted (bool)
    • needs_action (bool)

Read more in the official Steamworks SDK documentation

Enums

ItemPreviewType

Enumerator Value
ITEM_PREVIEW_TYPE_IMAGE 0
ITEM_PREVIEW_TYPE_YOUTUBE_VIDEO 1
ITEM_PREVIEW_TYPE_SKETCHFAB 2
ITEM_PREVIEW_TYPE_ENVIRONMENTMAP_HORIZONTAL_CROSS 3
ITEM_PREVIEW_TYPE_ENVIRONMENTMAP_LAT_LONG 4
ITEM_PREVIEW_TYPE_RESERVED_MAX 255

ItemState

Enumerator Value
ITEM_STATE_NONE 0
ITEM_STATE_SUBSCRIBED 1
ITEM_STATE_LEGACY_ITEM 2
ITEM_STATE_INSTALLED 4
ITEM_STATE_NEEDS_UPDATE 8
ITEM_STATE_DOWNLOADING 16
ITEM_STATE_DOWNLOAD_PENDING 32

ItemStatistic

Enumerator Value
ITEM_STATISTIC_NUM_SUBSCRIPTIONS 0
ITEM_STATISTIC_NUM_FAVORITES 1
ITEM_STATISTIC_NUM_FOLLOWERS 2
ITEM_STATISTIC_NUM_UNIQUE_SUBSCRIPTIONS 3
ITEM_STATISTIC_NUM_UNIQUE_FAVORITES 4
ITEM_STATISTIC_NUM_UNIQUE_FOLLOWERS 5
ITEM_STATISTIC_NUM_UNIQUE_WEBSITE_VIEWS 6
ITEM_STATISTIC_REPORT_SCORE 7
ITEM_STATISTIC_NUM_SECONDS_PLAYED 8
ITEM_STATISTIC_NUM_PLAYTIME_SESSIONS 9
ITEM_STATISTIC_NUM_COMMENTS 10
ITEM_STATISTIC_NUM_SECONDS_PLAYED_DURING_TIME_PERIOD 11
ITEM_STATISTIC_NUM_PLAYTIME_SESSIONS_DURING_TIME_PERIOD 12

ItemUpdateStatus

Enumerator Value
ITEM_UPDATE_STATUS_INVALID 0
ITEM_UPDATE_STATUS_PREPARING_CONFIG 1
ITEM_UPDATE_STATUS_PREPARING_CONTENT 2
ITEM_UPDATE_STATUS_UPLOADING_CONTENT 3
ITEM_UPDATE_STATUS_UPLOADING_PREVIEW_FILE 4
ITEM_UPDATE_STATUS_COMMITTING_CHANGES 5

UGCMatchingUGCType

Enumerator Value
UGC_MATCHING_UGC_TYPE_ITEMS 0
UGC_MATCHING_UGC_TYPE_ITEMS_MTX 1
UGC_MATCHING_UGC_TYPE_ITEMS_READY_TO_USE 2
UGC_MATCHING_UGC_TYPE_COLLECTIONS 3
UGC_MATCHING_UGC_TYPE_ARTWORK 4
UGC_MATCHING_UGC_TYPE_VIDEOS 5
UGC_MATCHING_UGC_TYPE_SCREENSHOTS 6
UGC_MATCHING_UGC_TYPE_ALL_GUIDES 7
UGC_MATCHING_UGC_TYPE_WEB_GUIDES 8
UGC_MATCHING_UGC_TYPE_INTEGRATED_GUIDES 9
UGC_MATCHING_UGC_TYPE_USABLE_IN_GAME 10
UGC_MATCHING_UGC_TYPE_CONTROLLER_BINDINGS 11
UGC_MATCHING_UGC_TYPE_GAME_MANAGED_ITEMS 12
UGC_MATCHING_UGC_TYPE_ALL ~0

UGCQuery

Enumerator Value
UGC_QUERY_RANKED_BY_VOTE 0
UGC_QUERY_RANKED_BY_PUBLICATION_DATE 1
UGC_QUERY_ACCEPTED_FOR_GAME_RANKED_BY_ACCEPTANCE_DATE 2
UGC_QUERY_RANKED_BY_TREND 3
UGC_QUERY_FAVORITED_BY_FRIENDS_RANKED_BY_PUBLICATION_DATE 4
UGC_QUERY_CREATED_BY_FRIENDS_RANKED_BY_PUBLICATION_DATE 5
UGC_QUERY_RANKED_BY_NUM_TIMES_REPORTED 6
UGC_QUERY_CREATED_BY_FOLLOWED_USERS_RANKED_BY_PUBLICATION_DATE 7
UGC_QUERY_NOT_YET_RATED 8
UGC_QUERY_RANKED_BY_TOTAL_VOTES_ASC 9
UGC_QUERY_RANKED_BY_VOTES_UP 10
UGC_QUERY_RANKED_BY_TEXT_SEARCH 11
UGC_QUERY_RANKED_BY_TOTAL_UNIQUE_SUBSCRIPTIONS 12
UGC_QUERY_RANKED_BY_PLAYTIME_TREND 13
UGC_QUERY_RANKED_BY_TOTAL_PLAYTIME 14
UGC_QUERY_RANKED_BY_AVERAGE_PLAYTIME_TREND 15
UGC_QUERY_RANKED_BY_LIFETIME_AVERAGE_PLAYTIME 16
UGC_QUERY_RANKED_BY_PLAYTIME_SESSIONS_TREND 17
UGC_QUERY_RANKED_BY_LIFETIME_PLAYTIME_SESSIONS 18
UGC_QUERY_RANKED_BY_LAST_UPDATED_DATE 19

UserUGCList

Enumerator Value
USER_UGC_LIST_PUBLISHED 0
USER_UGC_LIST_VOTED_ON 1
USER_UGC_LIST_VOTED_UP 2
USER_UGC_LIST_VOTED_DOWN 3
USER_UGC_LIST_FAVORITED 5
USER_UGC_LIST_SUBSCRIBED 6
USER_UGC_LIST_USED_OR_PLAYED 7
USER_UGC_LIST_FOLLOWED 8

UserUGCListSortOrder

Enumerator Value
USER_UGC_LIST_SORT_ORDER_CREATION_ORDER_DESC 0
USER_UGC_LIST_SORT_ORDER_CREATION_ORDER_ASC 1
USER_UGC_LIST_SORT_ORDER_TITLE_ASC 2
USER_UGC_LIST_SORT_ORDER_LAST_UPDATED_DESC 3
USER_UGC_LIST_SORT_ORDER_SUBSCRIPTION_DATE_DESC 4
USER_UGC_LIST_SORT_ORDER_VOTE_SCORE_DESC 5
USER_UGC_LIST_SORT_ORDER_FOR_MODERATION 6

UGCContentDescriptorID

Enumerator Value
UGC_CONTENT_DESCRIPTOR_NUDITY_OR_SEXUAL_CONTENT 1
UGC_CONTENT_DESCRIPTOR_FREQUENT_VIOLENCE_OR_GORE 2
UGC_CONTENT_DESCRIPTOR_ADULT_ONLY_SEXUAL_CONTENT 3
UGC_CONTENT_DESCRIPTOR_GRATUITOUS_SEXUAL_CONTENT 4
UGC_CONTENT_DESCRIPTOR_ANY_MATURE_CONTENT 5