Steam๏
Inherits: Object
Steamworks integration for Web API session ticket generation and backend authentication.
Description๏
The Steam singleton dynamically loads the Steam API library at runtime. If the library is not found, all methods fail gracefully without crashing.
Use request_web_api_ticket() to obtain a ticket for ISteamUserAuth/AuthenticateUserTicket, then authenticate_with_server() to exchange it for a JWT from your backend.
Methods๏
Signals๏
inventory_definitions_updated() ๐
There is currently no description for this signal. Please help us by contributing one!
inventory_full_update(result_handle: int) ๐
There is currently no description for this signal. Please help us by contributing one!
inventory_result_ready(result_handle: int, result_code: int) ๐
There is currently no description for this signal. Please help us by contributing one!
web_api_ticket_failed(error_message: String) ๐
Emitted when request_web_api_ticket() fails.
web_api_ticket_ready(hex_ticket: String, auth_ticket_handle: int) ๐
Emitted when a Web API session ticket is ready.
Enumerations๏
enum TicketState: ๐
TicketState TICKET_STATE_IDLE = 0
No ticket request is active.
TicketState TICKET_STATE_PENDING = 1
A ticket request is in progress.
TicketState TICKET_STATE_READY = 2
The latest ticket request succeeded.
TicketState TICKET_STATE_FAILED = 3
The latest ticket request failed.
enum AvatarSize: ๐
AvatarSize AVATAR_SIZE_SMALL = 0
Small avatar (32x32).
AvatarSize AVATAR_SIZE_MEDIUM = 1
Medium avatar (64x64).
AvatarSize AVATAR_SIZE_LARGE = 2
Large avatar (184x184).
Method Descriptions๏
bool add_promo_item(def_id: int) ๐
There is currently no description for this method. Please help us by contributing one!
bool add_promo_items(def_ids: PackedInt32Array) ๐
There is currently no description for this method. Please help us by contributing one!
SteamAuthResult authenticate_with_server(url: String, ticket: String, app_id: int) ๐
POSTs the hex-encoded session ticket to the auth server and returns the parsed response.
void cancel_auth_ticket(handle: int) ๐
Cancels a previously issued auth ticket handle.
bool clear_achievement(name: String) ๐
Clears an achievement for the local user in memory. Call store_stats() to persist.
void clear_debug_log() ๐
Clears the in-memory debug log buffer.
bool clear_stat(name: String) ๐
Sets a numeric stat to 0 in memory. Call store_stats() to persist.
bool consume_item(instance_id: int, quantity: int) ๐
There is currently no description for this method. Please help us by contributing one!
int deserialize_inventory(bytes: PackedByteArray, expected_steam_id: int = 0) ๐
There is currently no description for this method. Please help us by contributing one!
bool exchange_items(generate_def_ids: PackedInt32Array, generate_quantities: PackedInt32Array, destroy_instance_ids: PackedInt64Array, destroy_quantities: PackedInt32Array) ๐
There is currently no description for this method. Please help us by contributing one!
Array find_items_by_def_id(def_id: int) ๐
There is currently no description for this method. Please help us by contributing one!
bool get_achievement(name: String) const ๐
Returns whether the local user has unlocked the named achievement.
SteamAchievementInfo get_achievement_info(name: String, include_icon: bool = true) ๐
Returns metadata and optional icon for a single achievement.
Array get_all_achievements(include_icons: bool = false) ๐
Returns an array of SteamAchievementInfo for every achievement defined for the app.
Array get_all_item_definitions() ๐
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
Image get_avatar_image(steam_id: int = 0, size: AvatarSize = 2) ๐
Returns the user's avatar as an RGBA Image. steam_id 0 uses the local user.
Array get_debug_log() const ๐
Returns recent debug log lines when debug logging is enabled.
PackedInt32Array get_eligible_promo_item_definition_ids(steam_id: int = 0) ๐
Returns item definition IDs for promo items the user can still receive. steam_id 0 uses the local user.
Array get_inventory_result_items(result_handle: int) ๐
Parses SteamInventoryItem entries from a valid inventory result handle (before serialize_inventory_result() or destroy).
int get_inventory_result_status(result_handle: int) ๐
Returns the Steam result code for an inventory result handle (k_EResult values).
SteamItemDefinition get_item_definition(def_id: int) ๐
There is currently no description for this method. Please help us by contributing one!
Image get_item_definition_icon(def_id: int) ๐
There is currently no description for this method. Please help us by contributing one!
PackedInt32Array get_item_definition_ids() ๐
There is currently no description for this method. Please help us by contributing one!
Array get_items_by_id(instance_ids: PackedInt64Array) ๐
There is currently no description for this method. Please help us by contributing one!
int get_local_steam_id() const ๐
Returns the local user's 64-bit Steam ID, or 0 if unavailable.
int get_pending_auth_ticket_handle() const ๐
Returns the auth ticket handle from the last ticket request.
String get_pending_hex_ticket() const ๐
Returns the hex-encoded ticket from the last successful ticket request.
String get_pending_ticket_error() const ๐
Returns the error message from the last failed ticket request.
String get_persona_name() const ๐
Returns the local user's Steam persona (display) name.
float get_stat_float(name: String) const ๐
Returns the current float stat value, or 0.0 if unavailable.
int get_stat_int(name: String) const ๐
Returns the current integer stat value, or -1 if unavailable.
TicketState get_ticket_state() const ๐
Returns the current ticket request state.
There is currently no description for this method. Please help us by contributing one!
bool has_inventory_support() const ๐
There is currently no description for this method. Please help us by contributing one!
bool increment_stat_int(name: String, delta: int) ๐
Increments an integer stat in memory by 1. delta must be 1. Call store_stats() to persist.
Error initialize(app_id: int = 0) ๐
Loads and initializes the Steam API. app_id sets SteamAppId when greater than zero.
Returns true when the Steam API library was found and loaded.
bool is_debug_logging_enabled() const ๐
Returns whether debug logging is enabled.
bool is_initialized() const ๐
Returns true after a successful initialize() call.
bool is_logged_on() const ๐
Returns whether the local Steam user is logged on.
bool load_item_definitions() ๐
There is currently no description for this method. Please help us by contributing one!
void poll_callbacks() ๐
Pumps the Steam manual callback dispatch queue.
bool refresh_current_stats() ๐
Waits for a fresh user-stats callback from Steam, for example after server-side achievement changes. Uses cached data if no callback arrives in time.
bool remove_property(instance_id: int, property_name: String) ๐
There is currently no description for this method. Please help us by contributing one!
bool request_current_stats() ๐
Ensures local achievement and stat data is loaded. Returns immediately when stats are already available.
bool request_item_definitions(timeout_sec: float = 15.0) ๐
There is currently no description for this method. Please help us by contributing one!
void request_web_api_ticket(identity: String = "blazium") ๐
Requests a Web API session ticket and emits web_api_ticket_ready on success.
PackedByteArray serialize_inventory_result(result_handle: int) ๐
There is currently no description for this method. Please help us by contributing one!
bool set_achievement(name: String) ๐
Unlocks an achievement for the local user in memory. Call store_stats() to persist.
void set_debug_logging(enabled: bool) ๐
Enables or disables verbose debug logging.
bool set_property_bool(instance_id: int, property_name: String, value: bool) ๐
There is currently no description for this method. Please help us by contributing one!
bool set_property_float(instance_id: int, property_name: String, value: float) ๐
There is currently no description for this method. Please help us by contributing one!
bool set_property_int64(instance_id: int, property_name: String, value: int) ๐
There is currently no description for this method. Please help us by contributing one!
bool set_property_string(instance_id: int, property_name: String, value: String) ๐
There is currently no description for this method. Please help us by contributing one!
bool set_stat_float(name: String, value: float) ๐
Sets a float stat to an absolute value in memory. Call store_stats() to persist.
bool set_stat_int(name: String, value: int) ๐
Sets an integer stat to an absolute value in memory. Call store_stats() to persist.
void shutdown() ๐
Shuts down the Steam API session.
bool start_property_update() ๐
There is currently no description for this method. Please help us by contributing one!
Uploads pending achievement and stat changes to Steam.
bool submit_property_update() ๐
There is currently no description for this method. Please help us by contributing one!
bool transfer_item_quantity(source_instance_id: int, quantity: int, dest_instance_id: int) ๐
There is currently no description for this method. Please help us by contributing one!
bool trigger_item_drop(drop_list_definition: int) ๐
Triggers a playtime item drop for a playtimegenerator item definition. Waits for the async inventory result.