Table of Contents

Class Plex

Namespace
LlamaLogic.Architecture
Assembly
LlamaLogic.Architecture.dll

Represents a plex (a unit of a multi-unit lot) of the PlexesSection, with the blocks that make up its outline

public sealed class Plex
Inheritance
Plex
Inherited Members

Remarks

The layout follows the game's reader and writer.

Layout, with gates on the section's version: Id (ushort), the offset within the section at which the plex ends (uint, from version 2 on), IsVisible (uint), a uint block count, the Blocks, Unknown1 and Unknown2 (after 4), the name (version 6: a uint byte count and ASCII text), then after 5 TileCount, Unknown3, Unknown4 and Unknown5. The game writes the end offset as a placeholder and patches it, so that its reader can skip the plex; the offset is not a property, it is checked on reading and computed on writing.

Properties

Blocks

Gets the blocks of the plex

public Collection<WallBlock> Blocks { get; }

Property Value

Collection<WallBlock>

Remarks

In the lots examined 1,182 of the 1,363 blocks of plexes have a Id that is also the id of a block of the bundle's WallBlocksSection; version 4 sections hold block versions 32, 33 and 35, later ones version 36.

Id

Gets/sets the id of the plex

public ushort Id { get; set; }

Property Value

ushort

Remarks

The game keys its plexes by this id; 300 is the shared plex.

IsVisible

Gets/sets whether the plex is visible

public bool IsVisible { get; set; }

Property Value

bool

Remarks

The game keeps the low byte at offset 0x44 of the plex, which its VisibleCallback compares with 1.

Name

Gets/sets the name version 6 stores

public string Name { get; set; }

Property Value

string

Remarks

The game reads it and discards it. Observed values are "Shared Unit" and "Unit 1". It is stored as a byte count and one byte per character, so it must be ASCII: reading a name with other bytes fails, and so does encoding a name with other characters.

TileCount

Gets/sets the number of tiles of the plex

public uint TileCount { get; set; }

Property Value

uint

Remarks

The game returns it from its get_plex_tile_count Python function. Stored from version 6 on.

Unknown1

Gets/sets the first of two ulong values the game keeps at offsets 0x30 and 0x38 of the plex

public ulong Unknown1 { get; set; }

Property Value

ulong

Remarks

Hypothesis: the id of the owning household; where it is 0 the game falls back to the lot owner. The game zeroes both values when loading with one of its load flags. 0 in every lot examined. Stored from version 5 on.

Unknown2

Gets/sets the second of two ulong values the game keeps at offsets 0x30 and 0x38 of the plex

public ulong Unknown2 { get; set; }

Property Value

ulong

Remarks

0 in every lot examined. Stored from version 5 on.

Unknown3

Gets/sets a byte the game keeps at offset 0x45 of the plex

public byte Unknown3 { get; set; }

Property Value

byte

Remarks

The game treats it as bit flags. 0, 1 or 10 in the lots examined. Stored from version 6 on.

Unknown4

Gets/sets a byte the game keeps at offset 0x46 of the plex

public byte Unknown4 { get; set; }

Property Value

byte

Remarks

The game copies it from the plex's zone object. 0 in every lot examined. Stored from version 6 on.

Unknown5

Gets/sets a byte the game keeps at offset 0x47 of the plex

public byte Unknown5 { get; set; }

Property Value

byte

Remarks

The game copies it from the plex's zone object. 0 in every lot examined. Stored from version 6 on.