Functions For Modules | Main

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.


steamInit( bool retrieve_stats )

  • Starts up the Steam API. You can pass a bool to retrieve the current player's stats automatically; this defaults to true.
  • You will receive one of three results: "Steamworks active", "Steam not running", or "Invalid app ID or app not installed".
  • Returns a dictionary:
    • status (int)
    • verbal (string)

isSteamRunning()

  • Check if the Steam client is running.
  • Note: while this is not listed in the Steamworks docs, it is in the SDK.
  • Returns a bool.

restartAppIfNecessary( int app_id ) restartAppIfNecessary( uint32_t app_id )

  • Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't.
  • Returns a bool.

run_callbacks()

  • This should be run often; best if called in the _process(delta) function.
  • Returns nothing; void.

serverInit( string ip, int game_port, int query_port, intserver_mode, string version_string ) serverInit( string ip, uint16 game_port, uint16 query_port, intserver_mode, string version_string )

  • Initialize the server to Steam.
  • Note: the Steamworks docs mention a "Steam port" argument which is not used in the actual SDK.
  • Use one of the following server modes:
    • 1 - No authentication
    • 2 - Authentication
    • 3 - Authentication and secure
  • Returns a bool.

serverReleaseCurrentThreadMemory()

  • Frees all API-related memory associated with the calling thread. This memory is released automatically by run_callbacks so single-threaded servers do not need to call this.
  • Returns nothing; void.

serverShutdown()

  • Shut down the server connection to Steam.
  • Returns nothing; void.