######### ISteamUGC ######### .. note:: This documentation is auto-generated. Methods marked with 🤖 are automatically generated bindings. Methods marked with ✍️ are manually implemented and methods marked with ✋ are currently not implemented. .. note:: Overloaded Steam methods are exposed as distinct Lua functions using a type suffix (for example ``GetStatInt32`` and ``SetStatFloat``). .. note:: This interface can be accessed has multiple accessors (e.g. a GameServer variant), the documentation shows ``UGC`` everywhere but it can also be accessed with ``GameServerUGC``. List of Functions ----------------- * :func:`UGC.AddAppDependency` * :func:`UGC.AddContentDescriptor` * :func:`UGC.AddDependency` * :func:`UGC.AddExcludedTag` * :func:`UGC.AddItemKeyValueTag` * :func:`UGC.AddItemPreviewFile` * :func:`UGC.AddItemPreviewVideo` * :func:`UGC.AddItemToFavorites` * :func:`UGC.AddRequiredKeyValueTag` * :func:`UGC.AddRequiredTag` * :func:`UGC.AddRequiredTagGroup` * :func:`UGC.BInitWorkshopForGameServer` * :func:`UGC.CreateItem` * :func:`UGC.CreateQueryAllUGCRequestCursor` * :func:`UGC.CreateQueryAllUGCRequestPage` * :func:`UGC.CreateQueryUGCDetailsRequest` * :func:`UGC.CreateQueryUserUGCRequest` * :func:`UGC.DeleteItem` * :func:`UGC.DownloadItem` * :func:`UGC.GetAppDependencies` * :func:`UGC.GetDownloadedItems` * :func:`UGC.GetItemDownloadInfo` * :func:`UGC.GetItemInstallInfo` * :func:`UGC.GetItemState` * :func:`UGC.GetItemUpdateProgress` * :func:`UGC.GetNumDownloadedItems` * :func:`UGC.GetNumSubscribedItems` * :func:`UGC.GetNumSupportedGameVersions` * :func:`UGC.GetQueryUGCAdditionalPreview` * :func:`UGC.GetQueryUGCChildren` * :func:`UGC.GetQueryUGCContentDescriptors` * :func:`UGC.GetQueryUGCKeyValueTag` * :func:`UGC.GetQueryUGCMetadata` * :func:`UGC.GetQueryUGCNumAdditionalPreviews` * :func:`UGC.GetQueryUGCNumKeyValueTags` * :func:`UGC.GetQueryUGCNumTags` * :func:`UGC.GetQueryUGCPreviewURL` * :func:`UGC.GetQueryUGCResult` * :func:`UGC.GetQueryUGCStatistic` * :func:`UGC.GetQueryUGCTag` * :func:`UGC.GetQueryUGCTagDisplayName` * :func:`UGC.GetSubscribedItems` * :func:`UGC.GetSupportedGameVersionData` * :func:`UGC.GetUserContentDescriptorPreferences` * :func:`UGC.GetUserItemVote` * :func:`UGC.GetWorkshopEULAStatus` * :func:`UGC.MarkDownloadedItemAsUnused` * :func:`UGC.ReleaseQueryUGCRequest` * :func:`UGC.RemoveAllItemKeyValueTags` * :func:`UGC.RemoveAppDependency` * :func:`UGC.RemoveContentDescriptor` * :func:`UGC.RemoveDependency` * :func:`UGC.RemoveItemFromFavorites` * :func:`UGC.RemoveItemKeyValueTags` * :func:`UGC.RemoveItemPreview` * :func:`UGC.RequestUGCDetails` * :func:`UGC.SendQueryUGCRequest` * :func:`UGC.SetAdminQuery` * :func:`UGC.SetAllowCachedResponse` * :func:`UGC.SetAllowLegacyUpload` * :func:`UGC.SetCloudFileNameFilter` * :func:`UGC.SetItemContent` * :func:`UGC.SetItemDescription` * :func:`UGC.SetItemMetadata` * :func:`UGC.SetItemPreview` * :func:`UGC.SetItemTags` * :func:`UGC.SetItemTitle` * :func:`UGC.SetItemUpdateLanguage` * :func:`UGC.SetItemVisibility` * :func:`UGC.SetItemsDisabledLocally` * :func:`UGC.SetLanguage` * :func:`UGC.SetMatchAnyTag` * :func:`UGC.SetRankedByTrendDays` * :func:`UGC.SetRequiredGameVersions` * :func:`UGC.SetReturnAdditionalPreviews` * :func:`UGC.SetReturnChildren` * :func:`UGC.SetReturnKeyValueTags` * :func:`UGC.SetReturnLongDescription` * :func:`UGC.SetReturnMetadata` * :func:`UGC.SetReturnOnlyIDs` * :func:`UGC.SetReturnPlaytimeStats` * :func:`UGC.SetReturnTotalOnly` * :func:`UGC.SetSearchText` * :func:`UGC.SetSubscriptionsLoadOrder` * :func:`UGC.SetTimeCreatedDateRange` * :func:`UGC.SetTimeUpdatedDateRange` * :func:`UGC.SetUserItemVote` * :func:`UGC.ShowWorkshopEULA` * :func:`UGC.StartItemUpdate` * :func:`UGC.StartPlaytimeTracking` * :func:`UGC.StopPlaytimeTracking` * :func:`UGC.StopPlaytimeTrackingForAllItems` * :func:`UGC.SubmitItemUpdate` * :func:`UGC.SubscribeItem` * :func:`UGC.SuspendDownloads` * :func:`UGC.UnsubscribeItem` * :func:`UGC.UpdateItemPreviewFile` * :func:`UGC.UpdateItemPreviewVideo` List of Callbacks ----------------- * :func:`UGC.OnSteamUGCQueryCompleted` * :func:`UGC.OnSteamUGCRequestUGCDetailsResult` * :func:`UGC.OnCreateItemResult` * :func:`UGC.OnSubmitItemUpdateResult` * :func:`UGC.OnItemInstalled` * :func:`UGC.OnDownloadItemResult` * :func:`UGC.OnUserFavoriteItemsListChanged` * :func:`UGC.OnSetUserItemVoteResult` * :func:`UGC.OnGetUserItemVoteResult` * :func:`UGC.OnStartPlaytimeTrackingResult` * :func:`UGC.OnStopPlaytimeTrackingResult` * :func:`UGC.OnAddUGCDependencyResult` * :func:`UGC.OnRemoveUGCDependencyResult` * :func:`UGC.OnAddAppDependencyResult` * :func:`UGC.OnRemoveAppDependencyResult` * :func:`UGC.OnGetAppDependenciesResult` * :func:`UGC.OnDeleteItemResult` * :func:`UGC.OnUserSubscribedItemsListChanged` * :func:`UGC.OnWorkshopEULAStatus` Function Reference ------------------ .. function:: UGC.AddAppDependency(nPublishedFileID, nAppID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param int - AppId_t nAppID: :param function callback: CallResult callback receiving struct :func:`AddAppDependencyResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `AddAppDependency `_ .. function:: UGC.AddContentDescriptor(handle, descid) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int - EUGCContentDescriptorID descid: :returns: (bool) Return value :SteamWorks: `AddContentDescriptor `_ .. function:: UGC.AddDependency(nParentPublishedFileID, nChildPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nParentPublishedFileID: :param uint64 - PublishedFileId_t nChildPublishedFileID: :param function callback: CallResult callback receiving struct :func:`AddUGCDependencyResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `AddDependency `_ .. function:: UGC.AddExcludedTag(handle, pTagName) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pTagName: :returns: (bool) Return value :SteamWorks: `AddExcludedTag `_ **Example**:: local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByVote, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.AddExcludedTag(handle, 'deprecated') Steam.UGC.SendQueryUGCRequest(handle, function(data, err) end) .. function:: UGC.AddItemKeyValueTag(handle, pchKey, pchValue) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchKey: :param str? pchValue: :returns: (bool) Return value :SteamWorks: `AddItemKeyValueTag `_ **Example**:: local handle = Steam.UGC.StartItemUpdate(appID, publishedFileID) Steam.UGC.AddItemKeyValueTag(handle, 'game_version', '1.5') Steam.UGC.SubmitItemUpdate(handle, nil, function(data, err) end) .. function:: UGC.AddItemPreviewFile(handle, pszPreviewFile, type) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pszPreviewFile: :param int - EItemPreviewType type: :returns: (bool) Return value :SteamWorks: `AddItemPreviewFile `_ .. function:: UGC.AddItemPreviewVideo(handle, pszVideoID) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pszVideoID: :returns: (bool) Return value :SteamWorks: `AddItemPreviewVideo `_ .. function:: UGC.AddItemToFavorites(nAppId, nPublishedFileID, callback) 🤖 **Auto-generated binding** :param int - AppId_t nAppId: :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`UserFavoriteItemsListChanged_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `AddItemToFavorites `_ **Example**:: Steam.UGC.AddItemToFavorites(appID, publishedFileID, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Added to favorites') end end) .. function:: UGC.AddRequiredKeyValueTag(handle, pKey, pValue) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pKey: :param str? pValue: :returns: (bool) Return value :SteamWorks: `AddRequiredKeyValueTag `_ .. function:: UGC.AddRequiredTag(handle, pTagName) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pTagName: :returns: (bool) Return value :SteamWorks: `AddRequiredTag `_ **Example**:: local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByVote, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.AddRequiredTag(handle, 'multiplayer') Steam.UGC.SendQueryUGCRequest(handle, function(data, err) end) .. function:: UGC.AddRequiredTagGroup(handle, pTagGroups) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param pTagGroups: (:ref:`SteamParamStringArray_t `) :returns: (bool) Return value :SteamWorks: `AddRequiredTagGroup `_ .. function:: UGC.BInitWorkshopForGameServer(unWorkshopDepotID, pszFolder) 🤖 **Auto-generated binding** :param int - DepotId_t unWorkshopDepotID: :param str? pszFolder: :returns: (bool) Return value :SteamWorks: `BInitWorkshopForGameServer `_ .. function:: UGC.CreateItem(nConsumerAppId, eFileType, callback) 🤖 **Auto-generated binding** :param int - AppId_t nConsumerAppId: :param int - EWorkshopFileType eFileType: :param function callback: CallResult callback receiving struct :func:`CreateItemResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `CreateItem `_ **Example**:: Steam.UGC.CreateItem(Steam.Utils.GetAppID(), Steam.k_EWorkshopFileTypeCommunity, function(data, err) if err or data.m_eResult ~= Steam.k_EResultOK then print('Failure when creating item') else populateItem(data.m_nPublishedFileId) end end) .. function:: UGC.CreateQueryAllUGCRequestCursor(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor) 🤖 **Auto-generated binding** :param int - EUGCQuery eQueryType: :param int - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType: :param int - AppId_t nCreatorAppID: :param int - AppId_t nConsumerAppID: :param str? pchCursor: :returns: (uint64 - UGCQueryHandle_t) Return value :SteamWorks: `CreateQueryAllUGCRequest `_ **Signature differences from C++ API:** * In C++, this is an overloaded method called ``CreateQueryAllUGCRequest``. luasteam exposes each overload as a distinct function with a type suffix. .. function:: UGC.CreateQueryAllUGCRequestPage(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage) 🤖 **Auto-generated binding** :param int - EUGCQuery eQueryType: :param int - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType: :param int - AppId_t nCreatorAppID: :param int - AppId_t nConsumerAppID: :param int unPage: :returns: (uint64 - UGCQueryHandle_t) Return value :SteamWorks: `CreateQueryAllUGCRequest `_ **Signature differences from C++ API:** * In C++, this is an overloaded method called ``CreateQueryAllUGCRequest``. luasteam exposes each overload as a distinct function with a type suffix. **Example**:: local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByVote, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.SetReturnLongDescription(handle, true) Steam.UGC.SetReturnMetadata(handle, true) -- Then call SendQueryUGCRequest .. function:: UGC.CreateQueryUGCDetailsRequest(pvecPublishedFileID, unNumPublishedFileIDs) 🤖 **Auto-generated binding** :param uint64[]? pvecPublishedFileID: :param int unNumPublishedFileIDs: size of the input array ``pvecPublishedFileID`` :returns: (uint64 - UGCQueryHandle_t) Return value :SteamWorks: `CreateQueryUGCDetailsRequest `_ **Example**:: local fileIDs = {id1, id2, id3} local handle = Steam.UGC.CreateQueryUGCDetailsRequest(fileIDs, #fileIDs) Steam.UGC.SendQueryUGCRequest(handle, function(data, err) if not err then local details = Steam.UGC.GetQueryUGCResult(handle, 0) print('Title:', details.m_rgchTitle) end Steam.UGC.ReleaseQueryUGCRequest(handle) end) .. function:: UGC.CreateQueryUserUGCRequest(unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage) 🤖 **Auto-generated binding** :param int - AccountID_t unAccountID: The account ID to query :param int - EUserUGCList eListType: The type of list to query :param int - EUGCMatchingUGCType eMatchingUGCType: The type of UGC to match :param int - EUserUGCListSortOrder eSortOrder: How to sort the results :param int - AppId_t nCreatorAppID: The app that created the items :param int - AppId_t nConsumerAppID: The app that will consume the items :param int unPage: The page number of results to retrieve (starts at 1) :returns: (uint64 - UGCQueryHandle_t) Return value :SteamWorks: `CreateQueryUserUGCRequest `_ Creates a query to retrieve the details for user-generated content (UGC). **Example**:: local appID = Steam.Utils.GetAppID() local myAccountID = Steam.User.GetSteamID() local handle = Steam.UGC.CreateQueryUserUGCRequest(myAccountID, Steam.k_EUserUGCList_Published, Steam.k_EUGCMatchingUGCType_Items, Steam.k_EUserUGCListSortOrder_CreationOrderDesc, appID, appID, 1) Steam.UGC.SendQueryUGCRequest(handle, function(data, err) if not err and data.m_eResultCode == Steam.k_EResultOK then for i = 0, data.m_unNumResultsReturned - 1 do local details = Steam.UGC.GetQueryUGCResult(handle, i) print('My item:', details.m_rgchTitle) end end Steam.UGC.ReleaseQueryUGCRequest(handle) end) .. function:: UGC.DeleteItem(nPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`DeleteItemResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `DeleteItem `_ **Example**:: Steam.UGC.DeleteItem(publishedFileID, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Item deleted') end end) .. function:: UGC.DownloadItem(nPublishedFileID, bHighPriority) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param bool bHighPriority: :returns: (bool) Return value :SteamWorks: `DownloadItem `_ **Example**:: local queued = Steam.UGC.DownloadItem(publishedFileID, true) if queued then print('Download queued with high priority') end .. function:: UGC.GetAppDependencies(nPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`GetAppDependenciesResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `GetAppDependencies `_ .. function:: UGC.GetDownloadedItems(cMaxEntries) 🤖 **Auto-generated binding** :param int? cMaxEntries: size of the buffer to allocate for ``pvecPublishedFileIDs``. If ``nil`` then the buffer will be ``NULL``. :returns: (int) Return value :returns: (uint64[]) ``pvecPublishedFileIDs`` :SteamWorks: `GetDownloadedItems `_ **Signature differences from C++ API:** * Parameter ``pvecPublishedFileIDs`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetItemDownloadInfo(nPublishedFileID) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :returns: (bool) Return value :returns: (uint64) ``punBytesDownloaded`` :returns: (uint64) ``punBytesTotal`` :SteamWorks: `GetItemDownloadInfo `_ **Signature differences from C++ API:** * Parameter ``punBytesDownloaded`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``punBytesTotal`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local ok, downloaded, total = Steam.UGC.GetItemDownloadInfo(publishedFileID) if ok and total > 0 then print(string.format('Download: %.0f%%', downloaded / total * 100)) end .. function:: UGC.GetItemInstallInfo(nPublishedFileID, cchFolderSize) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param int? cchFolderSize: size of the buffer to allocate for ``pchFolder``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (uint64) ``punSizeOnDisk`` :returns: (str) ``pchFolder`` :returns: (int) ``punTimeStamp`` :SteamWorks: `GetItemInstallInfo `_ **Signature differences from C++ API:** * Parameter ``punSizeOnDisk`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pchFolder`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``punTimeStamp`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local success, sizeOnDisk, folder, timestamp = Steam.UGC.GetItemInstallInfo(item_id, 512) if success then print('Item installed at:', folder) loadMod(folder) end .. function:: UGC.GetItemState(nPublishedFileID) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :returns: (int) Return value :SteamWorks: `GetItemState `_ **Example**:: local state = Steam.UGC.GetItemState(item_id) local installed = bit.band(state, Steam.k_EItemStateInstalled) ~= 0 .. function:: UGC.GetItemUpdateProgress(handle) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :returns: (int - EItemUpdateStatus) Return value :returns: (uint64) ``punBytesProcessed`` :returns: (uint64) ``punBytesTotal`` :SteamWorks: `GetItemUpdateProgress `_ **Signature differences from C++ API:** * Parameter ``punBytesProcessed`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``punBytesTotal`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local status, processed, total = Steam.UGC.GetItemUpdateProgress(updateHandle) if total > 0 then print(string.format('Download progress: %.1f%%', processed / total * 100)) end .. function:: UGC.GetNumDownloadedItems() 🤖 **Auto-generated binding** :returns: (int) Return value :SteamWorks: `GetNumDownloadedItems `_ .. function:: UGC.GetNumSubscribedItems(bIncludeLocallyDisabled) 🤖 **Auto-generated binding** :param bool bIncludeLocallyDisabled: :returns: (int) Return value :SteamWorks: `GetNumSubscribedItems `_ **Example**:: local count = Steam.UGC.GetNumSubscribedItems(false) print('You are subscribed to ' .. count .. ' workshop items') .. function:: UGC.GetNumSupportedGameVersions(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :returns: (int) Return value :SteamWorks: `GetNumSupportedGameVersions `_ .. function:: UGC.GetQueryUGCAdditionalPreview(handle, index, previewIndex, cchURLSize, cchOriginalFileNameSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int previewIndex: :param int? cchURLSize: size of the buffer to allocate for ``pchURLOrVideoID``. If ``nil`` then the buffer will be ``NULL``. :param int? cchOriginalFileNameSize: size of the buffer to allocate for ``pchOriginalFileName``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchURLOrVideoID`` :returns: (str) ``pchOriginalFileName`` :returns: (int) ``pPreviewType`` :SteamWorks: `GetQueryUGCAdditionalPreview `_ **Signature differences from C++ API:** * Parameter ``pchURLOrVideoID`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pchOriginalFileName`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pPreviewType`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCChildren(handle, index, cMaxEntries) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int? cMaxEntries: size of the buffer to allocate for ``pvecPublishedFileID``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (uint64[]) ``pvecPublishedFileID`` :SteamWorks: `GetQueryUGCChildren `_ **Signature differences from C++ API:** * Parameter ``pvecPublishedFileID`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCContentDescriptors(handle, index, cMaxEntries) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int? cMaxEntries: size of the buffer to allocate for ``pvecDescriptors``. If ``nil`` then the buffer will be ``NULL``. :returns: (int) Return value :returns: (int[]) ``pvecDescriptors`` :SteamWorks: `GetQueryUGCContentDescriptors `_ **Signature differences from C++ API:** * Parameter ``pvecDescriptors`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCKeyValueTag(handle, index, keyValueTagIndex, cchKeySize, cchValueSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int keyValueTagIndex: :param int? cchKeySize: size of the buffer to allocate for ``pchKey``. If ``nil`` then the buffer will be ``NULL``. :param int? cchValueSize: size of the buffer to allocate for ``pchValue``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchKey`` :returns: (str) ``pchValue`` :SteamWorks: `GetQueryUGCKeyValueTag `_ **Signature differences from C++ API:** * Parameter ``pchKey`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pchValue`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCMetadata(handle, index, cchMetadatasize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int? cchMetadatasize: size of the buffer to allocate for ``pchMetadata``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchMetadata`` :SteamWorks: `GetQueryUGCMetadata `_ **Signature differences from C++ API:** * Parameter ``pchMetadata`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCNumAdditionalPreviews(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :returns: (int) Return value :SteamWorks: `GetQueryUGCNumAdditionalPreviews `_ .. function:: UGC.GetQueryUGCNumKeyValueTags(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :returns: (int) Return value :SteamWorks: `GetQueryUGCNumKeyValueTags `_ .. function:: UGC.GetQueryUGCNumTags(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :returns: (int) Return value :SteamWorks: `GetQueryUGCNumTags `_ .. function:: UGC.GetQueryUGCPreviewURL(handle, index, cchURLSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int? cchURLSize: size of the buffer to allocate for ``pchURL``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchURL`` :SteamWorks: `GetQueryUGCPreviewURL `_ **Signature differences from C++ API:** * Parameter ``pchURL`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local ok, url = Steam.UGC.GetQueryUGCPreviewURL(handle, index, 512) if ok then downloadPreviewImage(url) end .. function:: UGC.GetQueryUGCResult(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :returns: (bool) Return value :returns: (:ref:`SteamUGCDetails_t `) ``pDetails`` :SteamWorks: `GetQueryUGCResult `_ **Signature differences from C++ API:** * Parameter ``pDetails`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Notes:** * See :func:`UGC.SendQueryUGCRequest`'s example. .. function:: UGC.GetQueryUGCStatistic(handle, index, eStatType) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int - EItemStatistic eStatType: :returns: (bool) Return value :returns: (uint64) ``pStatValue`` :SteamWorks: `GetQueryUGCStatistic `_ **Signature differences from C++ API:** * Parameter ``pStatValue`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCTag(handle, index, indexTag, cchValueSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int indexTag: :param int? cchValueSize: size of the buffer to allocate for ``pchValue``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchValue`` :SteamWorks: `GetQueryUGCTag `_ **Signature differences from C++ API:** * Parameter ``pchValue`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetQueryUGCTagDisplayName(handle, index, indexTag, cchValueSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int indexTag: :param int? cchValueSize: size of the buffer to allocate for ``pchValue``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchValue`` :SteamWorks: `GetQueryUGCTagDisplayName `_ **Signature differences from C++ API:** * Parameter ``pchValue`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetSubscribedItems(cMaxEntries, bIncludeLocallyDisabled) 🤖 **Auto-generated binding** :param int? cMaxEntries: size of the buffer to allocate for ``pvecPublishedFileID``. If ``nil`` then the buffer will be ``NULL``. :param bool bIncludeLocallyDisabled: :returns: (int) Return value :returns: (uint64[]) ``pvecPublishedFileID`` :SteamWorks: `GetSubscribedItems `_ **Signature differences from C++ API:** * Parameter ``pvecPublishedFileID`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. **Example**:: local count = Steam.UGC.GetNumSubscribedItems(false) local _, items = Steam.UGC.GetSubscribedItems(count, false) for _, item_id in ipairs(items) do print('Subscribed item:', tostring(item_id)) end .. function:: UGC.GetSupportedGameVersionData(handle, index, versionIndex, cchGameBranchSize) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int index: :param int versionIndex: :param int? cchGameBranchSize: size of the buffer to allocate for the output arrays ``pchGameBranchMin``, ``pchGameBranchMax``. If ``nil`` then the buffer will be ``NULL``. :returns: (bool) Return value :returns: (str) ``pchGameBranchMin`` :returns: (str) ``pchGameBranchMax`` :SteamWorks: `GetSupportedGameVersionData `_ **Signature differences from C++ API:** * Parameter ``pchGameBranchMin`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. * Parameter ``pchGameBranchMax`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetUserContentDescriptorPreferences(cMaxEntries) 🤖 **Auto-generated binding** :param int? cMaxEntries: size of the buffer to allocate for ``pvecDescriptors``. If ``nil`` then the buffer will be ``NULL``. :returns: (int) Return value :returns: (int[]) ``pvecDescriptors`` :SteamWorks: `GetUserContentDescriptorPreferences `_ **Signature differences from C++ API:** * Parameter ``pvecDescriptors`` is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value. .. function:: UGC.GetUserItemVote(nPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`GetUserItemVoteResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `GetUserItemVote `_ **Example**:: Steam.UGC.GetUserItemVote(publishedFileID, function(data, err) if not err then print('Voted up:', data.m_bVotedUp ~= 0) print('Voted down:', data.m_bVotedDown ~= 0) end end) .. function:: UGC.GetWorkshopEULAStatus(callback) 🤖 **Auto-generated binding** :param function callback: CallResult callback receiving struct :func:`WorkshopEULAStatus_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `GetWorkshopEULAStatus `_ .. function:: UGC.MarkDownloadedItemAsUnused(nPublishedFileID) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :returns: (bool) Return value :SteamWorks: `MarkDownloadedItemAsUnused `_ .. function:: UGC.ReleaseQueryUGCRequest(handle) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :returns: (bool) Return value :SteamWorks: `ReleaseQueryUGCRequest `_ **Notes:** * See :func:`UGC.SendQueryUGCRequest`'s example. .. function:: UGC.RemoveAllItemKeyValueTags(handle) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :returns: (bool) Return value :SteamWorks: `RemoveAllItemKeyValueTags `_ .. function:: UGC.RemoveAppDependency(nPublishedFileID, nAppID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param int - AppId_t nAppID: :param function callback: CallResult callback receiving struct :func:`RemoveAppDependencyResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `RemoveAppDependency `_ .. function:: UGC.RemoveContentDescriptor(handle, descid) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int - EUGCContentDescriptorID descid: :returns: (bool) Return value :SteamWorks: `RemoveContentDescriptor `_ .. function:: UGC.RemoveDependency(nParentPublishedFileID, nChildPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nParentPublishedFileID: :param uint64 - PublishedFileId_t nChildPublishedFileID: :param function callback: CallResult callback receiving struct :func:`RemoveUGCDependencyResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `RemoveDependency `_ .. function:: UGC.RemoveItemFromFavorites(nAppId, nPublishedFileID, callback) 🤖 **Auto-generated binding** :param int - AppId_t nAppId: :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`UserFavoriteItemsListChanged_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `RemoveItemFromFavorites `_ **Example**:: Steam.UGC.RemoveItemFromFavorites(appID, publishedFileID, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Removed from favorites') end end) .. function:: UGC.RemoveItemKeyValueTags(handle, pchKey) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchKey: :returns: (bool) Return value :SteamWorks: `RemoveItemKeyValueTags `_ .. function:: UGC.RemoveItemPreview(handle, index) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int index: :returns: (bool) Return value :SteamWorks: `RemoveItemPreview `_ .. function:: UGC.RequestUGCDetails(nPublishedFileID, unMaxAgeSeconds, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param int unMaxAgeSeconds: :param function callback: CallResult callback receiving struct :func:`SteamUGCRequestUGCDetailsResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `RequestUGCDetails `_ **Example**:: Steam.UGC.RequestUGCDetails(publishedFileID, 0, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Title:', data.m_details.m_rgchTitle) end end) .. function:: UGC.SendQueryUGCRequest(handle, callback) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param function callback: CallResult callback receiving struct :func:`SteamUGCQueryCompleted_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `SendQueryUGCRequest `_ **Example**:: Steam.UGC.SendQueryUGCRequest(queryHandle, function(data, err) if err or data.m_eResultCode ~= Steam.k_EResultOK then print('Query failed') Steam.UGC.ReleaseQueryUGCRequest(queryHandle) return end for i = 0, data.m_unNumResultsReturned - 1 do local details = Steam.UGC.GetQueryUGCResult(queryHandle, i) print('Item:', tostring(details.m_nPublishedFileId), details.m_rgchTitle) end Steam.UGC.ReleaseQueryUGCRequest(queryHandle) end) .. function:: UGC.SetAdminQuery(handle, bAdminQuery) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param bool bAdminQuery: :returns: (bool) Return value :SteamWorks: `SetAdminQuery `_ .. function:: UGC.SetAllowCachedResponse(handle, unMaxAgeSeconds) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int unMaxAgeSeconds: :returns: (bool) Return value :SteamWorks: `SetAllowCachedResponse `_ .. function:: UGC.SetAllowLegacyUpload(handle, bAllowLegacyUpload) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param bool bAllowLegacyUpload: :returns: (bool) Return value :SteamWorks: `SetAllowLegacyUpload `_ .. function:: UGC.SetCloudFileNameFilter(handle, pMatchCloudFileName) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pMatchCloudFileName: :returns: (bool) Return value :SteamWorks: `SetCloudFileNameFilter `_ .. function:: UGC.SetItemContent(handle, pszContentFolder) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pszContentFolder: :returns: (bool) Return value :SteamWorks: `SetItemContent `_ **Notes:** * See :func:`UGC.StartItemUpdate`'s example. .. function:: UGC.SetItemDescription(handle, pchDescription) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchDescription: :returns: (bool) Return value :SteamWorks: `SetItemDescription `_ **Notes:** * See :func:`UGC.StartItemUpdate`'s example. .. function:: UGC.SetItemMetadata(handle, pchMetaData) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchMetaData: :returns: (bool) Return value :SteamWorks: `SetItemMetadata `_ **Example**:: local handle = Steam.UGC.StartItemUpdate(appID, publishedFileID) Steam.UGC.SetItemMetadata(handle, '{"version":"1.2","requires":"dlc1"}') Steam.UGC.SubmitItemUpdate(handle, nil, function(data, err) end) .. function:: UGC.SetItemPreview(handle, pszPreviewFile) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pszPreviewFile: :returns: (bool) Return value :SteamWorks: `SetItemPreview `_ **Notes:** * See :func:`UGC.StartItemUpdate`'s example. .. function:: UGC.SetItemTags(updateHandle, pTags, bAllowAdminTags) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t updateHandle: :param pTags: (:ref:`SteamParamStringArray_t `) :param bool bAllowAdminTags: :returns: (bool) Return value :SteamWorks: `SetItemTags `_ **Example**:: local handle = Steam.UGC.StartItemUpdate(appID, publishedFileID) local tags = Steam.newSteamParamStringArray_t { m_ppStrings = {'rpg', 'adventure', 'fantasy'}, m_nNumStrings = 3 } Steam.UGC.SetItemTags(handle, tags, false) Steam.UGC.SubmitItemUpdate(handle, 'Updated tags', function(data, err) end) .. function:: UGC.SetItemTitle(handle, pchTitle) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchTitle: :returns: (bool) Return value :SteamWorks: `SetItemTitle `_ **Notes:** * See :func:`UGC.StartItemUpdate`'s example. .. function:: UGC.SetItemUpdateLanguage(handle, pchLanguage) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchLanguage: :returns: (bool) Return value :SteamWorks: `SetItemUpdateLanguage `_ **Example**:: local handle = Steam.UGC.StartItemUpdate(appID, publishedFileID) Steam.UGC.SetItemUpdateLanguage(handle, 'english') Steam.UGC.SubmitItemUpdate(handle, nil, function(data, err) end) .. function:: UGC.SetItemVisibility(handle, eVisibility) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int - ERemoteStoragePublishedFileVisibility eVisibility: :returns: (bool) Return value :SteamWorks: `SetItemVisibility `_ **Example**:: local handle = Steam.UGC.StartItemUpdate(appID, publishedFileID) Steam.UGC.SetItemVisibility(handle, Steam.k_ERemoteStoragePublishedFileVisibilityPublic) Steam.UGC.SubmitItemUpdate(handle, nil, function(data, err) end) .. function:: UGC.SetItemsDisabledLocally(pvecPublishedFileIDs, unNumPublishedFileIDs, bDisabledLocally) 🤖 **Auto-generated binding** :param uint64[]? pvecPublishedFileIDs: :param int unNumPublishedFileIDs: size of the input array ``pvecPublishedFileIDs`` :param bool bDisabledLocally: :returns: (bool) Return value :SteamWorks: `SetItemsDisabledLocally `_ .. function:: UGC.SetLanguage(handle, pchLanguage) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pchLanguage: :returns: (bool) Return value :SteamWorks: `SetLanguage `_ .. function:: UGC.SetMatchAnyTag(handle, bMatchAnyTag) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bMatchAnyTag: :returns: (bool) Return value :SteamWorks: `SetMatchAnyTag `_ .. function:: UGC.SetRankedByTrendDays(handle, unDays) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int unDays: :returns: (bool) Return value :SteamWorks: `SetRankedByTrendDays `_ **Example**:: -- Query items trending in the last 7 days local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByTrend, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.SetRankedByTrendDays(handle, 7) Steam.UGC.SendQueryUGCRequest(handle, function(data, err) end) .. function:: UGC.SetRequiredGameVersions(handle, pszGameBranchMin, pszGameBranchMax) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pszGameBranchMin: :param str? pszGameBranchMax: :returns: (bool) Return value :SteamWorks: `SetRequiredGameVersions `_ .. function:: UGC.SetReturnAdditionalPreviews(handle, bReturnAdditionalPreviews) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnAdditionalPreviews: :returns: (bool) Return value :SteamWorks: `SetReturnAdditionalPreviews `_ .. function:: UGC.SetReturnChildren(handle, bReturnChildren) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnChildren: :returns: (bool) Return value :SteamWorks: `SetReturnChildren `_ .. function:: UGC.SetReturnKeyValueTags(handle, bReturnKeyValueTags) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnKeyValueTags: :returns: (bool) Return value :SteamWorks: `SetReturnKeyValueTags `_ **Example**:: local handle = Steam.UGC.CreateQueryUGCDetailsRequest({publishedFileID}, 1) Steam.UGC.SetReturnKeyValueTags(handle, true) Steam.UGC.SendQueryUGCRequest(handle, function(data, err) if not err then local count = Steam.UGC.GetQueryUGCNumKeyValueTags(handle, 0) for i = 0, count - 1 do local ok, k, v = Steam.UGC.GetQueryUGCKeyValueTag(handle, 0, i, 64, 256) if ok then print(k .. '=' .. v) end end end Steam.UGC.ReleaseQueryUGCRequest(handle) end) .. function:: UGC.SetReturnLongDescription(handle, bReturnLongDescription) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnLongDescription: :returns: (bool) Return value :SteamWorks: `SetReturnLongDescription `_ .. function:: UGC.SetReturnMetadata(handle, bReturnMetadata) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnMetadata: :returns: (bool) Return value :SteamWorks: `SetReturnMetadata `_ **Example**:: local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByVote, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.SetReturnMetadata(handle, true) Steam.UGC.SendQueryUGCRequest(handle, function(data, err) if not err then local meta = Steam.UGC.GetQueryUGCMetadata(handle, 0, 256) print('Metadata:', meta) end Steam.UGC.ReleaseQueryUGCRequest(handle) end) .. function:: UGC.SetReturnOnlyIDs(handle, bReturnOnlyIDs) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnOnlyIDs: :returns: (bool) Return value :SteamWorks: `SetReturnOnlyIDs `_ .. function:: UGC.SetReturnPlaytimeStats(handle, unDays) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int unDays: :returns: (bool) Return value :SteamWorks: `SetReturnPlaytimeStats `_ .. function:: UGC.SetReturnTotalOnly(handle, bReturnTotalOnly) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param bool bReturnTotalOnly: :returns: (bool) Return value :SteamWorks: `SetReturnTotalOnly `_ .. function:: UGC.SetSearchText(handle, pSearchText) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param str? pSearchText: :returns: (bool) Return value :SteamWorks: `SetSearchText `_ **Example**:: local handle = Steam.UGC.CreateQueryAllUGCRequestPage(Steam.k_EUGCQuery_RankedByVote, Steam.k_EUGCMatchingUGCType_Items, appID, appID, 1) Steam.UGC.SetSearchText(handle, 'dungeon') Steam.UGC.SendQueryUGCRequest(handle, function(data, err) end) .. function:: UGC.SetSubscriptionsLoadOrder(pvecPublishedFileIDs, unNumPublishedFileIDs) 🤖 **Auto-generated binding** :param uint64[]? pvecPublishedFileIDs: :param int unNumPublishedFileIDs: size of the input array ``pvecPublishedFileIDs`` :returns: (bool) Return value :SteamWorks: `SetSubscriptionsLoadOrder `_ .. function:: UGC.SetTimeCreatedDateRange(handle, rtStart, rtEnd) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int - RTime32 rtStart: :param int - RTime32 rtEnd: :returns: (bool) Return value :SteamWorks: `SetTimeCreatedDateRange `_ .. function:: UGC.SetTimeUpdatedDateRange(handle, rtStart, rtEnd) 🤖 **Auto-generated binding** :param uint64 - UGCQueryHandle_t handle: :param int - RTime32 rtStart: :param int - RTime32 rtEnd: :returns: (bool) Return value :SteamWorks: `SetTimeUpdatedDateRange `_ .. function:: UGC.SetUserItemVote(nPublishedFileID, bVoteUp, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param bool bVoteUp: :param function callback: CallResult callback receiving struct :func:`SetUserItemVoteResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `SetUserItemVote `_ **Example**:: Steam.UGC.SetUserItemVote(publishedFileID, true, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Vote recorded') end end) .. function:: UGC.ShowWorkshopEULA() 🤖 **Auto-generated binding** :returns: (bool) Return value :SteamWorks: `ShowWorkshopEULA `_ .. function:: UGC.StartItemUpdate(nConsumerAppId, nPublishedFileID) 🤖 **Auto-generated binding** :param int - AppId_t nConsumerAppId: :param uint64 - PublishedFileId_t nPublishedFileID: :returns: (uint64 - UGCUpdateHandle_t) Return value :SteamWorks: `StartItemUpdate `_ **Example**:: local function populateItem(id) local handle = Steam.UGC.StartItemUpdate(Steam.Utils.GetAppID(), id) Steam.UGC.SetItemContent(handle, rootFolder) Steam.UGC.SetItemTitle(handle, 'My Item') Steam.UGC.SetItemDescription(handle, 'A Workshop item') Steam.UGC.SetItemPreview(handle, rootFolder .. '/preview.png') Steam.UGC.SubmitItemUpdate(handle, 'First Revision', function(data, err) if err or data.m_eResult ~= Steam.k_EResultOK then print('Failure when submitting item') else print('Item submitted successfully:', tostring(data.m_nPublishedFileId)) end end) end .. function:: UGC.StartPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs, callback) 🤖 **Auto-generated binding** :param uint64[]? pvecPublishedFileID: :param int unNumPublishedFileIDs: size of the input array ``pvecPublishedFileID`` :param function callback: CallResult callback receiving struct :func:`StartPlaytimeTrackingResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `StartPlaytimeTracking `_ **Example**:: local ids = {mod1ID, mod2ID} Steam.UGC.StartPlaytimeTracking(ids, #ids, function(data, err) print('Playtime tracking started') end) .. function:: UGC.StopPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs, callback) 🤖 **Auto-generated binding** :param uint64[]? pvecPublishedFileID: :param int unNumPublishedFileIDs: size of the input array ``pvecPublishedFileID`` :param function callback: CallResult callback receiving struct :func:`StopPlaytimeTrackingResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `StopPlaytimeTracking `_ .. function:: UGC.StopPlaytimeTrackingForAllItems(callback) 🤖 **Auto-generated binding** :param function callback: CallResult callback receiving struct :func:`StopPlaytimeTrackingResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `StopPlaytimeTrackingForAllItems `_ **Example**:: Steam.UGC.StopPlaytimeTrackingForAllItems(function(data, err) print('Playtime tracking stopped for all items') end) .. function:: UGC.SubmitItemUpdate(handle, pchChangeNote, callback) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param str? pchChangeNote: :param function callback: CallResult callback receiving struct :func:`SubmitItemUpdateResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `SubmitItemUpdate `_ **Notes:** * See :func:`UGC.StartItemUpdate`'s example. .. function:: UGC.SubscribeItem(nPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`RemoteStorageSubscribePublishedFileResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `SubscribeItem `_ **Example**:: Steam.UGC.SubscribeItem(publishedFileID, function(data, err) if err or data.m_eResult ~= Steam.k_EResultOK then print('Subscribe failed') else print('Subscribed to item:', tostring(data.m_nPublishedFileId)) end end) .. function:: UGC.SuspendDownloads(bSuspend) 🤖 **Auto-generated binding** :param bool bSuspend: :SteamWorks: `SuspendDownloads `_ **Example**:: -- Pause all workshop downloads during gameplay Steam.UGC.SuspendDownloads(true) -- Resume when at main menu Steam.UGC.SuspendDownloads(false) .. function:: UGC.UnsubscribeItem(nPublishedFileID, callback) 🤖 **Auto-generated binding** :param uint64 - PublishedFileId_t nPublishedFileID: :param function callback: CallResult callback receiving struct :func:`RemoteStorageUnsubscribePublishedFileResult_t ` and a boolean :returns: (uint64) ``SteamAPICall_t`` handle for this async call. The result is delivered via the ``callback`` parameter when :func:`Steam.RunCallbacks` is called. :SteamWorks: `UnsubscribeItem `_ **Example**:: Steam.UGC.UnsubscribeItem(publishedFileID, function(data, err) if not err and data.m_eResult == Steam.k_EResultOK then print('Unsubscribed from item') end end) .. function:: UGC.UpdateItemPreviewFile(handle, index, pszPreviewFile) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int index: :param str? pszPreviewFile: :returns: (bool) Return value :SteamWorks: `UpdateItemPreviewFile `_ .. function:: UGC.UpdateItemPreviewVideo(handle, index, pszVideoID) 🤖 **Auto-generated binding** :param uint64 - UGCUpdateHandle_t handle: :param int index: :param str? pszVideoID: :returns: (bool) Return value :SteamWorks: `UpdateItemPreviewVideo `_ Unimplemented Methods --------------------- .. function:: UGC.GetQueryUGCKeyValueTag :no-index: ✋ **Not implemented** - blocklist: Overload which is not in documentation :SteamWorks: `GetQueryUGCKeyValueTag `_ Callbacks --------- .. function:: UGC.OnSteamUGCQueryCompleted Callback for `SteamUGCQueryCompleted_t `_ **callback(data)** receives: * **data.m_handle** *(uint64 - UGCQueryHandle_t)* * **data.m_eResult** *(int - EResult)* * **data.m_unNumResultsReturned** *(int)* * **data.m_unTotalMatchingResults** *(int)* * **data.m_bCachedData** *(bool)* * **data.m_rgchNextCursor** *(string)* **Example**:: function Steam.UGC.OnSteamUGCQueryCompleted(data) if data.m_eResultCode == Steam.k_EResultOK then print('Query returned', data.m_unNumResultsReturned, 'results') end end .. function:: UGC.OnSteamUGCRequestUGCDetailsResult Callback for `SteamUGCRequestUGCDetailsResult_t `_ **callback(data)** receives: * **data.m_details** *(SteamUGCDetails_t)* * **data.m_bCachedData** *(bool)* .. function:: UGC.OnCreateItemResult Callback for `CreateItemResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_bUserNeedsToAcceptWorkshopLegalAgreement** *(bool)* .. function:: UGC.OnSubmitItemUpdateResult Callback for `SubmitItemUpdateResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_bUserNeedsToAcceptWorkshopLegalAgreement** *(bool)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* .. function:: UGC.OnItemInstalled Callback for `ItemInstalled_t `_ **callback(data)** receives: * **data.m_unAppID** *(int - AppId_t)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_hLegacyContent** *(uint64 - UGCHandle_t)* * **data.m_unManifestID** *(uint64)* **Example**:: function Steam.UGC.OnItemInstalled(data) local ok, size, folder, ts = Steam.UGC.GetItemInstallInfo(data.m_nPublishedFileId, 512) if ok then print('Mod installed at:', folder) loadMod(folder) end end .. function:: UGC.OnDownloadItemResult Callback for `DownloadItemResult_t `_ **callback(data)** receives: * **data.m_unAppID** *(int - AppId_t)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_eResult** *(int - EResult)* **Example**:: function Steam.UGC.OnDownloadItemResult(data) if data.m_eResult == Steam.k_EResultOK then print('Item downloaded:', tostring(data.m_nPublishedFileId)) else print('Download failed:', data.m_eResult) end end .. function:: UGC.OnUserFavoriteItemsListChanged Callback for `UserFavoriteItemsListChanged_t `_ **callback(data)** receives: * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_eResult** *(int - EResult)* * **data.m_bWasAddRequest** *(bool)* .. function:: UGC.OnSetUserItemVoteResult Callback for `SetUserItemVoteResult_t `_ **callback(data)** receives: * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_eResult** *(int - EResult)* * **data.m_bVoteUp** *(bool)* .. function:: UGC.OnGetUserItemVoteResult Callback for `GetUserItemVoteResult_t `_ **callback(data)** receives: * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_eResult** *(int - EResult)* * **data.m_bVotedUp** *(bool)* * **data.m_bVotedDown** *(bool)* * **data.m_bVoteSkipped** *(bool)* .. function:: UGC.OnStartPlaytimeTrackingResult Callback for `StartPlaytimeTrackingResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* .. function:: UGC.OnStopPlaytimeTrackingResult Callback for `StopPlaytimeTrackingResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* .. function:: UGC.OnAddUGCDependencyResult Callback for `AddUGCDependencyResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_nChildPublishedFileId** *(uint64 - PublishedFileId_t)* .. function:: UGC.OnRemoveUGCDependencyResult Callback for `RemoveUGCDependencyResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_nChildPublishedFileId** *(uint64 - PublishedFileId_t)* .. function:: UGC.OnAddAppDependencyResult Callback for `AddAppDependencyResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_nAppID** *(int - AppId_t)* .. function:: UGC.OnRemoveAppDependencyResult Callback for `RemoveAppDependencyResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_nAppID** *(int - AppId_t)* .. function:: UGC.OnGetAppDependenciesResult Callback for `GetAppDependenciesResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* * **data.m_rgAppIDs** *(int[] - AppId_t)* * **data.m_nNumAppDependencies** *(int)* * **data.m_nTotalNumAppDependencies** *(int)* .. function:: UGC.OnDeleteItemResult Callback for `DeleteItemResult_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nPublishedFileId** *(uint64 - PublishedFileId_t)* .. function:: UGC.OnUserSubscribedItemsListChanged Callback for `UserSubscribedItemsListChanged_t `_ **callback(data)** receives: * **data.m_nAppID** *(int - AppId_t)* .. function:: UGC.OnWorkshopEULAStatus Callback for `WorkshopEULAStatus_t `_ **callback(data)** receives: * **data.m_eResult** *(int - EResult)* * **data.m_nAppID** *(int - AppId_t)* * **data.m_unVersion** *(int)* * **data.m_rtAction** *(int - RTime32)* * **data.m_bAccepted** *(bool)* * **data.m_bNeedsAction** *(bool)*