HeroesONE-R 1.0.0

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

HeroesONE-R

HeroesONE-R is a C# library that can read/write .ONE files from Sonic Heroes (2003/2004) and Shadow The Hedgehog (2005). This version uses prs-rs for PRS decompression/compression and should be used over the other releases in most cases.

Usage Example

var oneFile = "example.one"; // path to a .one file
ONEArchiveType archiveType = ONEArchiveTester.GetArchiveType(ref oneData);
var oneDataContent = Archive.FromONEFile(ref oneData);
// ...
// edit content, in this case replacing the data of the first file in the .one, but persisting the internal name and RW metadata
datOneDataContent.Files[0].CompressedData = Prs.CompressData(contentEdited).ToArray();
// ...
var updatedDatOneData = datOneDataContent.BuildShadowONEArchive(archiveType == ONEArchiveType.Shadow060);
File.WriteAllBytes("example-edited.one", updatedDatOneData.ToArray());

Example Projects

This library was primarily written for HeroesONE-Reloaded, a WinForms GUI frontend for editing ONE archives. That repo contains the history of the prior HeroesONE project, and also houses the .NET Framework version of this library using csharp-prs.

ShadowRando - A Shadow the Hedgehog Randomizer, leverages this library to read .ONE files to replace spline data. HeroesPowerPlant - A full level editor for Sonic Heroes and Shadow the Hedgehog, leverages this library for getting and editing game assets such as geometry, collision, models, and more.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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

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
1.0.0 87 1/30/2026