steamworks.*

Type Library
Revision Release 2024.3703
Keywords steam, steamworks, achievements, leaderboard
Platforms macOS, Windows

Overview

The Steamworks plugin is intended for desktop games uploaded to Steam. It is used to handle achievements, player stats, leaderboards, and to show in-app overlays.

Gotchas

The Steamworks plugin can be used in the Solar2D Simulator, but it has the following limitations/issues:

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings =
{
    plugins =
    {
        ["plugin.steamworks"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

You must also add the AppID assigned to your application by Steam into your config.lua file:

application =
{
    steamworks =
    {
        appId = "YOUR_APP_ID"
    },
}

Syntax

local steamworks = require( "plugin.steamworks" )

Functions

steamworks.addEventListener()

steamworks.getAchievementImageInfo()

steamworks.getAchievementInfo()

steamworks.getAchievementNames()

steamworks.getUserImageInfo()

steamworks.getUserInfo()

steamworks.getUserStatValue()

steamworks.newImageRect()

steamworks.newTexture()

steamworks.removeEventListener()

steamworks.requestActivePlayerCount()

steamworks.requestLeaderboardEntries()

steamworks.requestLeaderboardInfo()

steamworks.requestSetHighScore()

steamworks.requestUserProgress()

steamworks.resetUserProgress()

steamworks.resetUserStats()

steamworks.setAchievementProgress()

steamworks.setAchievementUnlocked()

steamworks.setNotificationPosition()

steamworks.setUserStatValues()

steamworks.showGameOverlay()

steamworks.showStoreOverlay()

steamworks.showUserOverlay()

steamworks.showWebOverlay()

steamworks.getAuthSessionTicket()

Properties

steamworks.appId

steamworks.appOwnerSteamId

steamworks.canShowOverlay

steamworks.isLoggedOn

steamworks.userSteamId

Events

achievementImageUpdate

achievementInfoUpdate

activePlayerCount

leaderboardEntries

leaderboardInfo

microtransactionAuthorization

overlayStatus

setHighScore

userInfoUpdate

userProgressSave

userProgressUnload

userProgressUpdate

Types

AchievementInfo

ImageInfo

ResultCode

UserInfo