Table of Contents

Class ModularPiece

Namespace
LlamaLogic.Architecture
Assembly
LlamaLogic.Architecture.dll

Represents a modular piece of the ModularPiecesSection

public sealed class ModularPiece
Inheritance
ModularPiece
Inherited Members

Remarks

The key types below are those of every nonzero key in the lots examined.

Properties

CeilingRailKey

Gets/sets the key of the piece's ceiling rail, a CTProductCeilingRail (0x3F0C529A), or the null key

public ResourceKey CeilingRailKey { get; set; }

Property Value

ResourceKey

FenceKey

Gets/sets the key of the piece's fence, a CTProductFence (0x0418FE2A) or CTProductWall (0x9151E6BC), or the null key

public ResourceKey FenceKey { get; set; }

Property Value

ResourceKey

Remarks

The game checks its type against CTProductWall.

FirstWallPatternKey

Gets/sets the first wall pattern key of the piece, a CTProductWallPattern (0xD5F0F921), or the null key, written from version 5

public ResourceKey FirstWallPatternKey { get; set; }

Property Value

ResourceKey

Remarks

Both wall pattern keys are set or both are null in every lot examined; they differ in 218 of the 278 pieces that have them.

FloorPatternKey

Gets/sets the key of the piece's floor pattern, a CTProductFloorPattern (0xB4F762C9), or the null key

public ResourceKey FloorPatternKey { get; set; }

Property Value

ResourceKey

Remarks

When it reads a version before 3, the game replaces a key of any other type with a default.

Level

Gets/sets the piece's level, the high byte of Position

public sbyte Level { get; set; }

Property Value

sbyte

ModularPieceKey

Gets/sets the key of the piece, a CTProductModularPiece (0xA0451CBD)

public ResourceKey ModularPieceKey { get; set; }

Property Value

ResourceKey

Position

Gets/sets the piece's position, which the game reads as one 32-bit value and also uses as the piece's key

public uint Position { get; set; }

Property Value

uint

Remarks

The low byte is 0 in the lots examined; the other three are X, Z and Level, from low to high.

SecondWallPatternKey

Gets/sets the second wall pattern key of the piece, a CTProductWallPattern (0xD5F0F921), or the null key, written from version 5

public ResourceKey SecondWallPatternKey { get; set; }

Property Value

ResourceKey

Unknown1

Gets/sets a key of unknown role

public ResourceKey Unknown1 { get; set; }

Property Value

ResourceKey

Remarks

The null key in every lot examined.

Unknown2

Gets/sets a value of unknown meaning

public byte Unknown2 { get; set; }

Property Value

byte

Remarks

0, 2, 4 or 6 in the lots examined; the game passes it to its footprint routine. Hypothesis: the piece's orientation, in eighths of a turn.

Unknown3

Gets/sets a value of unknown meaning, written from version 6

public ushort Unknown3 { get; set; }

Property Value

ushort

Remarks

0 in 1,254 of the 1,317 version 6 pieces examined, otherwise 8 through 92.

X

Gets/sets the piece's position along the lot's local X axis, in half tiles: the second byte of Position

public sbyte X { get; set; }

Property Value

sbyte

Remarks

The game multiplies it, as a signed byte, by 0.5.

Z

Gets/sets the piece's position along the lot's local Z axis, in half tiles: the third byte of Position

public sbyte Z { get; set; }

Property Value

sbyte

Remarks

The game multiplies it, as a signed byte, by 0.5.