ISteamApps

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.

List of Functions

List of Callbacks

Function Reference

Apps.BGetDLCDataByIndex(iDLC, cchNameBufferSize)

🤖 Auto-generated binding

Parameters:
  • iDLC (int) –

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

Returns:

(bool) Return value

Returns:

(int) pAppID

Returns:

(bool) pbAvailable

Returns:

(str) pchName

SteamWorks:

BGetDLCDataByIndex

Signature differences from C++ API:

  • Parameter pAppID is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter pbAvailable is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter pchName is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Apps.BIsAppInstalled(appID)

🤖 Auto-generated binding

Parameters:

appID (int - AppId_t) –

Returns:

(bool) Return value

SteamWorks:

BIsAppInstalled

Example:

if Steam.Apps.BIsAppInstalled(440) then
    print('Team Fortress 2 is installed')
end
Apps.BIsCybercafe()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsCybercafe

Apps.BIsDlcInstalled(appID)

🤖 Auto-generated binding

Parameters:

appID (int - AppId_t) –

Returns:

(bool) Return value

SteamWorks:

BIsDlcInstalled

Example:

if Steam.Apps.BIsDlcInstalled(12345) then
    -- Unlock game content
end
Apps.BIsLowViolence()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsLowViolence

Apps.BIsSubscribed()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsSubscribed

Apps.BIsSubscribedApp(appID)

🤖 Auto-generated binding

Parameters:

appID (int - AppId_t) – The App ID of the DLC

Returns:

(bool) Return value

SteamWorks:

BIsSubscribedApp

Checks if the user owns a specific piece of Downloadable Content (DLC).

Example:

if Steam.Apps.BIsSubscribedApp(dlcAppID) then
    unlockDLCContent()
end
Apps.BIsSubscribedFromFamilySharing()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsSubscribedFromFamilySharing

Example:

if Steam.Apps.BIsSubscribedFromFamilySharing() then
    print('Playing via Family Sharing')
end
Apps.BIsSubscribedFromFreeWeekend()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsSubscribedFromFreeWeekend

Apps.BIsTimedTrial()

🤖 Auto-generated binding

Returns:

(bool) Return value

Returns:

(int) punSecondsAllowed

Returns:

(int) punSecondsPlayed

SteamWorks:

BIsTimedTrial

Signature differences from C++ API:

  • Parameter punSecondsAllowed is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter punSecondsPlayed is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Example:

local isTrial, secondsAllowed, secondsPlayed = Steam.Apps.BIsTimedTrial()
if isTrial then
    print(string.format('Trial: %d/%d seconds played', secondsPlayed, secondsAllowed))
end
Apps.BIsVACBanned()

🤖 Auto-generated binding

Returns:

(bool) Return value

SteamWorks:

BIsVACBanned

Apps.GetAppBuildId()

🤖 Auto-generated binding

Returns:

(int) Return value

SteamWorks:

GetAppBuildId

Example:

print('Current build ID: ' .. Steam.Apps.GetAppBuildId())
Apps.GetAppInstallDir(appID, cchFolderBufferSize)

🤖 Auto-generated binding

Parameters:
  • appID (int - AppId_t) –

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

Returns:

(int) Return value

Returns:

(str) pchFolder

SteamWorks:

GetAppInstallDir

Signature differences from C++ API:

  • Parameter pchFolder is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Example:

local size, path = Steam.Apps.GetAppInstallDir(Steam.Utils.GetAppID(), 512)
if size > 0 then
    print('Game installed at: ' .. path)
end
Apps.GetAppOwner()

🤖 Auto-generated binding

Returns:

(uint64 - CSteamID) Return value

SteamWorks:

GetAppOwner

Example:

local ownerID = Steam.Apps.GetAppOwner()
local myID = Steam.User.GetSteamID()
if ownerID ~= myID then
    print('Playing via Family Sharing from: ' .. tostring(ownerID))
end
Apps.GetAvailableGameLanguages()

🤖 Auto-generated binding

Returns:

(str) Return value

SteamWorks:

GetAvailableGameLanguages

Example:

local langs = Steam.Apps.GetAvailableGameLanguages()
print('Supported languages: ' .. langs)
Apps.GetBetaInfo(iBetaIndex, cchBetaName, cchDescription)

🤖 Auto-generated binding

Parameters:
  • iBetaIndex (int) –

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

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

Returns:

(bool) Return value

Returns:

(int) punFlags

Returns:

(int) punBuildID

Returns:

(str) pchBetaName

Returns:

(str) pchDescription

Returns:

(int) punLastUpdated

SteamWorks:

GetBetaInfo

Signature differences from C++ API:

  • Parameter punFlags is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter punBuildID is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter pchBetaName is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter pchDescription is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter punLastUpdated is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Apps.GetCurrentBetaName(cchNameBufferSize)

🤖 Auto-generated binding

Parameters:

cchNameBufferSize (int?) – size of the buffer to allocate for pchName. If nil then the buffer will be NULL.

Returns:

(bool) Return value

Returns:

(str) pchName

SteamWorks:

GetCurrentBetaName

Signature differences from C++ API:

  • Parameter pchName is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Apps.GetCurrentGameLanguage()

🤖 Auto-generated binding

Returns:

(str) Return value

SteamWorks:

GetCurrentGameLanguage

Example:

print("The game's current language is " .. Steam.Apps.GetCurrentGameLanguage())
Apps.GetDLCCount()

🤖 Auto-generated binding

Returns:

(int) Return value

SteamWorks:

GetDLCCount

Example:

local count = Steam.Apps.GetDLCCount()
for i = 0, count - 1 do
    local appID, available, name = Steam.Apps.BGetDLCDataByIndex(i, 256)
    if available then
        print('DLC: ' .. name .. ' (' .. appID .. ')')
    end
end
Apps.GetDlcDownloadProgress(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

Returns:

(bool) Return value

Returns:

(uint64) punBytesDownloaded

Returns:

(uint64) punBytesTotal

SteamWorks:

GetDlcDownloadProgress

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.

Apps.GetEarliestPurchaseUnixTime(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

Returns:

(int) Return value

SteamWorks:

GetEarliestPurchaseUnixTime

Example:

local ts = Steam.Apps.GetEarliestPurchaseUnixTime(Steam.Utils.GetAppID())
print('Game purchased at unix time: ' .. ts)
Apps.GetFileDetails(pszFileName, callback)

🤖 Auto-generated binding

Parameters:
  • pszFileName (str?) –

  • callback (function) – CallResult callback receiving struct FileDetailsResult_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:

GetFileDetails

Apps.GetInstalledDepots(appID, cMaxDepots)

🤖 Auto-generated binding

Parameters:
  • appID (int - AppId_t) –

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

Returns:

(int) Return value

Returns:

(int[]) pvecDepots

SteamWorks:

GetInstalledDepots

Signature differences from C++ API:

  • Parameter pvecDepots is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Example:

local depots = Steam.Apps.GetInstalledDepots(Steam.Utils.GetAppID(), 16)
for _, depotID in ipairs(depots) do
    print('Installed depot: ' .. depotID)
end
Apps.GetLaunchCommandLine(cubCommandLine)

🤖 Auto-generated binding

Parameters:

cubCommandLine (int?) – size of the buffer to allocate for pszCommandLine. If nil then the buffer will be NULL.

Returns:

(int) Return value

Returns:

(str) pszCommandLine

SteamWorks:

GetLaunchCommandLine

Signature differences from C++ API:

  • Parameter pszCommandLine is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Example:

local params = Steam.Apps.GetLaunchCommandLine(1024)
local connect_string = tryParseConnectString(params)
if connect_string then
    initiateJoinGame(connect_string)
end
Apps.GetLaunchQueryParam(pchKey)

🤖 Auto-generated binding

Parameters:

pchKey (str?) –

Returns:

(str) Return value

SteamWorks:

GetLaunchQueryParam

Example:

local connect = Steam.Apps.GetLaunchQueryParam('connect')
if connect ~= '' then
    connectToServer(connect)
end
Apps.GetNumBetas()

🤖 Auto-generated binding

Returns:

(int) Return value

Returns:

(int) pnAvailable

Returns:

(int) pnPrivate

SteamWorks:

GetNumBetas

Signature differences from C++ API:

  • Parameter pnAvailable is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

  • Parameter pnPrivate is not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.

Apps.InstallDLC(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

SteamWorks:

InstallDLC

Apps.MarkContentCorrupt(bMissingFilesOnly)

🤖 Auto-generated binding

Parameters:

bMissingFilesOnly (bool) –

Returns:

(bool) Return value

SteamWorks:

MarkContentCorrupt

Example:

-- Trigger a Steam file integrity check
Steam.Apps.MarkContentCorrupt(false)
Apps.RequestAllProofOfPurchaseKeys()

🤖 Auto-generated binding

SteamWorks:

RequestAllProofOfPurchaseKeys

Apps.RequestAppProofOfPurchaseKey(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

SteamWorks:

RequestAppProofOfPurchaseKey

Apps.SetActiveBeta(pchBetaName)

🤖 Auto-generated binding

Parameters:

pchBetaName (str?) –

Returns:

(bool) Return value

SteamWorks:

SetActiveBeta

Apps.SetDlcContext(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

Returns:

(bool) Return value

SteamWorks:

SetDlcContext

Apps.UninstallDLC(nAppID)

🤖 Auto-generated binding

Parameters:

nAppID (int - AppId_t) –

SteamWorks:

UninstallDLC

Callbacks

Apps.OnDlcInstalled()

Callback for DlcInstalled_t

callback(data) receives:

  • data.m_nAppID (int - AppId_t)

Example:

function Steam.Apps.OnDlcInstalled(data)
    print('DLC installed: appID =', data.m_nAppID)
    unlockDLCContent(data.m_nAppID)
end
Apps.OnNewUrlLaunchParameters()

Callback for NewUrlLaunchParameters_t

callback(data) receives no fields (notification only).

Example:

function Steam.Apps.OnNewUrlLaunchParameters()
    local params = Steam.Apps.GetLaunchCommandLine(1024)
    handleLaunchParams(params)
end
Apps.OnAppProofOfPurchaseKeyResponse()

Callback for AppProofOfPurchaseKeyResponse_t

callback(data) receives:

  • data.m_eResult (int - EResult)

  • data.m_nAppID (int)

  • data.m_cchKeyLength (int)

  • data.m_rgchKey (string)

Apps.OnFileDetailsResult()

Callback for FileDetailsResult_t

callback(data) receives:

  • data.m_eResult (int - EResult)

  • data.m_ulFileSize (uint64)

  • data.m_FileSHA (string)

  • data.m_unFlags (int)

Apps.OnTimedTrialStatus()

Callback for TimedTrialStatus_t

callback(data) receives:

  • data.m_unAppID (int - AppId_t)

  • data.m_bIsOffline (bool)

  • data.m_unSecondsAllowed (int)

  • data.m_unSecondsPlayed (int)

Example:

function Steam.Apps.OnTimedTrialStatus(data)
    if data.m_bIsOffline ~= 0 then return end
    local remaining = data.m_unSecondsAllowed - data.m_unSecondsPlayed
    print('Trial time remaining: ' .. remaining .. 's')
end