Stagehand.Definitions 0.3.8

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

  Stagehand Logo

Stagehand.Definitions

The Stagehand.Definitions package contains the definition data used for storing and transferring Stage definitions.

Definitions

Stage definitions (StageDefinition) primarily consist of StageInfo, which contains informational metadata for the player about the definition, and ObjectDefinition instances that define the objects to create.

JSON Loading & Saving

To read and write Stage definitions from/to .json files, use the TryParseJSONStream and WriteToJSONStream methods. These methods use standardized serialization options including support for serializing vector values as JSON objects and enum values as strings.

To load a Stage definition from a stream of JSON data, use StageDefinition.TryParseJSONStream(), like so:

using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
{
    if (StageDefinition.TryParseJSONStream(stream, out var definition))
    {
        // Use `definition`
    }
    else
    {
        // Failed to parse
    }
}

To write a Stage definition to a JSON stream, use StageDefinition.WriteToJSONStream(), like so:

using (var stream = new FileStream(filename, FileMode.Create, FileAccess.Write))
{
    definition.WriteToJSONStream(filename);
}

IPC String Loading & Saving

To serialize and deserialize Stage definitions to/from IPC-compatible strings, use the ToDefinitionString and TryParseDefinitionString. At the moment these are just non-prettified JSON strings, but in the future they will become Penumbra-style base64-encoded Gzipped JSON strings.

Example:

// Serialize to IPC string
var ipcString = definition.ToDefinitionString();

// Deserialize back to definition
if (StageDefinition.TryParseDefinitionString(ipcString, out var newDefinition))
{
    // Use `newDefinition`
}
else
{
    // Failed to parse
}
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.
  • net10.0

    • No dependencies.

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.3.8 85 4/6/2026
0.3.7 93 3/28/2026
0.3.6 84 3/27/2026
0.3.5 85 3/24/2026
0.3.4 79 3/22/2026
0.3.3 88 3/21/2026
0.3.2 82 3/19/2026
0.3.1 84 3/19/2026
0.3.0 83 3/18/2026
0.2.4 86 3/18/2026
0.2.3 81 3/18/2026
0.2.2 84 3/18/2026
0.2.1 85 3/18/2026
0.2.0 90 3/14/2026
0.1.2 93 3/12/2026
0.1.0 90 3/12/2026