Table of Contents

Class StairStage

Namespace
LlamaLogic.Architecture
Assembly
LlamaLogic.Architecture.dll

Represents one stage of a Stair: a straight run of steps

public sealed class StairStage
Inheritance
StairStage
Inherited Members

Remarks

A stage is stored as a 16-bit value holding StepCount in its low 10 bits and a byte (Unknown1). From version 13 of StairsSection on, each stage also has Unknown2 and Unknown3, and from version 15 on Unknown4; these follow the stair's other fields, one set per stage in stage order.

The game keeps only the low 10 bits of StoredStepCount, Unknown2 and Unknown3, the low 6 bits of Unknown1 and the low 4 bits of Unknown4, and writes only those; the stored values are kept whole here so that every record round-trips.

In-game tests: a straight flight of 12 steps had one stage with Unknown2 5 and Unknown3 7; turning its upper part 90° split it into a stage of 8 steps (Unknown2 8, Unknown3 0) and one of 4 (Unknown2 0, Unknown3 4), both with Unknown1 2; after taller walls and a landing, the stages had 12 steps (Unknown1 2) and 8 (Unknown1 4). These are observations; the meanings of the values are not proven.

Constructors

StairStage()

Initializes a new instance of the StairStage class

public StairStage()

Properties

StepCount

Gets/sets the number of steps of the stage, the low 10 bits of StoredStepCount

public ushort StepCount { get; set; }

Property Value

ushort

Exceptions

ArgumentOutOfRangeException

The value is greater than 1,023

StoredStepCount

Gets/sets the stored 16-bit value whose low 10 bits are StepCount

public ushort StoredStepCount { get; set; }

Property Value

ushort

Remarks

The high 6 bits are 0 in every lot examined.

Unknown1

Gets/sets the unknown byte of the stage

public byte Unknown1 { get; set; }

Property Value

byte

Remarks

The game reads its low 6 bits; it is 0, 2, 4 or 6 in the lots examined, except 12 in 90 stair stages. That it is the stage's direction in the game's eight-way direction enumeration is a hypothesis; it did not change when a flight was turned 90° in game (in-game test).

Unknown2

Gets/sets the first unknown 16-bit value of the stage

public ushort Unknown2 { get; set; }

Property Value

ushort

Remarks

Present from version 13 on. The game reads its low 10 bits; it looks like a step index (hypothesis).

Unknown3

Gets/sets the second unknown 16-bit value of the stage

public ushort Unknown3 { get; set; }

Property Value

ushort

Remarks

Present from version 13 on. The game reads its low 10 bits; it looks like a step index (hypothesis).

Unknown4

Gets/sets the unknown byte that follows Unknown3

public byte Unknown4 { get; set; }

Property Value

byte

Remarks

Present from version 15 on. The game reads its low 4 bits.