Stormancer.Server.Plugins.Steam 4.2.1.42

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Stormancer.Server.Plugins.Steam --version 4.2.1.42
                    
NuGet\Install-Package Stormancer.Server.Plugins.Steam -Version 4.2.1.42
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stormancer.Server.Plugins.Steam" Version="4.2.1.42" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stormancer.Server.Plugins.Steam" Version="4.2.1.42" />
                    
Directory.Packages.props
<PackageReference Include="Stormancer.Server.Plugins.Steam" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Stormancer.Server.Plugins.Steam --version 4.2.1.42
                    
#r "nuget: Stormancer.Server.Plugins.Steam, 4.2.1.42"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Stormancer.Server.Plugins.Steam@4.2.1.42
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Stormancer.Server.Plugins.Steam&version=4.2.1.42
                    
Install as a Cake Addin
#tool nuget:?package=Stormancer.Server.Plugins.Steam&version=4.2.1.42
                    
Install as a Cake Tool

Steam

Server Application

Secrets

Get base URI from script arguments

# Get BaseUri
if ($args.count -lt 1)
{
    echo "Missing Uri argument"
    return 1
}
$baseUri = $args[0]

Steam Api Key

Format : 32 hexadecimal characters.

Invoke-RestMethod -Method Put -Uri "$baseUri/_secrets/[GameOrPublisherAccount]/secrets/steam_apiKey" -ContentType "text/plain" -InFile "$PSScriptRoot\Secrets\steam_apiKey.txt"

[GameOrPublisherAccount] should be replaced by the Game or Publisher Stormancer account.

Steam Lobby metadata bearer token key

Use it when you want to enable joining Stormancer parties from Steam lobby invitations.

Format : 32 bytes (binary)

$steamBearerTokenPath = "$PSScriptRoot\Secrets\steam_lobbyMetadataBearerTokenKey"
if (-not(Test-path "$steamBearerTokenPath" -PathType leaf))
{
    dotnet tool run stormancer manage secrets generate --output "$steamBearerTokenPath" --size 32
}
Invoke-RestMethod -Method Put -Uri "$baseUri/_secrets/[GameOrPublisherAccount]/secrets/steam_lobbyMetadataBearerTokenKey" -ContentType "application/octet-stream" -InFile "$steamBearerTokenPath"

[GameOrPublisherAccount] should be replaced by the Game or Publisher Stormancer account.

<span style="color:red">BE CAREFUL, The key will be created randomly and overwritten by the script if it doesn't exist, so don't forget to backup it on first setup!</span>

Party configuration

Setup the party using a party creation event handler :

public class PartyEventHandler : IPartyEventHandler
{
    public Task OnCreatingParty(PartyCreationContext ctx)
    {
        ctx.PartyRequest.ServerSettings
            .ShouldCreatePlatformLobby(true)
            .MaxMembers(2)
            .SteamLobbyType(LobbyType.FriendsOnly);

        return Task.CompletedTask;
    }
}

Friends integration

The steam plugin adds the Steam friends to the list of friends provided by the Friends plugin. Steam friends not added to the crossplatform friends list of the application are added with the steam tags. If they have accounts in the application, they userId is set to their app user ids, and to steam-{steamId} if it's not the case.

If they don't have an account in the application, additional data is available in the friend object customData field, in json, with the following format:

{
"steam":{
   "steamId":"xxxx",
   "personaName":"Bob",
   "avatar":"https://avatarUrl"
    }
}

C++ client

Plugin configuration

By default steam.hpp includes steam_api.h. This behavior can be disabled by setting STORM_NOINCLUDE_STEAM. To use a different include path to steam_api.h, set STORM_STEAM_INCLUDE.

Configuration keys:

	/// <summary>
    /// Keys to use in Configuration::additionalParameters map to customize the Steam plugin behavior.
    /// </summary>
    namespace ConfigurationKeys
    {
        /// <summary>
        /// Enable Steam authentication.
        /// If disabled, the Steam plugin will not be considered for authentication.
        /// Default is "true".
        /// Use "false" to disable.
        /// </summary>
        constexpr const char* AuthenticationEnabled = "steam.authentication.enabled";

        /// <summary>
        /// The lobbyID the client should connect on authentication. 
        /// Automatic connection to a Steam lobby on successful authentication should occur when the game has been launched by a lobby invitation.
        /// You can get the LobbyID by searching the "+connect_lobby" parameter in the command line arguments (argv).
        /// </summary>
        constexpr const char* ConnectLobby = "steam.connectLobby";

        /// <summary>
        /// Should Stormancer initialize the Steam API library.
        /// Default is "true".
        /// Use "false" to disable.
        /// </summary>
        constexpr const char* SteamApiInitialize = "steam.steamApi.initialize";

        /// <summary>
        /// Should Stormancer run Steam Api callbacks.
        /// Default is "true".
        /// Use "false" to disable.
        /// </summary>
        constexpr const char* SteamApiRunCallbacks = "steam.steamApi.runCallbacks";
    }

Enable steam invitations on game launch

int main(int argc, char* argv[])
{
	auto config = Stormancer::Configuration::create(STORM_ENDPOINT, STORM_ACCOUNT, STORM_APPLICATION);
	for (int argi = 0; argi < argc; argi++)
	{
		config->processLaunchArguments.push_back(argv[argi]);
	}
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.2.1.43-pre 96 10/10/2025
4.2.1.42 201 2/28/2025
4.2.1.42-pre 147 10/30/2024
4.2.1.41-pre 162 10/20/2024
4.2.1.39-pre 132 10/15/2024
4.2.1.38-pre 128 10/3/2024
4.2.1.37-pre 123 9/30/2024
4.2.1.36-pre 136 9/30/2024
4.2.1.35-pre 126 9/30/2024
4.2.1.34-pre 119 9/26/2024
4.2.1.33-pre 156 9/26/2024
4.2.1.32-pre 107 9/26/2024
4.2.1.31-pre 148 9/9/2024
4.2.1.30-pre 145 8/29/2024
4.2.1.29-pre 122 7/26/2024
4.2.1.28-pre 130 7/24/2024
4.2.1.16-pre 137 7/9/2024
4.2.1.15-pre 117 7/3/2024
4.2.1.14-pre 137 6/10/2024
4.2.1.7-pre 119 5/30/2024
4.2.1.6-pre 153 5/28/2024
4.2.1.5-pre 157 5/6/2024
4.2.1.4-pre 169 4/11/2024
4.2.1.3-pre 156 4/9/2024
4.2.1.2-pre 155 4/8/2024
4.2.1.1-pre 143 4/8/2024
4.2.1-pre 141 3/13/2024
4.2.0.17-pre 140 3/11/2024
4.2.0.16-pre 164 2/22/2024
4.2.0.15-pre 243 11/15/2023
4.2.0.14-pre 143 11/12/2023
4.2.0.13-pre 191 10/24/2023
4.2.0.12-pre 193 10/20/2023
4.2.0.11-pre 180 9/29/2023
4.2.0.10-pre 193 9/6/2023
4.2.0.9-pre 183 8/30/2023
4.2.0.8-pre 197 8/30/2023
4.2.0.7-pre 190 8/21/2023
4.2.0.6-pre 248 8/2/2023
4.2.0.5-pre 219 7/31/2023
4.2.0.4-pre 201 7/28/2023
4.2.0.3-pre 226 6/27/2023
4.2.0.2-pre 208 6/26/2023
4.2.0.1-pre 217 6/26/2023
4.2.0-pre 206 6/21/2023
4.1.5-pre 231 6/15/2023
4.1.4.1-pre 245 5/9/2023
4.1.4 352 5/9/2023
4.1.4-pre 229 4/11/2023
4.1.3.2-pre 249 4/5/2023
4.1.3.1-pre 213 4/5/2023
4.1.3 311 4/4/2023
4.1.3-pre 269 1/17/2023
4.1.2.11 242 7/31/2023
4.1.2.10 570 9/28/2022
4.1.2.10-pre 264 9/12/2022
4.1.2.5-pre 289 8/2/2022
4.1.2.4-pre 316 7/1/2022
4.1.2.3-pre 364 5/4/2022
4.1.2.2-pre 291 5/4/2022
4.1.2.1-pre 266 5/3/2022
4.1.2-pre 311 4/14/2022
4.1.1.4-pre 297 3/15/2022
4.1.1.3-pre 284 2/28/2022
4.1.1.2 621 2/7/2022
4.1.1.1 604 2/1/2022
4.1.1.1-pre 306 1/28/2022
4.1.1 642 1/21/2022
4.1.0.17 605 1/21/2022
4.1.0.16 596 1/19/2022
4.1.0.16-pre 317 1/7/2022
4.1.0.15-pre 301 1/7/2022
4.1.0.14-pre 311 12/21/2021
4.1.0.13 439 12/15/2021
4.1.0.13-pre 360 10/28/2021
4.1.0.12-pre 380 10/21/2021
4.1.0.8-pre 376 10/18/2021
4.1.0.7-pre 384 10/18/2021
4.1.0.6 468 10/14/2021
4.1.0.6-pre 405 10/8/2021
4.1.0.5-pre 385 10/1/2021
4.1.0.4-pre 359 9/17/2021
4.1.0.3-pre 356 7/7/2021
4.1.0.2-pre 376 7/6/2021
4.1.0.1-pre 336 7/5/2021
4.0.5-pre 405 6/30/2021
4.0.4.2-pre 378 6/15/2021
4.0.4.1-pre 419 6/11/2021
4.0.4 533 5/23/2021
4.0.4-pre 367 5/3/2021
4.0.3 583 4/29/2021
4.0.2 548 3/1/2021
4.0.1.4-pre 366 2/11/2021
4.0.1.3-pre 340 2/11/2021
4.0.1.2-pre 337 2/11/2021
4.0.1.1-pre 410 2/10/2021
4.0.1-pre 386 2/10/2021
4.0.0.1 647 12/4/2020
3.0.5.4 631 10/20/2020
3.0.5.4-pre 525 9/8/2020
3.0.5.3-pre 425 8/20/2020
3.0.5.2-pre 440 8/20/2020
3.0.5.1-pre 494 8/19/2020
3.0.5-pre 505 8/13/2020
3.0.4-pre 552 6/29/2020
3.0.3-pre 470 6/5/2020
3.0.2.2 628 5/27/2020
3.0.2.2-pre 501 5/11/2020
3.0.2.1-pre 513 5/11/2020
3.0.2-pre 468 4/22/2020
3.0.1-pre 517 4/17/2020
3.0.0.2-pre 508 4/7/2020
3.0.0.1-pre 458 4/7/2020
3.0.0-pre 500 4/2/2020
2.1.0.2-pre 536 3/30/2020
2.1.0.1-pre 506 3/29/2020
2.1.0-pre 479 3/24/2020
2.0.0-pre 482 3/12/2020
1.2.1-pre 545 3/4/2020
1.2.0-pre 578 3/4/2020
1.1.0 666 2/21/2020
1.1.0-pre 506 2/22/2020
1.0.0 723 1/31/2020

Changed
*******
- Updated dependency to Users to support new abstraction lib.
- Performance optimizations.
- Removes friendlist querying from the server since the client plugin now does it itself

Added
*****
- Added support for the new Steam Authentication tokens introduced with the Steamworks SDK 1.57. Supports both the new and old authentication protocol. Switch to the new protocol happens by adding a `version` field to the auth parameters with `v1` as the content.
- Added support for multiple appIds, the client advertises its appId when sending the authentication request. If no appId is set, it defaults to the appId provided in the server configuration (field `steam.appId`). Additional authorized appId are configured by setting the `steam.appIds` server configuration to a list of steam app ids.
- Added `defaultAuthProtocol` field to the steam auth config section. This enables developer to chose the default Steam auth protocol to use if the client doesn't provide it. Defaults to v0001, the oldest protocol. This can be useful if you use a modified steam.hpp in the game client that doesn't advertise its protocol version and doesn't use v0001.
- Added steam id to friends with a steam account.
- Fix https://github.com/Stormancer/plugins/issues/15

Fixed
*****
- When all steam players leave the party, cleanup lobby id to make sure that the next joining player create a new steam lobby.
- Fixed serialization issue when retrieving the owner of a steam lobby from a lobby member.
- Don't call Steam leave lobby web API on player leave lobby because it doesn't work with webAPI tokens.
- Prevent cancellations from being logged as errors in SteamPartyEventHandler.Joined
- Ensure that a wrong steam appId provided by the client results in an auth error without error logs in the server.

Changed
*******
- Do not emit an error log when the steam client miss some features.