UserGeneratedContent.Client
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
Events
EventItemDownloaded
Occurs when a UGC item is downloaded
The event handler would look similar to
EventWorkshopItemInstalled
Called when a workshop item has been installed or updated
The event handler would look similar to
Methods
AddAppDependency
The callback for this method would look like the following.
This is a native callback, details as to the meaning of fields in the AddAppDependencyResult_t object can be found here.
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.
AddDependency
This is a native callback, details as to the meaning of fields in the AddUGCDependencyResult_t object can be found here.
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.
AddExcludedTag
Adds a excluded tag to a pending UGC Query. This will only return UGC without the specified tag.
AddItemKeyValueTag
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.
AddItemPreviewFile
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.
AddItemPreviewVideo
Adds an additional video preview from YouTube for the item.
AddItemToFavorites
Adds workshop item to the users favorite list. The callback to this method would look like the following
This is a native Steam API callback you can find more details here.
AddRequiredKeyValueTag
Adds a required key-value tag to a pending UGC Query. This will only return workshop items that have a key = pKey and a value = pValue.
AddRequiredTag
Adds a required tag to a pending UGC Query. This will only return UGC with the specified tag.
CreateItem
The first overload handles the creation and update of new items in a single line call.
The first parameter defines the core fields of the item to be created, note the WorkshopItemData.Create method simply calls this overload.
The remaining parameters deal with additional preview images and videos as well as the key value tag system
The callback for this overload would look similar to following.
See the WorkshopItemDataCreateStatus definition for more information on what fields it contains.
The second overload is only creates an empty UGC File. You would then manually start the update process and set each of its fields. This approach is more akin to using the Raw Steam API.
Learn more about manual creation and update of items here.
The callback for this overload would look similar to the following.
This works exsactly the same as the native Steam API callback as documented here and uses those native Steam API structures.
CreateQueryAllRequest
The UGC Query Manager can make working with quires much simpler.
Query for all matching UGC. You can use this to list all of the available UGC for your app. You must release the handle returned by this function by calling WorkshopReleaseQueryRequest when you are done with it!
CreateQueryDetailsRequest
All of the overloads do the same thing they simply reduce the need for in line conversion when using different types of collecitons.
The UGC Query Manager can make working with quires much simpler.
Query for the details of specific workshop items. You must release the handle returned by this function by calling WorkshopReleaseQueryRequest when you are done with it!
CreateQueryUserRequest
Query UGC associated with a user. You can use this to list the UGC the user is subscribed to amongst other things. You must release the handle returned by this function by calling WorkshopReleaseQueryRequest when you are done with it!
ReleaseQueryRequest
Frees a UGC query
DeleteItem
Requests delete of a UGC item
This is a native callback you can find more details on it here.
DownloadItem
Request download of a UGC item
GetAppDependencies
Request the app dependencies of a UGC item
GetItemDownloadInfo
Request the download informaiton of a UGC item
GetItemInstallInfo
Request the installation informaiton of a UGC item
GetItemInstallInfo
Request the installation informaiton of a UGC item
GetItemState
Gets the current state of a workshop item on this client.
ItemStateHasFlag
Checks if the 'checkFlag' value is in the 'value'
ItemStateHasAllFlags
Cheks if any of the 'checkflags' values are in the 'value'
GetItemUpdateProgress
Gets the progress of an item update.
GetNumSubscribedItems
Returns the number of subscribed UGC items
GetQueryAdditionalPreview
Request an additional preview for a UGC item
GetQueryChildren
Request the child items of a given UGC item
GetQueryKeyValueTag
Retrieve the details of a key-value tag associated with an individual workshop item after receiving a querying UGC call result.
GetQueryMetadata
Request the metadata of a UGC item
GetQueryNumAdditionalPreviews
Request the number of previews of a UGC item
GetQueryNumKValueTags
Request the number of key value tags for a UGC item
GetQuyPreviewURL
Get the preview URL of a UGC item
GetQueryResults
Fetch the results of a UGC query
GetQueryStatistic
Fetch the statistics of a UGC query
GetSubscribedItems
Get the file IDs of all subscribed UGC items up to the array size. This is a wrapper around the raw API entry and maintained for backward compatibility.
or
Returns the list of items the user is subscribed to as a simple array.
or
This will query for the details of the items the user is subscribed to and invoke a callback when those details are returned.
GetUserItemVote
Get the item vote value of a UGC item. The callback for this would look like the following
GetWorkshopEULAStatus
Asynchronously retrieves data about whether the user accepted the Workshop EULA for the current app. The callback for this method would look like the following.
ShowWorkshopEULA
Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not
RemoveAppDependency
Request the removal of app dependency from a UGC item
RemoveDependency
Request the removal of a dependency from a UGC item
RemoveItemFromFavorites
Request the item be removed from the user's favourites list if present
RemoveItemKeyValueTags
Remove UGC Item key value tags
RemoveItemPreview
Remove UGC Item Preview
RequestDetails
Request details of a given UGC item
SendQueryUGCRequest
Send a UGC query for processing
SetAllowCashedResponse
Set the allow cashed response on Steam
SetCloudFileNameFilter
Set the file name filter value for use with queries
SetItemContent
Sets the folder path that Valve will upload from when submitting an item update