Class TerrainPaintSection
- Namespace
- LlamaLogic.Architecture
- Assembly
- LlamaLogic.Architecture.dll
Represents the TerrainPaint section: the terrain paint layers, each a paint and a mask of where it is applied (🔓)
public sealed class TerrainPaintSection : LotArchitectureSection
- Inheritance
-
TerrainPaintSection
- Inherited Members
Remarks
The game's reader and writer keep two sets of layers, LayerSet0 and LayerSet1; what distinguishes them has not been established. The headers of the layers (key and use count) come first, set by set, then MaskSizeX and MaskSizeZ, then the masks, in the same order.
Versions 2 through 4 are supported, and the game writes version 4; the lots examined hold versions 2 and 4. Version 2 has only LayerSet1, followed by Unknown1, and its layers have no HasMask. Version 3 stores LayerSet1 before LayerSet0; version 4 stores LayerSet0 first.
The game writes no keys of this section into the ResourceManifestSection, which it saves earlier.
Constructors
TerrainPaintSection()
Initializes a new instance of the TerrainPaintSection class
public TerrainPaintSection()
Properties
LayerSet0
Gets the first set of layers, which version 2 does not have
public Collection<TerrainPaintLayer> LayerSet0 { get; }
Property Value
Remarks
When its caller passes a flag of unknown meaning, the game's reader replaces the key of this set's first layer with default key 0x1E of the lot's style. It holds 0 or 1 layers in the lots examined. Sculpting the terrain with the raise tool in game added a layer to this set (in-game test).
LayerSet1
Gets the second set of layers, the only one in version 2
public Collection<TerrainPaintLayer> LayerSet1 { get; }
Property Value
MaskSizeX
Gets/sets the number of mask values along the lot's local X axis
public int MaskSizeX { get; set; }
Property Value
Remarks
4 × SizeX + 1 in every lot examined, which this library requires, on decoding and on encoding, when it knows the lot's dimensions; the game itself reads only what fits its own mask.
MaskSizeZ
Gets/sets the number of mask values along the lot's local Z axis
public int MaskSizeZ { get; set; }
Property Value
Remarks
4 × SizeZ + 1 in every lot examined, which this library requires, on decoding and on encoding, when it knows the lot's dimensions.
Unknown1
Gets/sets a value of unknown meaning, written in version 2 only
public uint Unknown1 { get; set; }
Property Value
Remarks
The game reads and discards it; it equals the number of layers in every lot examined.
Version
Gets/sets the version of the section, which decides its layout
public uint Version { get; set; }
Property Value
Remarks
Encoding throws an InvalidOperationException when a field the version lacks holds a value other than its default, or a collection the version lacks is not empty.
Exceptions
- ArgumentOutOfRangeException
The version is not 2 through 4