Nodsoft.WowsReplaysUnpack 1.0.9-pre-g35415cdef7

This is a prerelease version of Nodsoft.WowsReplaysUnpack.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Nodsoft.WowsReplaysUnpack --version 1.0.9-pre-g35415cdef7
                    
NuGet\Install-Package Nodsoft.WowsReplaysUnpack -Version 1.0.9-pre-g35415cdef7
                    
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="Nodsoft.WowsReplaysUnpack" Version="1.0.9-pre-g35415cdef7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nodsoft.WowsReplaysUnpack" Version="1.0.9-pre-g35415cdef7" />
                    
Directory.Packages.props
<PackageReference Include="Nodsoft.WowsReplaysUnpack" />
                    
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 Nodsoft.WowsReplaysUnpack --version 1.0.9-pre-g35415cdef7
                    
#r "nuget: Nodsoft.WowsReplaysUnpack, 1.0.9-pre-g35415cdef7"
                    
#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 Nodsoft.WowsReplaysUnpack@1.0.9-pre-g35415cdef7
                    
#: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=Nodsoft.WowsReplaysUnpack&version=1.0.9-pre-g35415cdef7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Nodsoft.WowsReplaysUnpack&version=1.0.9-pre-g35415cdef7&prerelease
                    
Install as a Cake Tool

<img align="right" src="logo.png" alt="logo" width="200"/>

WoWS-ReplaysUnpack

A C# file unpacking library for World of Warships Replays, inspired by Monstrofil's replays_unpack.

Information before using the library

The library supports only World of Warships replays starting with version 0.10.10. Trying to use an older replay can result in unexpected errors when processing the replay.

How to install

Install NuGet

Then, install from the package manager console:

PM> Install-Package Nodsoft.WowsReplaysUnpack

Or from the .NET CLI as:

dotnet add package Nodsoft.WowsReplaysUnpack

How to use

Add the service to an IServiceCollection

services.AddWowsReplayUnpacker();

Get the factory with DI, get the IReplayUnpackerService from the factory and call the Unpack method with either a Stream or byte[]

ReplayUnpackerFactory replayUnpackerFactory = serviceProvider.GetService<ReplayUnpackerFactory>();
UnpackedReplay unpackedReplay = replayUnpackerFactory
	.GetUnpacker()
	.Unpack(File.OpenRead("my-replay.wowsreplay"));

Custom Implementations

You can provide custom implementations of certain services.

services.Snippet.AddWowsReplayUnpacker(builder =>
{
	builder.AddReplayController<MyCustomReplayController>();
	builder.WithReplayDataParser<MyCustomReplayDataParser>();
	builder.WithDefinitionStore<MyCustomDefinitionStore>();
})

DefinitionStore

Responsible for managing, accessing and caching the .def files (used for type and property mapping).

Your custom definition store has to implement IDefinitionStore or extend DefaultDefinitionStore

ReplayDataParser

Responsible for parsing the binary packets to the specific network packets.

Your custom replay data parser has to implement IReplayDataParser or extend DefaultReplayParser

ReplayController

Responsible for handling parsed network packets and filling the UnpackedReplay with information.

Your custom replay controller has to implement IReplayController but it is strongly suggested to use ReplayControllerBase<T> where T is your custom controller class.

To use your custom controller add the type to the GetUnpacker() method.

UnpackedReplay unpackedReplay = replayUnpackerFactory
	.GetUnpacker<MyCustomReplayController>()
	.Unpack(File.OpenRead("my-replay.wowsreplay"));

CVE Check Only Implementation

In the library you get a custom implementation ready to use for when you only want to check the CVE . CveCheckOnlyController

It skips all network packets except the affected ones.

You have to add it with the AddReplayController<CveCheckOnlyController>() method and get the unpacker with GetUnpacker<CveCheckOnlyController>()

Extend the replay data

When implementing your own controller and extending ReplayControllerBase<T> you can overwrite the CreateUnpackedReplay method to create an instance of your own replay class. The replay class has to extend UnpackedReplay. That way you can add extra properties. It is important that you set the Replay property so the ReplayControllerBase can work with it.

Example:

public override UnpackedReplay CreateUnpackedReplay(ArenaInfo arenaInfo)
{
	Replay = new MyCustomUnpackedReplay(arenaInfo);
	return Replay;
}

You can see this in action here

Method/Property Subscriptions

When implementing your own controller and extending ReplayControllerBase<T> you can subscribe to EntityMethods and EntityProperty calls by adding a method with an attribute.

MethodSubscription("EntityName", "MethodName")

You have a few extra properties on the attribute to configure how the method will be called: bool IncludeEntity ⇒ When true it will include the Entity entity parameter

bool IncludePacketTime ⇒ When true it will include the float packetTime parameter

bool ParamsAsDictionary ⇒ When true the last paremeter will be Dictionary<string, object?> arguments / When false the parameters have to match the actual packet parameters in order and type exactly. When they don't match you will get an exception telling you the required parameters.

bool Priority ⇒ Defines the order in which methods are called when you have multiple subscriptions on the same method. Smaller = Earlier. Don't use -1.

Example:

[MethodSubscription("Avatar", "onArenaStateReceived")]
public void OnArenaStateReceived(Entity entity, float packetTime, ...)
{
}

PropertySubscription("EntityName", "PropertyName")

There are no extra properties available and the Entity entity parameter is always there.

Example:

[PropertySubscription("Avatar", "selectedWeapon")]
public void SelectedWeaponChanged(Entity entity, uint selectedWeaponId)
{
}

ExtendedData Library

You can install the Nodsoft.WowsReplaysUnpack.ExtendedData package from nuget to get a ready to use implementation that fills the replay with more information than the default controller.

Currently included in the ExtendedDataReplay:

  • Player Information
  • Chat Messages

How to use

services.AddWowsReplayUnpacker(builder =>
{
	builder.AddExtendedData();
});

ExtendedDataReplay unpackedReplay = (ExtendedDataReplay)replayUnpackerFactory
	.GetExtendedDataUnpacker()
	.Unpack(File.OpenRead("my-replay.wowsreplay"));
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.  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 (1)

Showing the top 1 NuGet packages that depend on Nodsoft.WowsReplaysUnpack:

Package Downloads
Nodsoft.WowsReplaysUnpack.ExtendedData

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.28-beta 121 8/21/2025
3.0.27-beta 215 8/7/2025
3.0.26-beta 148 7/10/2025
3.0.25-beta 319 6/12/2025
3.0.24-beta 266 5/15/2025
3.0.23-beta 180 4/3/2025
3.0.22-beta 233 3/6/2025
3.0.21-beta 147 2/6/2025
3.0.20-beta 105 1/9/2025
3.0.19-beta-g9da5bf005d 108 12/26/2024
3.0.19-beta 105 12/26/2024
3.0.17-beta-g0a0d613870 112 11/28/2024
3.0.17-beta 106 11/28/2024
3.0.16-beta-g3c4d61f874 153 11/5/2024
3.0.13-beta-gbe279605d9 138 10/3/2024
3.0.12-beta-g568c749ef4 131 9/5/2024
3.0.11-beta-g744c7b79c3 196 8/8/2024
3.0.10-beta-g43912a5a51 148 7/18/2024
3.0.9-beta-gf11948c8ef 146 6/27/2024
3.0.8-beta-gd38788540b 140 6/14/2024
3.0.7-beta-g06221c5d51 149 5/17/2024
3.0.6-beta-g27322c409e 137 5/17/2024
3.0.3-beta-g359d6d93c4 135 5/16/2024
3.0.2-beta-gaca613e98a 136 5/16/2024
3.0.1-beta-gf63fa17372 93 5/11/2024
2.0.29-alpha-g987beebb2b 217 8/18/2023
2.0.26-alpha-g4e3dff99ff 182 8/17/2023
2.0.22-alpha-g89b1099182 239 7/23/2023
2.0.16-alpha-gfaded6094c 230 7/22/2023
2.0.15-alpha-g38541b6d25 253 6/22/2023
2.0.14 156 11/28/2024
2.0.14-alpha-g0002f59a1d 233 5/25/2023
2.0.13 147 10/31/2024
2.0.13-alpha-g90583dc2c5 405 4/20/2023
2.0.12 142 10/3/2024
2.0.12-alpha-g4b27da27ea 235 4/20/2023
2.0.11 194 9/5/2024
2.0.11-alpha-g92d3716eff 337 3/23/2023
2.0.10 164 8/8/2024
2.0.10-alpha-g3e240c8566 292 2/16/2023
2.0.9 160 7/18/2024
2.0.9-alpha-g02ef2eaf60 252 1/19/2023
2.0.8 153 7/11/2024
2.0.8-alpha-g2a9a24924f 230 12/12/2022
2.0.7 160 6/26/2024
2.0.6 186 6/13/2024
2.0.6-alpha-gcbcb7f6a80 232 12/8/2022
2.0.5 203 5/16/2024
2.0.5-alpha-g7ea078df7a 278 11/19/2022
2.0.4 239 4/11/2024
2.0.3 241 3/14/2024
2.0.3-alpha-g12f645426c 306 10/6/2022
2.0.2 354 2/8/2024
2.0.2-alpha-g6916206934 317 9/24/2022
2.0.1 283 1/23/2024
2.0.1-g7a94259f07 160 2/7/2024
2.0.1-alpha-g920402ee9e 264 9/9/2022
1.1.26 179 1/23/2024
1.1.25-g2832215038 137 1/23/2024
1.1.24-g30ae630d7d 160 1/11/2024
1.1.23-g00d5114060 150 12/7/2023
1.1.22-gabca2f1262 143 12/7/2023
1.1.21-g89971f3a87 137 11/26/2023
1.1.20-g5b1471f83c 144 11/26/2023
1.1.19-g21acddabf5 145 11/23/2023
1.1.17-gfc59a0dbe8 157 11/9/2023
1.1.16-g03f94d799b 150 10/19/2023
1.1.11 329 10/12/2023
1.1.10-gbaec701b3f 153 10/12/2023
1.1.9-g60c84b7c31 162 9/14/2023
1.1.8-g3fc29955fd 189 9/14/2023
1.1.7 231 8/21/2023
1.1.4 260 7/21/2023
1.1.3 231 7/21/2023
1.1.2 290 7/6/2023
1.0.11 699 9/8/2022
1.0.11-gaf2ec4da01 249 9/9/2022
1.0.10 776 9/8/2022
1.0.10-gf865b963c8 270 9/8/2022
1.0.9-pre-g35415cdef7 252 9/8/2022
1.0.8-pre-g8097eaf5af 275 9/8/2022
1.0.7-pre-gba54b08e7a 260 9/8/2022
1.0.5-pre-gb7fb7564ee 282 8/5/2022
1.0.4-pre-g1025b3c13d 257 8/5/2022
1.0.3-pre-g0b9499d17c 275 7/26/2022
1.0.0 720 7/25/2022
1.0.0-pre1 280 7/23/2022
0.5.3 552 7/16/2022
0.5.2 710 5/27/2022
0.5.1 580 3/18/2022
0.5.0 661 1/19/2022
0.5.0-pre1 354 12/9/2021
0.4.0 428 12/5/2021
0.3.0 1,076 12/1/2021
0.2.0-dev1 1,272 11/28/2021