Stormancer.Server.Plugins.Steam 4.1.4

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.1.4
NuGet\Install-Package Stormancer.Server.Plugins.Steam -Version 4.1.4
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.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Stormancer.Server.Plugins.Steam --version 4.1.4
#r "nuget: Stormancer.Server.Plugins.Steam, 4.1.4"
#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.
// Install Stormancer.Server.Plugins.Steam as a Cake Addin
#addin nuget:?package=Stormancer.Server.Plugins.Steam&version=4.1.4

// Install Stormancer.Server.Plugins.Steam as a Cake Tool
#tool nuget:?package=Stormancer.Server.Plugins.Steam&version=4.1.4

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;
    }
}

C++ client

Plugin configuration

By default steam.hpp includes steam_api.h. This behavior can be disabled by setting STORM_NOINCLUDE_STEAM.

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 net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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.4-pre 71 4/11/2024
4.2.1.3-pre 57 4/9/2024
4.2.1.2-pre 57 4/8/2024
4.2.1.1-pre 53 4/8/2024
4.2.1-pre 53 3/13/2024
4.2.0.17-pre 52 3/11/2024
4.2.0.16-pre 72 2/22/2024
4.2.0.15-pre 154 11/15/2023
4.2.0.14-pre 58 11/12/2023
4.2.0.13-pre 112 10/24/2023
4.2.0.12-pre 103 10/20/2023
4.2.0.11-pre 99 9/29/2023
4.2.0.10-pre 100 9/6/2023
4.2.0.9-pre 87 8/30/2023
4.2.0.8-pre 96 8/30/2023
4.2.0.7-pre 92 8/21/2023
4.2.0.6-pre 151 8/2/2023
4.2.0.5-pre 121 7/31/2023
4.2.0.4-pre 103 7/28/2023
4.2.0.3-pre 124 6/27/2023
4.2.0.2-pre 103 6/26/2023
4.2.0.1-pre 107 6/26/2023
4.2.0-pre 96 6/21/2023
4.1.5-pre 123 6/15/2023
4.1.4.1-pre 124 5/9/2023
4.1.4 202 5/9/2023
4.1.4-pre 116 4/11/2023
4.1.3.2-pre 132 4/5/2023
4.1.3.1-pre 98 4/5/2023
4.1.3 188 4/4/2023
4.1.3-pre 142 1/17/2023
4.1.2.11 132 7/31/2023
4.1.2.10 424 9/28/2022
4.1.2.10-pre 129 9/12/2022
4.1.2.5-pre 151 8/2/2022
4.1.2.4-pre 179 7/1/2022
4.1.2.3-pre 222 5/4/2022
4.1.2.2-pre 139 5/4/2022
4.1.2.1-pre 125 5/3/2022
4.1.2-pre 171 4/14/2022
4.1.1.4-pre 151 3/15/2022
4.1.1.3-pre 143 2/28/2022
4.1.1.2 464 2/7/2022
4.1.1.1 447 2/1/2022
4.1.1.1-pre 166 1/28/2022
4.1.1 492 1/21/2022
4.1.0.17 452 1/21/2022
4.1.0.16 443 1/19/2022
4.1.0.16-pre 179 1/7/2022
4.1.0.15-pre 167 1/7/2022
4.1.0.14-pre 166 12/21/2021
4.1.0.13 289 12/15/2021
4.1.0.13-pre 213 10/28/2021
4.1.0.12-pre 232 10/21/2021
4.1.0.8-pre 223 10/18/2021
4.1.0.7-pre 232 10/18/2021
4.1.0.6 314 10/14/2021
4.1.0.6-pre 259 10/8/2021
4.1.0.5-pre 231 10/1/2021
4.1.0.4-pre 218 9/17/2021
4.1.0.3-pre 216 7/7/2021
4.1.0.2-pre 222 7/6/2021
4.1.0.1-pre 197 7/5/2021
4.0.5-pre 263 6/30/2021
4.0.4.2-pre 230 6/15/2021
4.0.4.1-pre 264 6/11/2021
4.0.4 370 5/23/2021
4.0.4-pre 228 5/3/2021
4.0.3 422 4/29/2021
4.0.2 358 3/1/2021
4.0.1.4-pre 202 2/11/2021
4.0.1.3-pre 188 2/11/2021
4.0.1.2-pre 180 2/11/2021
4.0.1.1-pre 267 2/10/2021
4.0.1-pre 217 2/10/2021
4.0.0.1 480 12/4/2020
3.0.5.4 446 10/20/2020
3.0.5.4-pre 370 9/8/2020
3.0.5.3-pre 262 8/20/2020
3.0.5.2-pre 291 8/20/2020
3.0.5.1-pre 324 8/19/2020
3.0.5-pre 341 8/13/2020
3.0.4-pre 399 6/29/2020
3.0.3-pre 303 6/5/2020
3.0.2.2 454 5/27/2020
3.0.2.2-pre 324 5/11/2020
3.0.2.1-pre 337 5/11/2020
3.0.2-pre 309 4/22/2020
3.0.1-pre 351 4/17/2020
3.0.0.2-pre 347 4/7/2020
3.0.0.1-pre 286 4/7/2020
3.0.0-pre 329 4/2/2020
2.1.0.2-pre 357 3/30/2020
2.1.0.1-pre 339 3/29/2020
2.1.0-pre 318 3/24/2020
2.0.0-pre 324 3/12/2020
1.2.1-pre 391 3/4/2020
1.2.0-pre 405 3/4/2020
1.1.0 487 2/21/2020
1.1.0-pre 337 2/22/2020
1.0.0 557 1/31/2020

Fixed
*****
- Destroy Steam lobby when last Steam player leave the party.
Changed
*******
- Improve logging in case of lobby creation failure.
- Compatibility with Users version 8.0.0