Steam - stingray.Steam namespace reference - Stingray Lua API Reference

stingray.Steam namespace reference

Description

The interface to access core Steam functionality on the Windows platform.

As the object is a singleton (there is only one Steam), you do not need to pass any Steam object to the functions. All the functions operate on the Steam singleton.

If the engine is not compiled with Steam support, or the game is not Steam-enabled (no steam_appid.txt file), or the Steam service is not running, the Steam object will be nil.

You can test for a valid Steam install for a logged in user with:

Functions

Parameters
This function does not accept any parameters.
Returns

integer

The Steam app ID for the current application, expressed as a number.

Parameters
This function does not accept any parameters.
Returns

boolean

True if the current Steam client has a live connection to the Steam servers, or false otherwise. A false return may indicate that there is a networking issue on the local machine, or that the Steam server is down or busy.

The Steam client will automatically try to recreate the connection as often as possible.

Parameters
This function does not accept any parameters.
Returns

string

The language set on Steam, as a short string. This can be any of the following:

  • ja: Japanese
  • en: English
  • fr: French
  • es: Spanish
  • de: German
  • it: Italian
  • nl: Dutch
  • pt: Portuguese
  • ru: Russian
  • ko: Korean
  • zht: Chinese (traditional)
  • zhs: Chinese (simplified)
  • fi: Finnish
  • sv: Swedish
  • da: Danish
  • no: Norwegian
  • pl: Polish
  • hu: Hungarian
  • th: Thai
  • cs: Czech
Parameters

url :

string

The URL you want to open.

Returns
This function does not return any values.
Parameters
This function does not accept any parameters.
Returns

string

The online ID of the logged-in player.

Parameters

id :

string?

The ID of the player whose name you want to retrieve. Optional; if you omit this parameter you will get the user name of the logged-in player.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

string

The user name of the player with the specified ID.

DLC

Functions related to downloadable content on Steam.

Parameters
This function does not accept any parameters.
Returns

integer?

Fetches an app ID for a newly installed DLC or application, or nil if no install event has occurred.

The ? notation indicates that this type is optional: there may be zero or one instances of it.

Call this in a loop until it returns nil and react accordingly for each installed app ID.

Parameters

app_id :

integer

Specifies the app id.

Returns

boolean

True if the DLC is owned and installed, or false otherwise.

Parameters

app_id :

integer

Specifies the app id.

Returns

boolean

True if the application (not the DLC) is owned by the player.