apps.getCurrentGameLanguage
apps.isDlcInstalled
apps.getLaunchCommandLineParam
apps.onNewUrlLaunchParameters
apps.getCurrentGameLanguage()
- returns
(string) The language that the user has set.
- SteamWorks
Gets the current language that the user has set. This falls back to the Steam UI language if the user hasn't explicitly picked a language for the title.
For the full list of languages see Supported Languages
Example:
print("The games current language is " .. Steam.apps.getCurrentGameLanguage())
apps.isDlcInstalled(appID)
- param number appID
The App ID of the DLC to check.
- returns
(boolean) true if the user owns the DLC and it's currently installed, otherwise false.
- SteamWorks
Checks if the user owns a specific DLC and if the DLC is installed.
Example:
if Steam.apps.isDlcInstalled(12345) then
-- Unlock game content
end
apps.getLaunchCommandLine()
- returns
(string) The launch command line parameters
- SteamWorks
Gets the launch command line parameters. Use it to for example parse it for a connect string when implementing game invite functionality using friends.inviteUserToGame
.
If Steam is installed, you can request launching a Steam game by navigating to a steam://run/<appid>//<params> URL.
Example:
local params = Steam.apps.getLaunchCommandLine()
local connect_string = tryParseConnectString(params)
if connect_string then
initiateJoinGame(connect_string)
end
Warning
This is currently hardcoded in luasteam to a 1024 characters maximum.
apps.onNewUrlLaunchParameters()
- returns
nothing
- SteamWorks
Called by Steam when a steam://run/<appid>//<params> URL is navigated to when the game is already running. This callback has no data, use apps.getLaunchCommandLine
to get the launch parameters from the most recently used URL.
The callback that gets called when you join another player's game inside Steam while the game is running is friends.onGameRichPresenceJoinRequested
.