s2protocol.NET
0.6.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package s2protocol.NET --version 0.6.0
NuGet\Install-Package s2protocol.NET -Version 0.6.0
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="s2protocol.NET" Version="0.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add s2protocol.NET --version 0.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: s2protocol.NET, 0.6.0"
#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 s2protocol.NET as a Cake Addin #addin nuget:?package=s2protocol.NET&version=0.6.0 // Install s2protocol.NET as a Cake Tool #tool nuget:?package=s2protocol.NET&version=0.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Introduction
dotnet 6 wrapper for Blizzards s2protocol for decoding/parsing StarCraft II replays (*.SC2Replay) using IronPython (2.7)
Getting started
Prerequisites
dotnet 6
Installation
dotnet add package s2protocol.NET
Usage
public static readonly string? assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
ReplayDecoder decoder = new(assemblyPath);
Sc2Replay? replay = await decoder.DecodeAsync(pathToSC2Replay);
Console.WriteLine(replay.Header.BaseBuild);
Optional options:
ReplayDecoder decoder = new(assemblyPath);
ReplayDecoderOptions options = new ReplayDecoderOptions()
{
Details = false,
Metadata = false,
MessageEvents = false,
TrackerEvents = true
};
CancellationTokenSource cts = new();
Sc2Replay? replay = await decoder.DecodeAsync(pathToSC2Replay, options, cts.Token);
Console.WriteLine(replay.TrackerEvents.SUnitBornEvents.FirstOrDefault());
Multiple replays:
ReplayDecoder decoder = new(assemblyPath);
var folder = "path_to_replay_folder";
List<string> replays = Directory.GetFiles(folder, "*.SC2Replay").ToList();
ReplayDecoderOptions options = new ReplayDecoderOptions() { TrackerEvents = false };
int threads = 8;
CancellationTokenSource cts = new();
int i = 0;
await foreach (var sc2rep in decoder.DecodeParallel(replays, threads, options, cts.Token))
{
i++;
Console.WriteLine($"{i} {sc2rep.Details.DateTimeUTC}");
}
Known Limitations / ToDo
- No GameEvents
- No AttirbuteEvents
- No InitData
ChangeLog
<details open="open"><summary>v0.6.0</summary>
- Init
</details>
<details><summary>v0.6.0</summary>
- Init </details>
Product | Versions 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.
-
net6.0
- IronPython (>= 2.7.12)
- IronPython.StdLib (>= 2.7.11)
- Microsoft.Extensions.Logging (>= 6.0.0)
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
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 |
---|---|---|
0.8.4 | 87 | 12/13/2024 |
0.8.3 | 88 | 11/30/2024 |
0.8.2 | 128 | 7/17/2024 |
0.8.1 | 160 | 4/3/2024 |
0.8.0 | 131 | 4/2/2024 |
0.8.0-rc1.0 | 193 | 11/1/2023 |
0.6.12 | 520 | 10/4/2023 |
0.6.11 | 692 | 4/24/2023 |
0.6.10 | 784 | 2/1/2023 |
0.6.9 | 836 | 1/24/2023 |
0.6.8 | 873 | 11/3/2022 |
0.6.7 | 839 | 10/27/2022 |
0.6.6 | 897 | 7/31/2022 |
0.6.5 | 957 | 4/23/2022 |
0.6.4 | 947 | 3/17/2022 |
0.6.3 | 906 | 2/20/2022 |
0.6.2 | 970 | 2/7/2022 |
0.6.1 | 956 | 2/4/2022 |
0.6.0 | 915 | 2/2/2022 |