Sc2DirectStrike.Parser 0.2.1

dotnet add package Sc2DirectStrike.Parser --version 0.2.1
                    
NuGet\Install-Package Sc2DirectStrike.Parser -Version 0.2.1
                    
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="Sc2DirectStrike.Parser" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sc2DirectStrike.Parser" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Sc2DirectStrike.Parser" />
                    
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 Sc2DirectStrike.Parser --version 0.2.1
                    
#r "nuget: Sc2DirectStrike.Parser, 0.2.1"
                    
#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 Sc2DirectStrike.Parser@0.2.1
                    
#: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=Sc2DirectStrike.Parser&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Sc2DirectStrike.Parser&version=0.2.1
                    
Install as a Cake Tool

SC2 Direct Strike Replay Parser

A .NET parser for extracting Direct Strike-specific data from decoded StarCraft II replay files.

The parser builds on s2protocol.NET and turns decoded replay data into Direct Strike-focused models for analysis, stats, tooling, and replay processing workflows.

What It Extracts

  • Replay identity, version/build, game time, duration, game mode, and TE status.
  • Players, observers, teams, game positions, commanders, selected races, APM, and results.
  • Objective timings, winner team, middle-control changes, refinery timings, tier upgrades, and filtered upgrade timings.
  • Player stats, build-unit names, grouped spawn waves, spawn-unit positions, and unit death positions when replay data contains them.
  • DTO output with compatibility hashes and breakpoint-oriented spawn summaries.

Main APIs

using Sc2DirectStrike.Parser;
using s2protocol.NET.Models;

Sc2Replay replay = /* decoded with s2protocol.NET */;

DirectStrikeReplay parsed = Sc2DirectStrikeParser.Parse(replay);
ReplayDto dto = Sc2DirectStrikeParser.ParseDto(replay);

Parse returns the Direct Strike domain model. ParseDto returns a compact DTO shape intended for downstream storage, comparison, or API output.

Requirements

  • .NET SDK 10.0.203
  • Target framework net10.0

Setup

From the repository root:

dotnet restore src\src.slnx
dotnet build src\src.slnx
dotnet test src\Sc2DirectStrike.Tests\Sc2DirectStrike.Tests.csproj

Current verified test baseline: 115 total, 111 passing, 4 skipped.

Stress replay tests are skipped by default. Run them explicitly with:

$env:SC2DIRECTSTRIKE_RUN_STRESS_TESTS = "1"
dotnet test src\Sc2DirectStrike.Tests\Sc2DirectStrike.Tests.csproj --filter TestCategory=Stress

Run parser benchmarks with:

dotnet run -c Release --project src\Sc2DirectStrike.Benchmarks\Sc2DirectStrike.Benchmarks.csproj

Project Layout

  • src/src.slnx - solution file containing all projects.
  • src/Sc2DirectStrike.Parser - parser library and public models.
  • src/Sc2DirectStrike.Tests - MSTest test project with replay fixtures.
  • src/Sc2DirectStrike.Tests/testdata - sample .SC2Replay files used by tests and benchmarks.
  • src/Sc2DirectStrike.Benchmarks - BenchmarkDotNet parser benchmarks.
  • src/samples/Sc2DirectStrike.DuplicateSample - sample tool for duplicate replay analysis.
  • src/samples/Sc2DirectStrike.IncomeSample - sample tool for replay income calculations.
  • src/samples/Sc2DirectStrike.ParserCompareSample - sample tool for parser comparison workflows.
  • src/Sc2DirectStrike.WasmSmoke - WebAssembly smoke project for parser compatibility checks.

Tech Stack

  • Target framework: net10.0
  • Language version: latest
  • Parser dependency: s2protocol.NET 0.9.2
  • Test framework: MSTest 4.0.2
  • Benchmark framework: BenchmarkDotNet 0.15.8
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
0.2.1 91 5/26/2026
0.2.0 94 5/13/2026