Functions | Apps

Here is a list of all the functions available in the GodotSteam module. The descriptions are pulled from the official Steamworks SDK documentation with modifications made to fit GodotSteam's implementation of the functions. Naturally, any GodotSteam-specific functions will be noted as such.


getDLCDataByIndex()

  • Returns metadata for a DLC by index.
  • Returns an array of:
    • dlc (dictionary)
      • app_id (int)
      • available (bool)
      • name (string)

isAppInstalled( int app_id ) 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.
  • Returns a bool.

isCybercafe()

  • Checks whether the current app ID is for Cyber Cafes.
  • Returns a bool.

isDLCInstalled( int app_id ) isDLCInstalled( uint32_t app_id )

  • Checks if the user owns a specific DLC and if the DLC is installed.
  • Noted: Should only be used for simple client side checks - not intended for granting in-game items.
  • Returns a bool.

isLowViolence()

  • Checks if the license owned by the user provides low violence depots.
  • Low violence depots are useful for copies sold in countries that have content restrictions.
  • Returns a bool.

isSubscribed()

  • Checks if the active user is subscribed to the current app ID.
  • Note: This will always return true if you're using Steam DRM or calling restartAppIfNecessary.
  • Returns a bool.

isSubscribedApp( int app_id ) 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.
  • Returns a bool.

isSubscribedFromFamilySharing()

  • Checks if the active user is accessing the current app_id via a temporary Family Shared license owned by another user. If you need to determine the steamID of the permanent owner of the license, use getAppOwner.
  • Returns a bool.

isSubscribedFromFreeWeekend()

  • Checks if the user is subscribed to the current app through a free weekend. Before using this please contact a Valve technical account manager via the Steamworks Discussion Board to properly package and secure your free weekend.
  • Returns a bool.

isTimedTrial()

  • Checks if the user is subscribed to the current appID 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.
  • Returns a dictionary:
    • seconds_allowed (int)
    • seconds_played (int)
    • seconds_allowed (uint32)
    • seconds_played (uint32)

isVACBanned()

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

getAppBuildId()

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

getAppInstallDir( int app_id ) getAppInstallDir( uint32_t app_id )

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

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 an int. Returns an uint64_t.

getAvailableGameLanguages()

  • Get a list of the languages the current app supports. For the full list of languages that may be returned see Localization and Languages.
  • Returns a string of comma-separated list of two-letter country language codes.

getCurrentBetaName()

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

getCurrentGameLanguage()

  • Get the user's current game language (ie. english, russian, french).
  • Returns a string.

getDLCCount()

  • Get the total number of DLC installed for this application/game.
  • Returns an int.

getDLCDownloadProgress( int app_id ) getDLCDownloadProgress( uint32_t app_id )

  • Gets the download progress for optional DLC.
  • Returns a dictionary:
    • ret (bool)
    • downloaded (int)
    • total (int)
    • ret (bool)
    • downloaded (uint64_t)
    • total (uint64_t)

getEarliestPurchaseUnixTime( int app_id )

  • Get the datetime of the purchase of the app.
  • Returns an int.
  • Returns an uint32_t.

getFileDetails( string filename )

  • Asynchronously retrieves metadata details about a specific file in the depot manifest.
  • Triggers a file_details_result callback.
  • Returns nothing; void.

getInstalledDepots( int app_id) getInstalledDepots( uint32_t app_id)

  • Gets a list of all installed depots for a given App ID.
  • Returns an array of int app ID's. Returns an array of uint32 app ID's.

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 a string.

getLaunchQueryParam( string key )

  • Gets the associated launch parameter if the game is run via steam://run/(appid)/?param1=value1;param2=value2;param3=value3 etc. Parameter names starting with the character '@' are reserved for internal use and will always return an empty string. Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, but it is advised that you not param names beginning with an underscore for your own features.
  • Returns a string.

installDLC( int app_id ) installDLC( uint32_t app_id )

  • Install control for optional DLC.
  • Triggers a dlc_installed callback.
  • Returns nothing; void.

markContentCorrupt( bool missing_files_only )

  • Allows you to force verify game content on next launch. If you detect the game is out-of-date (for example, by having the client detect a version mismatch with a server), you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
  • Returns a bool.

setDLCContext( int app_id ) setDLCContext( uint32_t app_id )

  • Set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions.
  • Returns a bool.

uninstallDLC( int dlc_id ) uninstallDLC( uint32_t dlc_id )

  • Uninstall control for optional DLC.
  • Returns nothing; void.