Table of Contents

Class Blueprint

Namespace
LlamaLogic.Architecture
Assembly
LlamaLogic.Architecture.dll

Represents a tray blueprint (a .blueprint file): a lot's objects and architecture (🔓)

public sealed class Blueprint
Inheritance
Blueprint
Inherited Members

Remarks

The file is a 32-bit version and the length of its content, followed by the content compressed with Snappy (the raw block format). The content is a header, the LotObjects as a protobuf message, ObjectDefinitionMappings, Images and finally the Architecture as a record bundle. Blueprints without the header (HasHeader is false) hold only the objects and the architecture; Sims 4 Studio reads them, but none has been observed.

Snappy compressors differ in their output, so Encode() reuses the compressed bytes it decoded when the content it would write is unchanged, and otherwise compresses the content anew. Decoding and encoding a blueprint the game wrote therefore reproduces it byte for byte.

Properties

Architecture

Gets/sets the lot's architecture

public LotArchitecture Architecture { get; set; }

Property Value

LotArchitecture

ContentVersion

Gets/sets the version of the content's header, which is 2 in every blueprint observed and decides whether the content holds Images

public int ContentVersion { get; set; }

Property Value

int

HasHeader

Gets/sets whether the content begins with a header, which every blueprint observed does

public bool HasHeader { get; set; }

Property Value

bool

Images

Gets the images, which only content version 2 holds

public Collection<BlueprintImage> Images { get; }

Property Value

Collection<BlueprintImage>

LotObjects

Gets/sets the lot's objects

public LotObjectList LotObjects { get; set; }

Property Value

LotObjectList

ObjectDefinitionMappings

Gets the pairs of object definition ids, which only blueprints with a header hold

public Collection<BlueprintObjectDefinitionMapping> ObjectDefinitionMappings { get; }

Property Value

Collection<BlueprintObjectDefinitionMapping>

Unknown1

Gets/sets a value of the header that follows the objects, which is 1 in every blueprint observed

public uint Unknown1 { get; set; }

Property Value

uint

Version

Gets/sets the version of the file, which is 1 in every blueprint observed

public int Version { get; set; }

Property Value

int

Methods

Decode(ReadOnlyMemory<byte>)

Decodes a blueprint from the content of its file

public static Blueprint Decode(ReadOnlyMemory<byte> data)

Parameters

data ReadOnlyMemory<byte>

Returns

Blueprint

Exceptions

InvalidDataException

The data is not a well-formed blueprint, or its architecture cannot be decoded

Encode()

Encodes the blueprint as the content of its file

public ReadOnlyMemory<byte> Encode()

Returns

ReadOnlyMemory<byte>

Exceptions

InvalidOperationException

Architecture or LotObjects is null, the architecture cannot be encoded as it is, or the content is too large for the format