JuicerMV.SoulsFormats
0.1.4
dotnet add package JuicerMV.SoulsFormats --version 0.1.4
NuGet\Install-Package JuicerMV.SoulsFormats -Version 0.1.4
<PackageReference Include="JuicerMV.SoulsFormats" Version="0.1.4" />
<PackageVersion Include="JuicerMV.SoulsFormats" Version="0.1.4" />
<PackageReference Include="JuicerMV.SoulsFormats" />
paket add JuicerMV.SoulsFormats --version 0.1.4
#r "nuget: JuicerMV.SoulsFormats, 0.1.4"
#:package JuicerMV.SoulsFormats@0.1.4
#addin nuget:?package=JuicerMV.SoulsFormats&version=0.1.4
#tool nuget:?package=JuicerMV.SoulsFormats&version=0.1.4
SoulsFormats
A .NET library for reading and writing various FromSoftware file formats, targeting .NET Framework 4.6.2, .NET Standard 2.1, and .Net 9.0.
Dark Souls, Demon's Souls, Bloodborne, and Sekiro are the main focus, but other From games may be supported to varying degrees.
A brief description of each supported format can be found in FORMATS.md, with further documentation for some formats.
Originally by JKAnderson, NuGet distribution by JuicerMV.
Usage
Objects for most formats can be created with the static method Read, which accepts either a byte array or a file path. Using a path is preferable as it will be read with a stream, reducing memory consumption.
BND3 bnd = BND3.Read(@"C:\your\path\here.chrbnd");
// or
byte[] bytes = File.ReadAllBytes(@"C:\your\path\here.chrbnd");
BND3 bnd = BND3.Read(bytes);
The Write method can be used to create a new file from an object. If given a path it will be written to that location with a stream, otherwise a byte array will be returned.
bnd.Write(@"C:\your\path\here.chrbnd");
// or
byte[] bytes = bnd.Write();
File.WriteAllBytes(@"C:\your\path\here.chrbnd", bytes);
DCX (compressed files) will be decompressed automatically and the compression type will be remembered and reapplied when writing the file.
BND3 bnd = BND3.Read(@"C:\your\path\here.chrbnd.dcx");
bnd.Write(@"C:\your\path\here.chrbnd.dcx");
The compression type can be changed by either setting the Compression field of the object, or specifying one when calling Write.
BND3 bnd = BND3.Read(@"C:\your\path\here.chrbnd.dcx");
bnd.Write(@"C:\your\path\here.chrbnd", DCX.Type.None);
// or
BND3 bnd = BND3.Read(@"C:\your\path\here.chrbnd.dcx");
bnd.Compression = DCX.Type.None;
bnd.Write(@"C:\your\path\here.chrbnd");
Finally, DCX files can be generically read and written with static methods if necessary. DCX holds no important metadata so they read/write directly to/from byte arrays instead of creating an object.
byte[] bndBytes = DCX.Decompress(@"C:\your\path\here.chrbnd.dcx");
BND3 bnd = BND3.Read(bndBytes);
// or
byte[] dcxBytes = File.ReadAllBytes(@"C:\your\path\here.chrbnd.dcx");
byte[] bndBytes = DCX.Decompress(dcxBytes);
BND3 bnd = BND3.Read(bndBytes);
Writing a new DCX requires a DCX.Type parameter indicating which game it is for. DCX.Decompress has an optional out parameter indicating the detected type which should usually be used instead of specifying your own.
byte[] bndBytes = DCX.Decompress(@"C:\your\path\here.chrbnd.dcx", out DCX.Type type);
DCX.Compress(bndBytes, type, @"C:\your\path\here.chrbnd.dcx");
// or
byte[] bndBytes = DCX.Decompress(@"C:\your\path\here.chrbnd.dcx", out DCX.Type type);
byte[] dcxBytes = DCX.Compress(bndBytes, type);
File.WriteAllBytes(@"C:\your\path\here.chrbnd.dcx", dcxBytes);
Credits
ZstdSharp by Oleg Stepanischev
SoulsFormats original SoulsFormats by JkAnderson
Special Thanks
To everyone below and many others, for either creating tools that I learned from, or helping decipher these formats one way or another.
- albeartron
- Atvaark
- B3LYP
- horkrux
- HotPocketRemix
- katalash
- Lance
- Meowmaritus
- Nyxojaele
- Pav
- SeanP
- thefifthmatt
- Wulf2k
- Yoshimitsu
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 is compatible. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- ZstdSharp.Port (>= 0.8.1)
-
.NETStandard 2.1
- System.Text.Encoding.CodePages (>= 9.0.8)
- ZstdSharp.Port (>= 0.8.1)
-
net9.0
- System.Text.Encoding.CodePages (>= 9.0.8)
- ZstdSharp.Port (>= 0.8.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on JuicerMV.SoulsFormats:
| Package | Downloads |
|---|---|
|
JuicerMV.LibUXM
A fork of Nordgaren/UXM-Selective-Unpack which turns UXM into a NuGet library for easy consumption. |
|
|
JuicerMV.YabberClassLibrary
A .NET library version of Yabber. |
GitHub repositories
This package is not used by any popular GitHub repositories.