Skip to content

Apps

Exposes a wide range of information and actions for applications and Downloadable Content (DLC).

Only available in the main GodotSteam branches

Functions

getAppBuildId

getAppBuildId()

Gets the build ID of this app, may change at any time based on backend updates to the game.

Return: int

The current build ID of this app. Defaults to 0 if you're not running a build downloaded from Steam.


Read more in the official Steamworks SDK documentation

getAppInstallDir

getAppInstallDir( uint32_t app_id )

Gets the install folder for a specific app ID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location.

Return: string


Read more in the official Steamworks SDK documentation

getAppOwner

getAppOwner()

Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed.

Returns: uint64_t


Read more in the official Steamworks SDK documentation

getAvailableGameLanguages

getAvailableGameLanguages()

Gets a comma separated list of the languages the current app supports.

Return: string


Read more in the official Steamworks SDK documentation

getCurrentBetaName

getCurrentBetaName()

Checks if the user is running from a beta branch, and gets the name of the branch if they are.

Return: string


Read more in the official Steamworks SDK documentation

getCurrentGameLanguage

getCurrentGameLanguage()

Gets the current language that the user has set.

Return: string


Read more in the official Steamworks SDK documentation

getDLCCount

getDLCCount()

Get the number of DLC the user owns for a parent application/game.

Return: int32


Read more in the official Steamworks SDK documentation

getDLCDataByIndex

getDLCDataByIndex()

Returns metadata for a DLC by index.

Return: array

Contains dictionaries (dlc) which contain the following keys:

  • app_id (int)
  • available (bool)
  • name (string)

Read more in the official Steamworks SDK documentation

getDLCDownloadProgress

getDLCDownloadProgress( uint32_t dlc_id )

Gets the download progress for optional DLC.

Returns: dictionary

Contains the following keys:

  • ret (bool)
  • downloaded (uint64_t)
  • total (uint64_t)

Read more in the official Steamworks SDK documentation

getEarliestPurchaseUnixTime

getEarliestPurchaseUnixTime( uint32_t app_id )

Gets the time of purchase of the specified app in Unix epoch format (time since Jan 1st, 1970).

Returns: uint32_t


Read more in the official Steamworks SDK documentation

getFileDetails

getFileDetails( string filename )

Asynchronously retrieves metadata details about a specific file in the depot manifest.

Return: void

Notes: Triggers a file_details_result callback.


Read more in the official Steamworks SDK documentation

getInstalledDepots

getInstalledDepots( uint32_t app_id )

Gets a list of all installed depots for a given App ID.

Return: array

Contains the installed depots, returned in mount order.


Read more in the official Steamworks SDK documentation

getLaunchCommandLine

getLaunchCommandLine()

Gets the command line if the game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/. This method is preferable to launching with a command line via the operating system, which can be a security risk. In order for rich presence joins to go through this and not be placed on the OS command line, you must enable "Use launch command line" from the Installation > General page on your app.

Returns: string


Read more in the official Steamworks SDK documentation

getLaunchQueryParam

getLaunchQueryParam( string key )

Gets the associated launch parameter if the game is run via steam://run/<appid>/?param1=value1;param2=value2;param3=value3 etc.

Returns: string


Read more in the official Steamworks SDK documentation

getLeaderboardDisplayType

getLeaderboardDisplayType( uint64_t this_leaderboard )

Returns the display type of a leaderboard handle.

Returns: dictionary

Contains the following keys:

  • return (int)
  • verbal (string)

installDLC

installDLC( uint32_t dlc_id )

Allows you to install an optional DLC.

Returns: void

Note: Triggers a dlc_installed callback.


Read more in the official Steamworks SDK documentation

isAppInstalled

isAppInstalled( uint32_t app_id )

Checks if a specific app is installed. The app may not actually be owned by the current user, they may have it left over from a free weekend, etc. This only works for base applications, not downloadable content (DLC). Use isDLCInstalled for DLC instead.

Return: bool

True if the specified app ID is installed; otherwise, false.


Read more in the official Steamworks SDK documentation

isDLCInstalled

isDLCInstalled( uint32_t dlc_id )

Checks if the user owns a specific DLC and if the DLC is installed.

Return: bool

True if the user owns the DLC and it's currently installed, otherwise false.

Note: Should only be used for simple client side checks - not intended for granting in-game items.


Read more in the official Steamworks SDK documentation

isLowViolence

isLowViolence()

Checks if the license owned by the user provides low violence depots.

Return: bool

True if the user owns the DLC and it's currently installed, otherwise false.


Read more in the official Steamworks SDK documentation

isSubscribed

isSubscribed()

Checks if the active user is subscribed to the current app ID.

Return: bool

True if the active user owns the current app ID, otherwise false.


Read more in the official Steamworks SDK documentation

isSubscribedApp

isSubscribedApp( uint32_t app_id )

Checks if the active user is subscribed to a specified app ID. Only use this if you need to check ownership of another game related to yours, a demo for example.

Return: bool

True if the active user is subscribed to the specified app ID, otherwise false.


Read more in the official Steamworks SDK documentation

isSubscribedFromFamilySharing

isSubscribedFromFamilySharing()

Checks if the active user is accessing the current app ID via a temporary Family Shared license owned by another user.

Return: bool

True if the active user is accessing the current appID via family sharing, otherwise false.

If you need to determine the Steam ID of the permanent owner of the license, use getAppOwner.


Read more in the official Steamworks SDK documentation

isSubscribedFromFreeWeekend

isSubscribedFromFreeWeekend()

Checks if the user is subscribed to the current app through a free weekend. This function will return false for users who have a retail or other type of license. Suggested you contact Valve on how to package and secure your free weekend properly.

Return: bool

True if the active user is subscribed to the current app ID via a free weekend otherwise false any other type of license.


Read more in the official Steamworks SDK documentation

isTimedTrial

isTimedTrial()

Checks if the user is subscribed to the current app ID through a timed trial. If so, returns true and gives back the total time the timed trial is allowed to play, along with the current amount of time the user has played.

Return: dictionary

Containing these keys:

  • seconds_allowed (uint32)
  • seconds_played (uint32)

Read more in the official Steamworks SDK documentation

isVACBanned

isVACBanned()

Checks if the user has a VAC ban on their account.

Return: bool

True if the user has a VAC ban on their account; otherwise, false.


Read more in the official Steamworks SDK documentation

markContentCorrupt

markContentCorrupt( bool missing_files_only )

Allows you to force verify game content on next launch.

Returns: bool


Read more in the official Steamworks SDK documentation

setDLCContext

setDLCContext( uint32_t app_id )

Set current DLC app ID being played (or 0 if none). Allows Steam to track usage of major DLC extensions.

Returns: bool

uninstallDLC

uninstallDLC( uint32_t dlc_id )

Allows you to uninstall an optional DLC.

Returns: void


Read more in the official Steamworks SDK documentation

Signals

These callbacks require you to run Steam.run_callbacks() in your _process() function to receive them.

dlc_installed

dlc_installed

Triggered after the current user gains ownership of DLC and that DLC is installed.

Returns:

  • app_id (uint32_t)

Read more in the official Steamworks SDK documentation

file_details_result

file_details_result

Called after requesting the details of a specific file.

Returns:

  • result (uint32_t)
  • file_size (uint64_t)
  • file_hash (uint8)
  • flags (uint32_t)

Read more in the official Steamworks SDK documentation

new_launch_url_parameters

new_launch_url_parameters

Triggered after the user executes a steam url with command line or query parameters such as steam://run/(app_id)//?param1=value1;param2=value2;param3=value3; while the game is already running. The new params can be queried with getLaunchCommandLine and getLaunchQueryParam.

Returns: nothing


Read more in the official Steamworks SDK documentation

timed_trial_status

timed_trials_status

Called for games in Timed Trial mode.

Returns:

  • app_id (uint32_t)
  • is_offline (bool)
  • seconds_allowed (uint32)
  • seconds_played (uint32)

Read more in the official Steamworks SDK documentation

Enums

RegisterActivationCodeResult

Enumerator Value
ACTIVATION_CODE_RESULT_OK 0
ACTIVATION_CODE_RESULT_FAIL 1
ACTIVATION_CODE_RESULT_ALREADY_REGISTERED 2
ACTIVATION_CODE_RESULT_TIMEOUT 3
ACTIVATION_CODE_RESULT_ALREADY_OWNED 4