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. Ifnilthen the buffer will beNULL.
- Returns:
(bool) Return value
- Returns:
(int)
pAppID- Returns:
(bool)
pbAvailable- Returns:
(str)
pchName- SteamWorks:
Signature differences from C++ API:
Parameter
pAppIDis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
pbAvailableis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
pchNameis 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:
Example:
if Steam.Apps.BIsAppInstalled(440) then
print('Team Fortress 2 is installed')
end
- Apps.BIsCybercafe()
🤖 Auto-generated binding
- Returns:
(bool) Return value
- SteamWorks:
- Apps.BIsDlcInstalled(appID)
🤖 Auto-generated binding
- Parameters:
appID (int - AppId_t) –
- Returns:
(bool) Return value
- SteamWorks:
Example:
if Steam.Apps.BIsDlcInstalled(12345) then
-- Unlock game content
end
- Apps.BIsLowViolence()
🤖 Auto-generated binding
- Returns:
(bool) Return value
- SteamWorks:
- Apps.BIsSubscribed()
🤖 Auto-generated binding
- Returns:
(bool) Return value
- SteamWorks:
- Apps.BIsSubscribedApp(appID)
🤖 Auto-generated binding
- Parameters:
appID (int - AppId_t) – The App ID of the DLC
- Returns:
(bool) Return value
- SteamWorks:
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:
Example:
if Steam.Apps.BIsSubscribedFromFamilySharing() then
print('Playing via Family Sharing')
end
- Apps.BIsSubscribedFromFreeWeekend()
🤖 Auto-generated binding
- Returns:
(bool) Return value
- SteamWorks:
- Apps.BIsTimedTrial()
🤖 Auto-generated binding
- Returns:
(bool) Return value
- Returns:
(int)
punSecondsAllowed- Returns:
(int)
punSecondsPlayed- SteamWorks:
Signature differences from C++ API:
Parameter
punSecondsAllowedis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
punSecondsPlayedis 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:
- Apps.GetAppBuildId()
🤖 Auto-generated binding
- Returns:
(int) Return value
- SteamWorks:
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. Ifnilthen the buffer will beNULL.
- Returns:
(int) Return value
- Returns:
(str)
pchFolder- SteamWorks:
Signature differences from C++ API:
Parameter
pchFolderis 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:
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:
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. Ifnilthen the buffer will beNULL.cchDescription (int?) – size of the buffer to allocate for
pchDescription. Ifnilthen the buffer will beNULL.
- Returns:
(bool) Return value
- Returns:
(int)
punFlags- Returns:
(int)
punBuildID- Returns:
(str)
pchBetaName- Returns:
(str)
pchDescription- Returns:
(int)
punLastUpdated- SteamWorks:
Signature differences from C++ API:
Parameter
punFlagsis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
punBuildIDis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
pchBetaNameis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
pchDescriptionis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
punLastUpdatedis 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. Ifnilthen the buffer will beNULL.- Returns:
(bool) Return value
- Returns:
(str)
pchName- SteamWorks:
Signature differences from C++ API:
Parameter
pchNameis 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:
Example:
print("The game's current language is " .. Steam.Apps.GetCurrentGameLanguage())
- Apps.GetDLCCount()
🤖 Auto-generated binding
- Returns:
(int) Return value
- SteamWorks:
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:
Signature differences from C++ API:
Parameter
punBytesDownloadedis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
punBytesTotalis 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:
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_tand a boolean
- Returns:
(uint64)
SteamAPICall_thandle for this async call. The result is delivered via thecallbackparameter whenSteam.RunCallbacks()is called.- SteamWorks:
- Apps.GetInstalledDepots(appID, cMaxDepots)
🤖 Auto-generated binding
- Parameters:
appID (int - AppId_t) –
cMaxDepots (int?) – size of the buffer to allocate for
pvecDepots. Ifnilthen the buffer will beNULL.
- Returns:
(int) Return value
- Returns:
(int[])
pvecDepots- SteamWorks:
Signature differences from C++ API:
Parameter
pvecDepotsis 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. Ifnilthen the buffer will beNULL.- Returns:
(int) Return value
- Returns:
(str)
pszCommandLine- SteamWorks:
Signature differences from C++ API:
Parameter
pszCommandLineis 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:
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:
Signature differences from C++ API:
Parameter
pnAvailableis not a parameter in Lua — it is an output-only pointer in C++ and is returned as an additional return value.Parameter
pnPrivateis 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:
- Apps.MarkContentCorrupt(bMissingFilesOnly)
🤖 Auto-generated binding
- Parameters:
bMissingFilesOnly (bool) –
- Returns:
(bool) Return value
- SteamWorks:
Example:
-- Trigger a Steam file integrity check
Steam.Apps.MarkContentCorrupt(false)
- Apps.RequestAllProofOfPurchaseKeys()
🤖 Auto-generated binding
- SteamWorks:
- Apps.RequestAppProofOfPurchaseKey(nAppID)
🤖 Auto-generated binding
- Parameters:
nAppID (int - AppId_t) –
- SteamWorks:
- Apps.SetActiveBeta(pchBetaName)
🤖 Auto-generated binding
- Parameters:
pchBetaName (str?) –
- Returns:
(bool) Return value
- SteamWorks:
- Apps.SetDlcContext(nAppID)
🤖 Auto-generated binding
- Parameters:
nAppID (int - AppId_t) –
- Returns:
(bool) Return value
- SteamWorks:
- Apps.UninstallDLC(nAppID)
🤖 Auto-generated binding
- Parameters:
nAppID (int - AppId_t) –
- SteamWorks:
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