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

List of Callbacks

Function Reference

UGC.AddAppDependency(nPublishedFileID, nAppID, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • nAppID (int - AppId_t) –

  • callback (function) – CallResult callback receiving struct AddAppDependencyResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

AddAppDependency

UGC.AddContentDescriptor(handle, descid)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • descid (int - EUGCContentDescriptorID) –

Returns:

(bool) Return value

SteamWorks:

AddContentDescriptor

UGC.AddDependency(nParentPublishedFileID, nChildPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nParentPublishedFileID (uint64 - PublishedFileId_t) –

  • nChildPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct AddUGCDependencyResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

AddDependency

UGC.AddExcludedTag(handle, pTagName)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pTagName (str?) –

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)
UGC.AddItemKeyValueTag(handle, pchKey, pchValue)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchKey (str?) –

  • pchValue (str?) –

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)
UGC.AddItemPreviewFile(handle, pszPreviewFile, type)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pszPreviewFile (str?) –

  • type (int - EItemPreviewType) –

Returns:

(bool) Return value

SteamWorks:

AddItemPreviewFile

UGC.AddItemPreviewVideo(handle, pszVideoID)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pszVideoID (str?) –

Returns:

(bool) Return value

SteamWorks:

AddItemPreviewVideo

UGC.AddItemToFavorites(nAppId, nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nAppId (int - AppId_t) –

  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct UserFavoriteItemsListChanged_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.AddRequiredKeyValueTag(handle, pKey, pValue)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pKey (str?) –

  • pValue (str?) –

Returns:

(bool) Return value

SteamWorks:

AddRequiredKeyValueTag

UGC.AddRequiredTag(handle, pTagName)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pTagName (str?) –

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)
UGC.AddRequiredTagGroup(handle, pTagGroups)

🤖 Auto-generated binding

Parameters:
Returns:

(bool) Return value

SteamWorks:

AddRequiredTagGroup

UGC.BInitWorkshopForGameServer(unWorkshopDepotID, pszFolder)

🤖 Auto-generated binding

Parameters:
  • unWorkshopDepotID (int - DepotId_t) –

  • pszFolder (str?) –

Returns:

(bool) Return value

SteamWorks:

BInitWorkshopForGameServer

UGC.CreateItem(nConsumerAppId, eFileType, callback)

🤖 Auto-generated binding

Parameters:
  • nConsumerAppId (int - AppId_t) –

  • eFileType (int - EWorkshopFileType) –

  • callback (function) – CallResult callback receiving struct CreateItemResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.CreateQueryAllUGCRequestCursor(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor)

🤖 Auto-generated binding

Parameters:
  • eQueryType (int - EUGCQuery) –

  • eMatchingeMatchingUGCTypeFileType (int - EUGCMatchingUGCType) –

  • nCreatorAppID (int - AppId_t) –

  • nConsumerAppID (int - AppId_t) –

  • pchCursor (str?) –

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.

UGC.CreateQueryAllUGCRequestPage(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage)

🤖 Auto-generated binding

Parameters:
  • eQueryType (int - EUGCQuery) –

  • eMatchingeMatchingUGCTypeFileType (int - EUGCMatchingUGCType) –

  • nCreatorAppID (int - AppId_t) –

  • nConsumerAppID (int - AppId_t) –

  • unPage (int) –

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
UGC.CreateQueryUGCDetailsRequest(pvecPublishedFileID, unNumPublishedFileIDs)

🤖 Auto-generated binding

Parameters:
  • pvecPublishedFileID (uint64[]?) –

  • unNumPublishedFileIDs (int) – 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)
UGC.CreateQueryUserUGCRequest(unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage)

🤖 Auto-generated binding

Parameters:
  • unAccountID (int - AccountID_t) – The account ID to query

  • eListType (int - EUserUGCList) – The type of list to query

  • eMatchingUGCType (int - EUGCMatchingUGCType) – The type of UGC to match

  • eSortOrder (int - EUserUGCListSortOrder) – How to sort the results

  • nCreatorAppID (int - AppId_t) – The app that created the items

  • nConsumerAppID (int - AppId_t) – The app that will consume the items

  • unPage (int) – 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)
UGC.DeleteItem(nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct DeleteItemResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.DownloadItem(nPublishedFileID, bHighPriority)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • bHighPriority (bool) –

Returns:

(bool) Return value

SteamWorks:

DownloadItem

Example:

local queued = Steam.UGC.DownloadItem(publishedFileID, true)
if queued then
    print('Download queued with high priority')
end
UGC.GetAppDependencies(nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct GetAppDependenciesResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

GetAppDependencies

UGC.GetDownloadedItems(cMaxEntries)

🤖 Auto-generated binding

Parameters:

cMaxEntries (int?) – 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.

UGC.GetItemDownloadInfo(nPublishedFileID)

🤖 Auto-generated binding

Parameters:

nPublishedFileID (uint64 - PublishedFileId_t) –

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
UGC.GetItemInstallInfo(nPublishedFileID, cchFolderSize)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • cchFolderSize (int?) – 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
UGC.GetItemState(nPublishedFileID)

🤖 Auto-generated binding

Parameters:

nPublishedFileID (uint64 - PublishedFileId_t) –

Returns:

(int) Return value

SteamWorks:

GetItemState

Example:

local state = Steam.UGC.GetItemState(item_id)
local installed = bit.band(state, Steam.k_EItemStateInstalled) ~= 0
UGC.GetItemUpdateProgress(handle)

🤖 Auto-generated binding

Parameters:

handle (uint64 - UGCUpdateHandle_t) –

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
UGC.GetNumDownloadedItems()

🤖 Auto-generated binding

Returns:

(int) Return value

SteamWorks:

GetNumDownloadedItems

UGC.GetNumSubscribedItems(bIncludeLocallyDisabled)

🤖 Auto-generated binding

Parameters:

bIncludeLocallyDisabled (bool) –

Returns:

(int) Return value

SteamWorks:

GetNumSubscribedItems

Example:

local count = Steam.UGC.GetNumSubscribedItems(false)
print('You are subscribed to ' .. count .. ' workshop items')
UGC.GetNumSupportedGameVersions(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

Returns:

(int) Return value

SteamWorks:

GetNumSupportedGameVersions

UGC.GetQueryUGCAdditionalPreview(handle, index, previewIndex, cchURLSize, cchOriginalFileNameSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • previewIndex (int) –

  • cchURLSize (int?) – size of the buffer to allocate for pchURLOrVideoID. If nil then the buffer will be NULL.

  • cchOriginalFileNameSize (int?) – 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.

UGC.GetQueryUGCChildren(handle, index, cMaxEntries)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • cMaxEntries (int?) – 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.

UGC.GetQueryUGCContentDescriptors(handle, index, cMaxEntries)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • cMaxEntries (int?) – 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.

UGC.GetQueryUGCKeyValueTag(handle, index, keyValueTagIndex, cchKeySize, cchValueSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • keyValueTagIndex (int) –

  • cchKeySize (int?) – size of the buffer to allocate for pchKey. If nil then the buffer will be NULL.

  • cchValueSize (int?) – 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.

UGC.GetQueryUGCMetadata(handle, index, cchMetadatasize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • cchMetadatasize (int?) – 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.

UGC.GetQueryUGCNumAdditionalPreviews(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

Returns:

(int) Return value

SteamWorks:

GetQueryUGCNumAdditionalPreviews

UGC.GetQueryUGCNumKeyValueTags(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

Returns:

(int) Return value

SteamWorks:

GetQueryUGCNumKeyValueTags

UGC.GetQueryUGCNumTags(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

Returns:

(int) Return value

SteamWorks:

GetQueryUGCNumTags

UGC.GetQueryUGCPreviewURL(handle, index, cchURLSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • cchURLSize (int?) – 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
UGC.GetQueryUGCResult(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

Returns:

(bool) Return value

Returns:

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

UGC.GetQueryUGCStatistic(handle, index, eStatType)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • eStatType (int - EItemStatistic) –

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.

UGC.GetQueryUGCTag(handle, index, indexTag, cchValueSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • indexTag (int) –

  • cchValueSize (int?) – 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.

UGC.GetQueryUGCTagDisplayName(handle, index, indexTag, cchValueSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • indexTag (int) –

  • cchValueSize (int?) – 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.

UGC.GetSubscribedItems(cMaxEntries, bIncludeLocallyDisabled)

🤖 Auto-generated binding

Parameters:
  • cMaxEntries (int?) – size of the buffer to allocate for pvecPublishedFileID. If nil then the buffer will be NULL.

  • bIncludeLocallyDisabled (bool) –

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
UGC.GetSupportedGameVersionData(handle, index, versionIndex, cchGameBranchSize)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • index (int) –

  • versionIndex (int) –

  • cchGameBranchSize (int?) – 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.

UGC.GetUserContentDescriptorPreferences(cMaxEntries)

🤖 Auto-generated binding

Parameters:

cMaxEntries (int?) – 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.

UGC.GetUserItemVote(nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct GetUserItemVoteResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.GetWorkshopEULAStatus(callback)

🤖 Auto-generated binding

Parameters:

callback (function) – CallResult callback receiving struct WorkshopEULAStatus_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

GetWorkshopEULAStatus

UGC.MarkDownloadedItemAsUnused(nPublishedFileID)

🤖 Auto-generated binding

Parameters:

nPublishedFileID (uint64 - PublishedFileId_t) –

Returns:

(bool) Return value

SteamWorks:

MarkDownloadedItemAsUnused

UGC.ReleaseQueryUGCRequest(handle)

🤖 Auto-generated binding

Parameters:

handle (uint64 - UGCQueryHandle_t) –

Returns:

(bool) Return value

SteamWorks:

ReleaseQueryUGCRequest

Notes:

UGC.RemoveAllItemKeyValueTags(handle)

🤖 Auto-generated binding

Parameters:

handle (uint64 - UGCUpdateHandle_t) –

Returns:

(bool) Return value

SteamWorks:

RemoveAllItemKeyValueTags

UGC.RemoveAppDependency(nPublishedFileID, nAppID, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • nAppID (int - AppId_t) –

  • callback (function) – CallResult callback receiving struct RemoveAppDependencyResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

RemoveAppDependency

UGC.RemoveContentDescriptor(handle, descid)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • descid (int - EUGCContentDescriptorID) –

Returns:

(bool) Return value

SteamWorks:

RemoveContentDescriptor

UGC.RemoveDependency(nParentPublishedFileID, nChildPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nParentPublishedFileID (uint64 - PublishedFileId_t) –

  • nChildPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct RemoveUGCDependencyResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

RemoveDependency

UGC.RemoveItemFromFavorites(nAppId, nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
  • nAppId (int - AppId_t) –

  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • callback (function) – CallResult callback receiving struct UserFavoriteItemsListChanged_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.RemoveItemKeyValueTags(handle, pchKey)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchKey (str?) –

Returns:

(bool) Return value

SteamWorks:

RemoveItemKeyValueTags

UGC.RemoveItemPreview(handle, index)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • index (int) –

Returns:

(bool) Return value

SteamWorks:

RemoveItemPreview

UGC.RequestUGCDetails(nPublishedFileID, unMaxAgeSeconds, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • unMaxAgeSeconds (int) –

  • callback (function) – CallResult callback receiving struct SteamUGCRequestUGCDetailsResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.SendQueryUGCRequest(handle, callback)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • callback (function) – CallResult callback receiving struct SteamUGCQueryCompleted_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.SetAdminQuery(handle, bAdminQuery)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • bAdminQuery (bool) –

Returns:

(bool) Return value

SteamWorks:

SetAdminQuery

UGC.SetAllowCachedResponse(handle, unMaxAgeSeconds)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • unMaxAgeSeconds (int) –

Returns:

(bool) Return value

SteamWorks:

SetAllowCachedResponse

UGC.SetAllowLegacyUpload(handle, bAllowLegacyUpload)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • bAllowLegacyUpload (bool) –

Returns:

(bool) Return value

SteamWorks:

SetAllowLegacyUpload

UGC.SetCloudFileNameFilter(handle, pMatchCloudFileName)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pMatchCloudFileName (str?) –

Returns:

(bool) Return value

SteamWorks:

SetCloudFileNameFilter

UGC.SetItemContent(handle, pszContentFolder)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pszContentFolder (str?) –

Returns:

(bool) Return value

SteamWorks:

SetItemContent

Notes:

UGC.SetItemDescription(handle, pchDescription)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchDescription (str?) –

Returns:

(bool) Return value

SteamWorks:

SetItemDescription

Notes:

UGC.SetItemMetadata(handle, pchMetaData)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchMetaData (str?) –

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)
UGC.SetItemPreview(handle, pszPreviewFile)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pszPreviewFile (str?) –

Returns:

(bool) Return value

SteamWorks:

SetItemPreview

Notes:

UGC.SetItemTags(updateHandle, pTags, bAllowAdminTags)

🤖 Auto-generated binding

Parameters:
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)
UGC.SetItemTitle(handle, pchTitle)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchTitle (str?) –

Returns:

(bool) Return value

SteamWorks:

SetItemTitle

Notes:

UGC.SetItemUpdateLanguage(handle, pchLanguage)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchLanguage (str?) –

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)
UGC.SetItemVisibility(handle, eVisibility)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • eVisibility (int - ERemoteStoragePublishedFileVisibility) –

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)
UGC.SetItemsDisabledLocally(pvecPublishedFileIDs, unNumPublishedFileIDs, bDisabledLocally)

🤖 Auto-generated binding

Parameters:
  • pvecPublishedFileIDs (uint64[]?) –

  • unNumPublishedFileIDs (int) – size of the input array pvecPublishedFileIDs

  • bDisabledLocally (bool) –

Returns:

(bool) Return value

SteamWorks:

SetItemsDisabledLocally

UGC.SetLanguage(handle, pchLanguage)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pchLanguage (str?) –

Returns:

(bool) Return value

SteamWorks:

SetLanguage

UGC.SetMatchAnyTag(handle, bMatchAnyTag)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bMatchAnyTag (bool) –

Returns:

(bool) Return value

SteamWorks:

SetMatchAnyTag

UGC.SetRankedByTrendDays(handle, unDays)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • unDays (int) –

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)
UGC.SetRequiredGameVersions(handle, pszGameBranchMin, pszGameBranchMax)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pszGameBranchMin (str?) –

  • pszGameBranchMax (str?) –

Returns:

(bool) Return value

SteamWorks:

SetRequiredGameVersions

UGC.SetReturnAdditionalPreviews(handle, bReturnAdditionalPreviews)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnAdditionalPreviews (bool) –

Returns:

(bool) Return value

SteamWorks:

SetReturnAdditionalPreviews

UGC.SetReturnChildren(handle, bReturnChildren)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnChildren (bool) –

Returns:

(bool) Return value

SteamWorks:

SetReturnChildren

UGC.SetReturnKeyValueTags(handle, bReturnKeyValueTags)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnKeyValueTags (bool) –

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)
UGC.SetReturnLongDescription(handle, bReturnLongDescription)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnLongDescription (bool) –

Returns:

(bool) Return value

SteamWorks:

SetReturnLongDescription

UGC.SetReturnMetadata(handle, bReturnMetadata)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnMetadata (bool) –

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)
UGC.SetReturnOnlyIDs(handle, bReturnOnlyIDs)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnOnlyIDs (bool) –

Returns:

(bool) Return value

SteamWorks:

SetReturnOnlyIDs

UGC.SetReturnPlaytimeStats(handle, unDays)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • unDays (int) –

Returns:

(bool) Return value

SteamWorks:

SetReturnPlaytimeStats

UGC.SetReturnTotalOnly(handle, bReturnTotalOnly)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • bReturnTotalOnly (bool) –

Returns:

(bool) Return value

SteamWorks:

SetReturnTotalOnly

UGC.SetSearchText(handle, pSearchText)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • pSearchText (str?) –

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)
UGC.SetSubscriptionsLoadOrder(pvecPublishedFileIDs, unNumPublishedFileIDs)

🤖 Auto-generated binding

Parameters:
  • pvecPublishedFileIDs (uint64[]?) –

  • unNumPublishedFileIDs (int) – size of the input array pvecPublishedFileIDs

Returns:

(bool) Return value

SteamWorks:

SetSubscriptionsLoadOrder

UGC.SetTimeCreatedDateRange(handle, rtStart, rtEnd)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • rtStart (int - RTime32) –

  • rtEnd (int - RTime32) –

Returns:

(bool) Return value

SteamWorks:

SetTimeCreatedDateRange

UGC.SetTimeUpdatedDateRange(handle, rtStart, rtEnd)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCQueryHandle_t) –

  • rtStart (int - RTime32) –

  • rtEnd (int - RTime32) –

Returns:

(bool) Return value

SteamWorks:

SetTimeUpdatedDateRange

UGC.SetUserItemVote(nPublishedFileID, bVoteUp, callback)

🤖 Auto-generated binding

Parameters:
  • nPublishedFileID (uint64 - PublishedFileId_t) –

  • bVoteUp (bool) –

  • callback (function) – CallResult callback receiving struct SetUserItemVoteResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.ShowWorkshopEULA()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

ShowWorkshopEULA

UGC.StartItemUpdate(nConsumerAppId, nPublishedFileID)

🤖 Auto-generated binding

Parameters:
  • nConsumerAppId (int - AppId_t) –

  • nPublishedFileID (uint64 - PublishedFileId_t) –

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
UGC.StartPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs, callback)

🤖 Auto-generated binding

Parameters:
  • pvecPublishedFileID (uint64[]?) –

  • unNumPublishedFileIDs (int) – size of the input array pvecPublishedFileID

  • callback (function) – CallResult callback receiving struct StartPlaytimeTrackingResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

StartPlaytimeTracking

Example:

local ids = {mod1ID, mod2ID}
Steam.UGC.StartPlaytimeTracking(ids, #ids, function(data, err)
    print('Playtime tracking started')
end)
UGC.StopPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs, callback)

🤖 Auto-generated binding

Parameters:
  • pvecPublishedFileID (uint64[]?) –

  • unNumPublishedFileIDs (int) – size of the input array pvecPublishedFileID

  • callback (function) – CallResult callback receiving struct StopPlaytimeTrackingResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

StopPlaytimeTracking

UGC.StopPlaytimeTrackingForAllItems(callback)

🤖 Auto-generated binding

Parameters:

callback (function) – CallResult callback receiving struct StopPlaytimeTrackingResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

StopPlaytimeTrackingForAllItems

Example:

Steam.UGC.StopPlaytimeTrackingForAllItems(function(data, err)
    print('Playtime tracking stopped for all items')
end)
UGC.SubmitItemUpdate(handle, pchChangeNote, callback)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • pchChangeNote (str?) –

  • callback (function) – CallResult callback receiving struct SubmitItemUpdateResult_t and a boolean

Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when Steam.RunCallbacks() is called.

SteamWorks:

SubmitItemUpdate

Notes:

UGC.SubscribeItem(nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.SuspendDownloads(bSuspend)

🤖 Auto-generated binding

Parameters:

bSuspend (bool) –

SteamWorks:

SuspendDownloads

Example:

-- Pause all workshop downloads during gameplay
Steam.UGC.SuspendDownloads(true)
-- Resume when at main menu
Steam.UGC.SuspendDownloads(false)
UGC.UnsubscribeItem(nPublishedFileID, callback)

🤖 Auto-generated binding

Parameters:
Returns:

(uint64) SteamAPICall_t handle for this async call. The result is delivered via the callback parameter when 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)
UGC.UpdateItemPreviewFile(handle, index, pszPreviewFile)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • index (int) –

  • pszPreviewFile (str?) –

Returns:

(bool) Return value

SteamWorks:

UpdateItemPreviewFile

UGC.UpdateItemPreviewVideo(handle, index, pszVideoID)

🤖 Auto-generated binding

Parameters:
  • handle (uint64 - UGCUpdateHandle_t) –

  • index (int) –

  • pszVideoID (str?) –

Returns:

(bool) Return value

SteamWorks:

UpdateItemPreviewVideo

Unimplemented Methods

UGC.GetQueryUGCKeyValueTag()

Not implemented - blocklist: Overload which is not in documentation

SteamWorks:

GetQueryUGCKeyValueTag

Callbacks

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
UGC.OnSteamUGCRequestUGCDetailsResult()

Callback for SteamUGCRequestUGCDetailsResult_t

callback(data) receives:

  • data.m_details (SteamUGCDetails_t)

  • data.m_bCachedData (bool)

UGC.OnCreateItemResult()

Callback for CreateItemResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

  • data.m_nPublishedFileId (uint64 - PublishedFileId_t)

  • data.m_bUserNeedsToAcceptWorkshopLegalAgreement (bool)

UGC.OnSubmitItemUpdateResult()

Callback for SubmitItemUpdateResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

  • data.m_bUserNeedsToAcceptWorkshopLegalAgreement (bool)

  • data.m_nPublishedFileId (uint64 - PublishedFileId_t)

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
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
UGC.OnUserFavoriteItemsListChanged()

Callback for UserFavoriteItemsListChanged_t

callback(data) receives:

  • data.m_nPublishedFileId (uint64 - PublishedFileId_t)

  • data.m_eResult (int - EResult)

  • data.m_bWasAddRequest (bool)

UGC.OnSetUserItemVoteResult()

Callback for SetUserItemVoteResult_t

callback(data) receives:

  • data.m_nPublishedFileId (uint64 - PublishedFileId_t)

  • data.m_eResult (int - EResult)

  • data.m_bVoteUp (bool)

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)

UGC.OnStartPlaytimeTrackingResult()

Callback for StartPlaytimeTrackingResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

UGC.OnStopPlaytimeTrackingResult()

Callback for StopPlaytimeTrackingResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

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)

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)

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)

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)

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)

UGC.OnDeleteItemResult()

Callback for DeleteItemResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

  • data.m_nPublishedFileId (uint64 - PublishedFileId_t)

UGC.OnUserSubscribedItemsListChanged()

Callback for UserSubscribedItemsListChanged_t

callback(data) receives:

  • data.m_nAppID (int - AppId_t)

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)