Assumptions
The reference is silent, incomplete or unclear, so the code picks an answer. Basis values are defined in Spec deviations.
Group type 10
Reference: UESP Mod File Format. Layout in Plugin file format.
| Reference | Code | Why | Basis |
|---|---|---|---|
| The group type table stops at 9 | Type 10 (cell visible distant children) is walked like types 8 and 9 | Records under it would otherwise be missed | Tooling (xEdit) |
Tests: PluginWalkerTests.
Record types in cell children
Reference: UESP Mod File Format, record type table. The CELL page only says a cell’s children group holds its “references”.
| Question | Code | Why | Basis |
|---|---|---|---|
| Which record types can a cell’s children group (types 8, 9 and 10) hold? | REFR, ACHR, LAND, NAVM, PGRE, PHZD, the types the table places in cell subgroups. PluginWalker enters cell children only when a query asks for one of them | Skipping cell children saves most of a worldspace walk | Vanilla data: the five vanilla masters and the two Creation Club masters of the Special Edition hold no other type there |
If a plugin carries another type in cell children, add it to RecordTypeSet’s cell child list.
Tests: PluginWalkerTests.
WRLD unnamed flags
Reference: UESP WRLD.
| Reference | Code | Why | Basis |
|---|---|---|---|
DATA flag 0x04 unnamed | Kept as WorldspaceFlags.Unknown04 | Printed rather than dropped | Design |
PNAM flag 0x10 unknown | Kept as WorldspaceParentUseFlags.Unknown10 | Same | Design |
Tests: WorldspaceReaderTests.
XTEL across overrides
Reference: How Skyrim Loads Forms. The rest of the merge rules are in Rule of One merge.
| Question | Code | Why | Basis |
|---|---|---|---|
Does an override without XTEL clear the teleport? | HasTeleport is or-ed across overrides | The article doesn’t cover XTEL, so an earlier plugin’s value is kept | Unverified |
If a door loses its teleport in game after an override, switch HasTeleport to latest-wins.
Tests: LocationMergerRuleOfOneTests.
String table encoding
Reference: UESP String Table File Format. Pipeline in Localization.
| Question | Code | Why | Basis |
|---|---|---|---|
| Polish and Czech secondary encoding is “Custom” | No secondary encoding | Undocumented | Vanilla data |
| Japanese and Chinese aren’t in the table | No secondary encoding | Nothing to implement against | Vanilla data |
| Behavior when both encodings fail | Lenient UTF-8 decode, counted | Keeps the text, flags the problem | Design |
Every string table of the five vanilla masters, in all nine languages, decodes as pure UTF-8 with no fallback, so the missing secondary encodings don’t affect vanilla data. How the fallback is reported is in Reported data problems.
Tests: SkyrimStringTableTests.
Inline string encoding
Reference: UESP File Format Conventions, UESP String Table File Format, xEdit What’s New, 4.0.0. Pipeline in Localization.
The two UESP pages disagree. File Format Conventions says every string is Windows-1252. String Table File Format says the game tries UTF-8 first, then the language’s secondary encoding.
| Strings | Code | Why | Basis |
|---|---|---|---|
General: EDID, paths, TES4 author, description and masters | Windows-1252 | Follows File Format Conventions; the player never sees them | Tooling (xEdit) |
An lstring of a non-localized plugin (FULL, DESC, CNAM) | Kept as raw bytes, decoded per export language with the string table rule | The player sees them; Vominheim.esm stores them as UTF-8 | Design |
xEdit splits plugin strings the same way: “general strings” in Windows-1252, “translatable
strings” in the language’s code page. For translatable strings, xEdit uses one code page per
language (Windows-1252 for English, UTF-8 for most other languages in Special Edition). The code
tries UTF-8 first for every language instead, as String Table File Format describes. The title of
Vominheim.esm’s BOOK 63774C stores ô as the UTF-8 bytes C3 B4: read as Windows-1252,
it becomes “Blanchecôte”.
Windows-1252 text with accents is almost never valid UTF-8, so a plugin written in Windows-1252
still decodes through the fallback. A language with no secondary encoding decodes invalid bytes
leniently, see Reported data problems. The vanilla masters are
localized, so they don’t exercise this path. If the guess is wrong, Windows-1252 text that
happens to be valid UTF-8, such as é, shows as é.
Tests: BufferDecodeTests, GameTextDecoderTests, LStringResolverTests,
BookLocalizationResolverTests.
Localized string id 0
The reference doesn’t say what id 0 means.
| Question | Code | Why | Basis |
|---|---|---|---|
A BOOK FULL or DESC with id 0 | Left unresolved, not counted as missing, no warning | Id 0 is in no vanilla table; it reads as “no string” | Vanilla data |
Vanilla has 7 such fields in Skyrim.esm and 1 in Dragonborn.esm. Any other missing id is a
real problem, see Reported data problems.
Tests: BookLocalizationResolverTests.
BOOK CNAM table
The reference says .dlstrings holds “Journal/Book entries” and .strings the “general strings”,
but doesn’t list fields. See Localization.
| Question | Code | Why | Basis |
|---|---|---|---|
Which table holds a BOOK CNAM id | .dlstrings | Every non-zero vanilla id resolves there; 71 miss in .strings | Vanilla data |
Tests: BookLocalizationResolverTests.
Book teaches
Reference: UESP BOOK, DATA, and
UESP Actor Value Indices.
| Question | Code | Why | Basis |
|---|---|---|---|
Flags 0x01 and 0x04 both set | Read as a spell | No vanilla book sets both; a spell FormId is the more specific reading | Unverified |
Where the skill’s AVIF lives | Skyrim.esm, FormId from the reference’s table | Plugin data has no index to AVIF mapping | Vanilla data |
Teaches without either flag | Ignored | The reference only defines it under those flags | Design |
Vanilla has 90 skill books (18 skills, 5 each) and 116 spell tomes. Each skill book’s AVIF has the
expected EditorId (AVSmithing, and AVMysticism for Illusion). If a book with both flags
teaches its skill in game, swap the order in BookMerger.ResolveTeaches.
Tests: BookMergerBookDataTests, ActorValuesTests.
Keyword count
Reference: UESP BOOK, KSIZ and
KWDA.
| Question | Code | Why | Basis |
|---|---|---|---|
KSIZ disagrees with KWDA’s length | KWDA’s length wins; KSIZ isn’t read | The array is what’s actually there | Tooling (xEdit) |
KWDA length not a multiple of 4 | Trailing bytes ignored | A partial FormId can’t be resolved | Design |
Tests: BookReaderTests.
BSA duplicate paths
Nothing documents how several archives resolve a shared path. See BSA archive format.
| Question | Code | Why | Basis |
|---|---|---|---|
| A path in several archives | The last archive in the order wins | Mirrors the plugin load order | Design |
Vanilla archives overlap in a few places. The paths in both Skyrim - Animations.bsa and
Skyrim - Meshes0.bsa resolve to Meshes0, and those in both Textures3 and Textures8 resolve
to Textures8, the later archive each time. Each installed voices archive holds the same paths, so the last installed
one wins; the exporter reads no voice file. The book export and terrain LOD
output don’t depend on which copy wins, so vanilla data can’t confirm the rule.
Tests: ArchiveFileSystemTests, LocalizationSourceTests, FontSourceTests.
Loose files
UESP’s archive page doesn’t say how loose files and archives combine. Mod manager communities state that a loose file always wins, see the STEP forum thread on BSA extraction.
| Question | Code | Why | Basis |
|---|---|---|---|
| A path both loose and in an archive | The loose file wins, whatever the archive order | The engine checks loose files first | Article |
| Case of a loose path | Ignored | Windows file systems ignore it | Article |
| Two loose files differing only by case (Linux) | The first in ordinal order wins, the other is reported | The game on Windows sees one file | Design |
A file at the root of Data | Not a resource | Resource paths always start with a folder | Design |
With a Special Edition Data and a red Textures\Landscape\TundraRocks01.DDS, the
raster-records map of Tamriel shows the Whiterun tundra in red, and a broken loose copy of a
book’s menu art NIF is reported unreadable by export:books.
Tests: ArchiveFileSystemTests, LocalizationSourceTests, GameSessionTests.
File name block padding
The spec gives totalFileNameLength as the total length of all file names, with their \0.
Vanilla MarketplaceTextures.bsa counts 9 more \0 bytes after its last name.
| Question | Code | Why | Basis |
|---|---|---|---|
\0 bytes after the last name, inside totalFileNameLength | Skipped as padding | A Bethesda archive has them, and the folder record offsets count them | Vanilla data |
| Any other byte there, or fewer names than files | The archive is rejected | The names and the file records no longer line up | Design |
The block is read in one call of totalFileNameLength bytes, so this length has to be right.
Tests: BsaListingReaderTests.
Plugin archives
The engine loads the archives named after each plugin along with it. The name rule is stated by forum posts, not by UESP: see the Steam discussion and Auto BSA.
| Question | Code | Why | Basis |
|---|---|---|---|
| Which archives a plugin loads | <plugin>.bsa and <plugin> - Textures.bsa | Both names are in SkyrimSE.exe | Article |
| Their order | <plugin>.bsa first | No source states it | Unverified |
| Their place among archives | After the vanilla archives, in plugin order | The ini archives load first | Article |
| Vanilla masters | No plugin archive | They ship in the shared Skyrim - *.bsa archives | Vanilla data |
If a mod ships a file in both archives and the wrong copy shows up, swap the order in
Game/Vanilla/Archives.PluginArchiveFileNames.
Tests: LoadOrderTests, CustomLoadOrderTests, GameSourceTests.
Book markup conventions
Book markup and fontconfig*.txt have no published spec. The parsers follow what vanilla data
contains. See Book markup assets and
Font export.
| Question | Code | Why | Basis |
|---|---|---|---|
fontconfig*.txt syntax | Parsed as the vanilla files write it | No published format | Vanilla data |
| A texture spelled with different casing | The file uses the archive entry’s casing | Keeps names independent of processing order | Design |
Unit of <font size> and <img width height> | Flash stage pixels of the book text field | book.swf’s page field writes its 22 px font height as size="22"; a 296×278 image fills its 296 px text width | Vanilla data |
Size of an <img> without width and height | A 64 × 64 px box, aspect ratio ignored | Two unsized QA book images of different sizes both measure about 64 × 62 in-game | Unverified: measured on one 1080p screenshot. If wrong, unsized drop caps look larger or smaller than in-game |
Both are applied by the generator, see Book page geometry. Faces and assets the data points at but doesn’t ship are in Reported data problems.
Tests: FontConfigParserTests, MenuArtTextureConverterTests, BookContentSanitizerTests.
Terrain LOD tiles
The lodsettings\<worldspace>.lod layout follows its
UESP page, see
LOD settings. The
<worldspace>.<level>.<x>.<y>.dds names under textures\terrain\<worldspace>\ are an archive
path convention, not record data: no UESP page covers them, and the code follows the
DynDOLOD terrain LOD page and xEdit. See
debug:*:archive:terrain-lod.
| Question | Code | Why | Basis |
|---|---|---|---|
| Tile naming | Level, then the tile’s south-west cell X and Y | Stated by DynDOLOD; matches every tile in the vanilla texture archives | Vanilla data |
| Grid origin | The lodsettings left/bottom cell, not zero | xEdit’s BlockForCell aligns on it; Blackreach (-23, -9) and Sovngarde (-24, -32) tiles only line up this way | Vanilla data |
| Cell to tile | Tiles step by the level from the origin | Same formula as xEdit’s BlockForCell; every expected tile of the 12 worldspaces with LOD exists at every level they generate | Vanilla data |
.lod stride_pow2 | The grid side in cells, itself a power of two, not an exponent | The spec gives only the field name; xEdit reads it as a stride; the 12 vanilla files hold 16 to 256, all powers of two | Vanilla data |
.lod file size | Exactly 16 bytes, anything else rejected | The spec’s struct is the whole file; xEdit rejects any other size; every vanilla file is 16 bytes | Vanilla data |
| Tile orientation | Grid Y grows north, a DDS’s first row is its north edge | Stitched Tamriel is seamless and north-up | Vanilla data |
| X8R8G8B8 tiles | The fourth byte is padding, drawn opaque | Solstheim tiles have DDPF_RGB without DDPF_ALPHAPIXELS and a zero padding byte | Vanilla data |
_n.dds normal encoding | World space: red east, green up, blue north, each byte mapped to -1..1 | See below | Vanilla data |
Cells without LAND | Not part of the worldspace, cleared by --crop-to-playable | Vanilla tiles are black there (MarkarthWorld) | Vanilla data |
| Playable area | Overlap of the NAVM cell bounds and the non-persistent REFR/ACHR cell bounds, plus one cell | Either box alone keeps filler or scenery, see below | Design |
| Persistent references | Not counted toward a cell | Vanilla stores them in the worldspace’s persistent cell, a CELL with flag 0x400 and XCLC 0, 0 (Tamriel, MarkarthWorld, Blackreach, Sovngarde) | Vanilla data |
| Water surface | A cell with DATA “Has Water” has water at its XCLW, or at the WRLD DNAM default water height when XCLW is absent or means no water | The spec defines each field, not how they combine; the result draws Tamriel’s sea, rivers and lakes and Solstheim’s sea where they are in game | Vanilla data |
| Child worldspace cell coordinates | A child worldspace’s cells sit at the same grid coordinates as its WNAM parent’s, so --parent-lod draws them with the parent’s tiles (lod) or fills their holes with its LAND (raster-records) | The spec only says PNAM “Use LOD Data” inherits the parent’s LOD; in game, that LOD is what shows in the holes. ONAM places a child’s map markers on its parent’s map; the five vanilla worldspaces drawn with --parent-lod set it to scale 1 and offsets 0, and line up with their place on Tamriel’s map | Vanilla data |
| Water across cells | Each cell’s water is a flat plane at its own height | Matches the data; neighbouring cells with different XCLW show a straight edge (Blackreach) | Vanilla data |
LAND without VHGT | Flat at the worldspace’s DNAM default land height (its parent’s with “Use Land Data”); left out of the water when no DNAM applies | The spec doesn’t say how such a cell is drawn. In 12 of the 14 vanilla worldspaces with one, and in the Vominheim mod (945 of 2096 cells), every neighbouring vertex sits at that height | Vanilla data, two exceptions below |
Two vanilla worldspaces don’t fit the LAND without VHGT rule. MarkarthWorld’s cell (-46, -2) has
neighbours near 11000 and a default of -27000: drawn flat, it is a deep pit under the sea’s water
height, outside the playable crop. FallowstoneCaveWorldStart’s cells (-1, -3) and (-2, -3) have
neighbours at 2000 and a default of 100, above their water at 0, so they show no water either way.
Rounding each cell down to a multiple of the level only matches worldspaces whose origin is itself a multiple of 32 (Tamriel, Solstheim), and finds none of Blackreach’s tiles.
No published source documents the terrain LOD normal maps. The flat areas of the vanilla tiles (sea, cells
without LAND) are (128, 255, 128), so green is up. Two checks on the level-32 tiles of Tamriel and Solstheim fix
the other axes:
- A slope field has no curl only with the right axes. Reading red as east and blue as north (or both negated) gives the lowest total curl; swapping the channels or negating one of them gives 1.6 to 2.6 times more.
- Integrating the slopes of Solstheim from the sea inward gives land above sea level with red east and blue north, and below it with both negated. That holds along rows and along columns.
No field marks the playable part of a worldspace. WRLD MNAM only exists on Tamriel and
Solstheim, and NAM0/NAM9 span every LAND cell. Two signals were compared on the 12 vanilla
worldspaces with LOD:
- The bounds of the cells with a navmesh match the walkable area of Tamriel (
-48..52,-34..45against-57..61,-43..46forLAND) and Solstheim. Sovngarde has single-cell columns of navmesh across its filler terrain, which stretch the bounds over it. - The bounds of the cells with placed references match Sovngarde’s valley (
0..30,0..31), but include Tamriel’s border mountains and a few isolated cells (Blackreach-18).
Their overlap keeps the valley of Sovngarde and the walkable area of Tamriel. A worldspace built
mostly from objects comes out small: MarkarthWorld’s navmeshes cover 2x3 of its 140 LAND cells.
Tests: TerrainLodGridTests, WorldspaceCellsTests, LodSettingsReaderTests, TerrainLodSettingsLoaderTests,
LodRasterTests, DdsDecoderTests, TerrainLodNormalsTests,
MapCropTests, TerrainLodTileSourceTests, WorldspaceTerrainTests, WaterLayerTests,
LodTileTests, MapProjectionTests, WorldspaceLodSourceTests, MapPlannerTests.
LAND texture layers
Reference: UESP LAND,
UESP LTEX,
UESP TXST. The Skyrim LAND page lists
VTXT as “a variable length list of 8 byte records” without a layout; the
Oblivion LAND page gives one. Layout
in Plugin file format.
| Question | Code | Why | Basis |
|---|---|---|---|
VTXT layout | uint16 position, 2 unknown bytes, float32 opacity | The Oblivion page’s layout; the Skyrim page gives the same 8-byte size | Vanilla data: every position is 0 to 288 and every opacity 0 to 1 |
VTXT position | Row by row from the quadrant’s south-west point, 17 points per row | Stated by the Oblivion page | Vanilla data: textures line up with the rivers the water layer draws from VHGT |
| Quadrant points on the cell grid | A quadrant’s 17x17 points are vertices of the 33x33 VHGT grid; neighbouring quadrants share their middle row or column | 17 + 16 = 33: the only way two quadrants fill the cell’s vertices | Vanilla data: blended this way, two cells agree on their shared edge 10 times better than with the grid transposed, flipped or its quadrants swapped (Tamriel, and the Vominheim mod) |
| Shared vertex | Each layer is blended in layer order over every quadrant; the base texture of the later quadrant wins on a shared row or column | The pages don’t say which quadrant owns it | Design |
VCLR grid | Rows south to north, columns west to east, like VHGT | The Skyrim page says only “the same as Oblivion”; the Oblivion page gives no order | Vanilla data: on Tamriel, neighbouring cells agree on their shared edge colors (mean difference 0.05 per vertex out of 765), against 35 to 71 with the grid flipped or transposed |
TX00 path | Relative to textures\ | The TXST page gives no root; vanilla paths start with Landscape\ | Vanilla data: 90 of 91 LTEX color maps found this way, the last has no TNAM |
| Default texture | textures\landscape\dirt02.dds | The BTXT row names only dirt02.dds | Vanilla data: the file exists there |
Quadrant without BTXT | The default texture, as for a zero LTEX | The page gives the default only for a zero formid | Design |
Several VTXT after one ATXT | Their points are appended to that layer | The pages describe one VTXT per ATXT | Design |
Tests: LandscapeReaderTests, WorldspaceLandscapesTests, LandscapeRasterizerTests,
LandscapePaletteTests.
LAND texture tiling
Reference: UESP LAND, UESP LTEX, UESP TXST. None of them says how often a landscape texture repeats: the scale is an engine setting, not a field.
| Question | Code | Why | Basis |
|---|---|---|---|
| Repeats per cell | 24, 12 per quadrant | fLandTextureTilingMult defaults to 3, applied as 3 / 4 per vertex step: 32 x 3 / 4 | Mudcrab PR 91, from a static inspection of SkyrimSE.exe |
| Origin | Repeats line up with cell edges, no mirroring | 24 is whole, so every cell starts a repeat | Same source |
| Orientation | The color map’s first row is the north edge of a repeat | Not stated | Design: the pattern is too small on a map to tell |
An .ini that changes fLandTextureTilingMult changes the game, not the map.
Tests: LandscapeRasterizerTests.
Landscape normal maps
Reference: UESP TXST. TX01 is a
“normal map (tangent- or model-space)” and DNAM 0x04 marks a model-space one. The page doesn’t say
how a tangent-space map lies on the ground.
| Question | Code | Why | Basis |
|---|---|---|---|
| Tangent frame on a landscape texture | Red along the color map’s columns, east; green down its rows, south (the DirectX convention) | A tangent-space normal map is the gradient of a surface: read in the right frame, its curl is close to 0 | Article: Beyond Skyrim, Baking, “Skyrim uses DirectX”. Vanilla data: on 10 textures\landscape\*_n.dds, the curl read this way is 1.2 to 4.9 times smaller than with green toward the north, on every one |
| Up component | Blue, or rebuilt from red and green where that is higher | DXT5 compression leaves vectors off unit length: red and green alone would lay a tilted texel flat. A BC5 map stores no blue | Vanilla data: the 50 textures\landscape\*_n.dds are DXT5; on 4 of them, 0.1 to 3.5% of texels have red and green squared summing over 1, with blue still 0.24 to 0.48 up |
| Scale and placement | Those of the color map, see LAND texture tiling | One TXST maps both on the same coordinates | Design |
Model-space map (DNAM 0x04) | Not read | Its normals are in the model’s frame, not the texture’s | Vanilla data: none of the 90 landscape TXST with a TX01 sets it |
Tests: LandscapeBackgroundTests, LandscapeTextureReaderTests.
Object normal maps
References: nif.xml BSShaderTextureSet names slot 1 ‘Normal/Gloss’ and BSVertexDataSSE stores a
tangent and a bitangent per vertex, without saying how a texel lies along them. Community Shaders’
Lighting.hlsl builds the frame its pixel shader multiplies the texel by from the bitangent (its
first row), the tangent, then the normal.
| Question | Code | Why | Basis |
|---|---|---|---|
| Tangent frame of a texel | Red along the vertex bitangent, green along the tangent, blue along the normal, each axis blended over the face and brought to unit length first | The shader does so: its frame’s rows are the bitangent read from the position’s W, the normal’s and the tangent’s fourth bytes, then the tangent, then the normal | Tooling: Community Shaders Lighting.hlsl. Vanilla data: on every shape of Tamriel’s placed models with a normal map, weighted by area and placements, the bitangent runs along +u and the tangent along +v (down the texture’s rows); the green therefore runs down the rows, the DirectX convention of Landscape normal maps. The curl test there, on the 200 most placed object normal maps, is lower read so on 190 of them (median ratio 1.45); the others are atlases whose islands are turned or mirrored, which the vertex frame follows |
| Texel to direction | 2 b / 255 - 1 on red, green and blue, then the sum brought to unit length | The shader reads the texel as 0 to 1 and computes 2 c - 1, without rebuilding blue | Tooling: Community Shaders Lighting.hlsl TransformNormal |
| Strength | Half the texel’s tilt, a style choice of Map shading | The shader takes the whole tilt, under its own light | Design |
Model-space map (Model_Space_Normals) | Not laid, see not implemented | Its normals are in the model’s frame, not the vertices’ | Vanilla data: none of the 8,981 shapes with a normal map placed on Tamriel sets it |
Tests: NifSceneReaderTests.LightingShader_GivesSlotOneAsItsNormalMap,
ObjectRasterizerTests.NormalMapTexel_TiltsTheSurface, ObjectsLayerTests.NormalMapInTheArchives_BendsTheTexturedSquare.
Emissive shapes
References: nif.xml gives Emissive Color, Emissive Multiple and slot 2 of the texture set, not what the
engine does with them. Community Shaders’s Lighting.hlsl gives the pixel shader. Nothing
here was compared with a capture in game.
| Reference | Code | Why | Basis |
|---|---|---|---|
diffuseColor += emitColor, then diffuseColor times the base color, then the vertex colors | The emission is a term on the pixel’s color, added once the map’s light is applied (FaceShader.Emitted) | The map’s light is no sum of lights: a term added after it reads the same | Lighting.hlsl |
emitColor takes the glow map on the Glowmap technique alone | Slot 2 weighs the emission on shader type 2 (Glow) only | Vanilla Default shapes, candles and plants, hold a texture in slot 2 and still emit whole: on Tamriel, the Glow type and the Glow_Map flag go together on every shape | Lighting.hlsl, vanilla scan |
Without Linear Lighting, LinearToSrgb(SrgbToLinear(emit) × SrgbToLinear(glow)) | A plain product emit × glow of the bytes | A power law is multiplicative: both agree but for sRGB’s linear toe, on near-black texels | Lighting.hlsl |
Own_Emit (flag 1 bit 22) “provides its own emittance color” | Not read | Set on every placed lighting shape of Tamriel: it tells nothing apart | Vanilla scan |
A Glow shape without a slot 2 | Emits nothing | What the engine binds there isn’t known; one placed reference of Tamriel, and lighting it whole risks a bright shape | Design |
| A glow map missing from the archives | Emits nothing, logged | As above | Design |
Tests: EmissiveLayerTests, NifSceneReaderTests.LightingShader_GivesItsEmission.
Projected materials
References: UESP STAT and
MATO give the fields, not what the engine does
with them. xEdit gives their layout by form version. Community Shaders’s Lighting.hlsl
gives the pixel shader. How a record’s fields reach the shader’s constants comes from third-party plugins that
hook the engine, cited below. Nothing here was compared with a capture in game.
The pixel’s weight and how much of the material it shows:
threshold = cos(Max Angle) + (1 - cos(Max Angle)) × (Falloff Bias + Falloff Scale × noise)
weight = dot(normal, up) × vertex alpha - threshold
mix = smoothstep(0, 1, 5 × (0.1 + weight))
| Question | Code | Why | Basis |
|---|---|---|---|
MATO DATA size | 28, 32, 48 or 52 bytes tell the fields present; under 28 is dropped | UESP lists 48 bytes and “a small number of 32/28”. xEdit adds Is Snow, form 43 in SSE | Vanilla data: 28, 32, 48 and 52 occur; xEdit |
STAT DNAM size | 8 or 12 bytes, Considered Snow read from the ninth | UESP gives 8 bytes, xEdit adds Considered Snow and 3 unused in SSE | Vanilla data: 11 914 of 8 bytes, 384 of 12 |
Which MATO the map draws | Those with Single Pass set | The other path builds a second geometry from the record’s DNAM properties | Tooling: XPMF MaterialMatcher.hpp |
| Which records take one | STAT only | The engine applies it from the static’s data when it clones its model | Tooling: XPMF, CommonLibSSE TESObjectSTAT |
| Field to constant | (1 - cos) × Falloff Scale scales the noise, (1 - cos) × Falloff Bias + cos is the threshold, 1 / Noise UV Scale tiles the noise, the color is Single Pass Color | The shader names only ProjectedUVParams; PapyrusExtender and Seasons of Skyrim write (scale, bias, 1 / noise, cos(angle)), XPMF describes what the engine makes of it | Tooling: Lighting.hlsl, PapyrusExtenderSSE ApplyMaterialShader, XPMF |
| Direction | Straight up in the world. Projection Vector isn’t read | The single pass path doesn’t read it (XPMF). Read as a direction, 13 459 of Tamriel’s rocks, at (0, 0, -1), would hold their snow underneath, beside SnowMaterialMountain1P at (0, 0, 1) | Tooling: XPMF. Vanilla data, as a check |
| The record’s model | Not read: four textures under textures\effects\ | The engine loads them from fixed paths; ShaderTests\ShaderBox.nif, the model of most MATO, isn’t in the archives | Tooling: XPMF, strings of SkyrimSE.exe. Vanilla data: the four are in Skyrim - Textures5.bsa |
| Vertex alpha | The vertex color’s alpha, whatever Vertex_Alpha says | The shader reads the vertex’s color. Of 2 667 shapes on Tamriel’s single pass models, 566 set the flag and 433 paint an alpha under 250 | Tooling: Lighting.hlsl. Vanilla data, for how often it matters |
| A blended shape’s vertex alpha | Vertex_Alpha only, as its opacity reads it | One value per vertex carries both | Design |
| Color | ProjectedDiffuse × Single Pass Color, toned as a texture | The shader multiplies them. Toned, SnowMaterialObject1P gives (140, 147, 155), LSnow01 of the ground (134, 142, 151) | Tooling: Lighting.hlsl. Vanilla data, for the match |
| Texture coordinates | World east and north over the tile, a plane seen from above | Community Shaders samples three planes by the normal; vanilla computes them from TextureProj, not documented. Seen straight down, a plane never stretches | Design |
| Tiling | Noise Noise UV Scale units per tile, diffuse and normal 5 times that, detail normal 1.25 times | fProjectedUVDiffuseNormalTilingScale 0.2 and fProjectedUVNormalDetailTilingScale 0.8 of a generated SkyrimPrefs.ini; the Creation Kit’s are 0.5 and 1.2 | Vanilla data, for the INI |
| Normal | Normal and detail normal combined as the shader does, in a frame built on the unbent vertex normal, then blended by mix, at half tilt | The shader blends in the shape’s tangent space, so a slope stays a slope. A noise has no direction a frame’s turn could show. The strength is the object normal maps’ style | Tooling: Lighting.hlsl |
| Mip level | From the map’s scale | The noise tiles finer than a pixel at a low scale, where its mean is what shows | Design |
Considered Snow, Is Snow | Read, not used | Neither enters the color or the weight of a map’s pixel | Tooling: Lighting.hlsl |
Tests: ProjectedMaterialTests, DirectionalMaterialReaderTests, ModeledObjectReaderTests,
DirectionalMaterialsTests, ObjectsLayerTests.ProjectedMaterials_CoverTheStatic.
Grass density and slope
Reference: UESP GRAS,
UESP LTEX. The GRAS page gives DATA
Density, Min Slope and Max Slope as uint8 without a unit or a range; the LTEX page says only “Possible
Grass” for GNAM.
| Question | Code | Why | Basis |
|---|---|---|---|
| Density | A percentage, 0 to 100 | No vanilla value goes past 100 | Vanilla data: the 31 GRAS after Update.esm range from 10 to 90. Unverified as a scale: if the engine reads it otherwise, the map’s coverage is off by that factor |
| Min Slope and Max Slope | Degrees from horizontal, both inclusive | A slope in degrees fits a uint8 | Vanilla data: Min Slope is 0 on every GRAS, Max Slope 10 to 90, most 33 to 50, which matches grass leaving cliffs. Unverified as a unit: if wrong, grass would show on cliffs or miss gentle slopes |
Several GNAM | Every one grows, in any order | The page doesn’t say whether GNAM repeats or in which order | Design |
The same GRAS in two GNAM | Counts once | A second entry adds no new grass | Design |
Tests: GrassReaderTests, GrassCoverTests.
Grass water distance
Reference: UESP GRAS. The page gives
DATA “Distance from water” as a uint16 and the modes that apply it, without a unit or a meaning for
each mode. The numbering of the modes is a deviation.
| Question | Code | Why | Basis |
|---|---|---|---|
| Distance from water | World units between the ground and its cell’s water height | The ground height and the water height are in world units | Vanilla data: kelp 274 units tall needs 390 under water, coral 155, underwater rocks 105. Unverified |
| Above, Below | The ground stands over, or under, the water height | The names | Design |
| At Least, At Most | The ground is that far from the water or farther, or that close or closer, both inclusive | The names | Design |
| Either - At Most Above, Either - At Most Below | Any ground on the other side of the water, or ground on that side at most that far | The names | Design |
A cell without water (XCLW absent or a no-water value, no worldspace DNAM) | All its ground is above the water, infinitely far | Nothing to stand under | Design |
| A mode past 7 | No water rule | No mode to apply | Design: no vanilla GRAS has one |
Water from placed objects (WATR references) | Not counted | The cell’s water height is the only one the background reads | Design: a grass may grow in a placed pond |
Tests: GrassCoverTests, GrassTuftsTests.
Navmesh triangle flags
Reference: UESP NVNM. The page calls the triangle’s third uint16 field “Cover marker?”, “usually 0x0008 or 0x0408”, and names none of its bits. Layout in Plugin file format.
| Question | Code | Why | Basis |
|---|---|---|---|
| Which bit marks a road or a trail | 0x0040, “Preferred” (NavmeshTriangleFlags.Preferred) | xEdit’s name for the bit | Tooling, and vanilla data: Tamriel’s 52,367 such triangles draw its road network, and the STAT road pieces fall on them |
An NVNM with a bad count or vertex index | The whole navmesh is dropped, with a warning | A partial read could draw triangles from shifted bytes | Design: no vanilla NAVM has one |
| What a vertex’s X, Y and Z are | World units, Z the height, in the frame of the worldspace or interior cell | The page names the three floats without a unit or frame | Vanilla data: the road triangles fall on the STAT road pieces placed in world units, and a cut 160 units above the navmesh heights shows the floors of Blackreach and of the vanilla interiors |
| Where an actor can walk | On every triangle of a NAVM, whatever its flags: the map levels take each one, with its heights, as walkable floor (WorldspaceMapReads.Navmeshes) | The navmesh is what the AI walks on; the spec names no flag that marks a triangle as not walkable | Design |
On a mod, the bit can cover only part of the roads: Vominheim marks 3,776 triangles. The roads layer also draws the road pieces, see export heuristics.
Tests: NavmeshReaderTests, WorldspacePathsTests, WorldspaceNavmeshesTests.
Reference header flags
Reference: UESP Mod File Format, record
flags, and UESP REFR. The format page
gives a REFR two “Hidden from local map” bits, 0x40 (“Needs Confirmation”) and 0x200, and
also calls 0x200 “MotionBlurCastsShadows”. The REFR page lists only 0x200.
| Question | Code | Why | Basis |
|---|---|---|---|
| Which bit hides a reference from the local map | 0x200 when the base is an ACTI, STAT or TREE, 0x40 when it is a DOOR, none for other bases (ReferenceFlags.IsHiddenFromLocalMap) | xEdit names a REFR’s flags by its base’s type: 0x200 is “Cast Shadows” on a LIGH, “Motion Blur” on an MSTT | Tooling, and vanilla data |
What the maps keep of a REFR’s flags | All of them, as read (Placement.HeaderFlags) | The base’s type is known only after the merge | Design |
On the five vanilla masters and two mods, 619 enabled exterior references carry 0x200: 534 STAT,
80 TREE, 1 ACTI, 3 LIGH and 1 MSTT. Most are cave ceiling rocks and ship beams and decks in
underground worldspaces (MossMotherCavernWorld, KatariahWorld), which would hide the floor seen from
above. Of the 39 that carry 0x40, 3 are doors; the others are bases where xEdit gives the bit no
meaning.
Tests: ReferenceFlagsTests, WorldspaceMapQueryPathsAndPlacementsTests.
Reference footprint
Reference: UESP REFR (DATA: position,
then rotation in radians; XSCL: “setScale”) and
UESP OBND. The pages don’t say
how the rotation applies to the bounds or the model.
| Question | Code | Why | Basis |
|---|---|---|---|
| Direction of the Z rotation | Clockwise seen from above (PlacementRotation.TurnZ) | The pages give no direction | Vanilla data: the road pieces’ boxes fall on the preferred navmesh triangles of Tamriel |
X and Y rotations of a model (--objects) | Clockwise seen from the positive end of their axis, like Z; Z turns the point first, then Y, then X (RotationConvention.Default) | The pages give no direction nor order | Vanilla data: the convention that lays the road pieces on the terrain, see below |
X and Y rotations of a box (--roads) | Ignored: the box is drawn flat, turned by Z only | Road pieces lie almost flat, a small tilt barely moves their footprint | Design |
XSCL absent | Scale 1 | The page gives no default | Vanilla data: road pieces without XSCL fall on the preferred triangles at scale 1 |
OBND origin | The reference’s position, before scaling | The bounds are in the object’s own space | Vanilla data: same check as the rotation |
If the Z direction were wrong, turned road pieces would cross the navmesh roads at an angle instead of following them.
Road pieces follow the slope they are laid on: of the 5,500 on Tamriel, 4,910 have an X or Y
rotation. Each vertex of their models was moved into the world under each candidate convention and
compared with the LAND height under it, bilinear between the vertices:
| Convention | Median distance to the terrain |
|---|---|
| Clockwise X and Y, Z first (kept) | 12.6 units |
| The six other directions and orders | 25.6 to 48.1 units |
| X and Y ignored | 28.6 units |
| Rz·Ry·Rx, counterclockwise | 34.6 units |
Tests: PlacementRotationTests, RoadsLayerTests, ReferenceReaderTests, ModeledObjectReaderTests.
Light radius
Reference: UESP REFR gives XRDS as a
float, “~1.25. Controls the radii on objects like lights”;
UESP LIGH gives DATA Radius as a
uint32. The page doesn’t say how XRDS combines with the base’s radius.
| Question | Code | Why | Basis |
|---|---|---|---|
What a light’s XRDS holds | An offset added to its LIGH radius (LightsLayer) | The “~1.25” reads as a scale, but the vanilla values don’t fit one: negative values are common, and none brings the radius to 0 or below once added | Vanilla data: 1,489 of the 1,680 lights placed in worldspaces carry one, from -665 to 6,919 (one outlier at 456,444, see data problems); 298 are negative; radius plus XRDS is never 0 or less. Unverified as semantics: if it scaled the radius, the map’s glows would be far larger than the game’s lights |
A radius plus XRDS of 0 or less | No glow | A light with no reach lights nothing | Design: no vanilla light has one |
Tests: ReferenceReaderTests, LightsLayerTests.
Armor ground model
Reference: UESP ARMO. The page lists
MODL twice: once as a model, near the top, and once as the FormID of an ARMA armature, repeated.
MOD2 is the male model and MOD4 the female one.
| Question | Code | Why | Basis |
|---|---|---|---|
Which MODL an ARMO holds | Every MODL of an ARMO is an ARMA FormID, never read as a path | Read as a path, the FormID gives 3 bytes of noise | Vanilla data: the 137 ARMO bases placed in a worldspace have only 4-byte MODL |
The model of an ARMO placed in the world | MOD2, else MOD4 (ModeledObjectReader) | A placed armor lies on the ground with its male model | Vanilla data: all 137 have a MOD2 found in the archives |
If the armature MODL were ever a path, a placed armor would be missing from --objects, and its
MOD2 would show instead.
Tests: ModeledObjectReaderTests.
NIF and Havok shapes
Reference: niftools’ nif.xml. Layout in
NIF / Havok format.
| Question | Code | Why | Basis |
|---|---|---|---|
Which column of bhkConvexTransformShape’s matrix holds the translation | The last column | No source states it | Unverified |
hkPackedNiTriStripsData vertices “may not be standard half-precision” | IEEE 754 half floats | What other tooling uses | Tooling |
bhkCompressedMeshShapeData chunk vertex composition order | Chunk translation, then the chunk transform | Most chunks use an identity transform | Unverified |
| Havok scale and Euler order | 69.9915 and Rz·Ry·Rx | Tooling conventions, not derived here | Tooling |
NiAVObject rotation: nif.xml calls Matrix33 column-major but doesn’t say how a point is multiplied | The nine floats read as rows, applied to column vectors | Visual meshes then line up with their collision, see below | Vanilla data |
BSVertexDesc offset unit, which nif.xml doesn’t state | 4 bytes, like the vertex size | Every UV offset is then 16 bytes, right after the position and its fourth float; the color offsets read gray to white colors on rocks and blue-green ones on waterfall bodies | Vanilla data |
| Editor-only geometry, which nif.xml doesn’t mark | A node or BSTriShape named EditorMarker is left out with its subtree | The name is a convention of the Creation Kit and NIF tooling | Tooling |
NiAVObject Flags bits, which nif.xml doesn’t define for BS version 100: only NiBillboardNode’s description names bit 0 “hidden” | Bit 0 hides the block and its subtree | Every vanilla shape that sets it is a helper the game doesn’t show: particle emitter meshes, forge markers, spare weapon parts | Vanilla data: 4,444 placed shapes on vanilla worldspaces |
The order of BSLightingShaderProperty UV Scale and UV Offset, which nif.xml doesn’t state | uv × UV Scale + UV Offset | NifSkope’s Skyrim shaders do the same | Tooling |
The direction of v in a HalfTexCoord | v = 0 is the texture’s first row, v grows down the rows | Direct3D’s convention, which the game renders with | Design |
| How a skinned vertex is posed, which nif.xml doesn’t state | The sum of its weighted bones, each bone’s skin transform then its node’s transform to the model’s space; the overall skin transform and the shape’s own transform left out | NifSkope poses a BS version 100 shape so. Bones not saved in their bind pose give a different shape than the raw positions: the OBND of TreePineForest04 matches the raw positions, 1,100 units of its trunk under the ground, and the posed trunk stands on it | Tooling, NifSceneReaderTests.SkinnedShape_TakesItsGeometryFromItsPartitionPosedByItsBones |
The order of NiSkinData rotations, which nif.xml calls Matrix33 like NiAVObject’s | Read as NiAVObject’s | With it, 766 of the 916 skinned models outside armor and clothes pose as their raw positions; transposed, every vertex of TreePineForest04, TreeAspen01 and TreeAspen02 moves, by up to 1,400 to 2,900 units | Vanilla data |
| Whose bones a vertex’s Bone Indices point at, which nif.xml doesn’t state | The skin instance’s bones | In the vanilla trees, every weighted influence of a partition, through its own bone list, names the same instance bone as the vertex data: 85,733 influences | Vanilla data |
Which triangles of a SkinPartition to read | Triangles Copy, the SSE field, which indexes the shared vertex data | Triangles holds the same values in all 6,585 partitions of the vanilla skinned models | Vanilla data |
| A skinned vertex whose weights add up to 0 | Placed by the shape’s own transform | Blended by no bone it would fall to the origin | Design, NifSceneReaderTests.SkinnedVertexWithoutWeight_KeepsTheShapePlacement |
How a normbyte maps to -1 to 1: nif.xml says only “[0, 255] to [-1, 1]” | byte × 2 / 255 − 1, linear | Community Shaders’ Lighting.hlsl vertex shader computes -1 + 2 × value from the bytes read as 0 to 1. Decoded so, vertex normals lie a median 0.3° to 4° from their faces’ | Tooling and vanilla data: rocks, trees, Windhelm, Riften and imperial dungeons, NifSceneReaderTests.Shape_ReadsNormalsTangentsAndBitangents |
| How a skinned vertex’s normal is posed, which nif.xml doesn’t state | Each weighted bone’s rotation, blended by the weights, back to unit length; the shape’s own rotation for a vertex without weight | As its position; the scale of a bone doesn’t turn a direction. Posed so, the normals of the vanilla trees lie a median 3.4° from their posed faces | Vanilla data, NifSceneReaderTests.SkinnedShape_TurnsItsNormalsByItsBones |
Which child of a NiSwitchNode to draw: nif.xml says one “active child” is drawn, and the game can change it at run time | The child at its stored Index; none when Index is past its children | A map shows the state the model is saved in, without knowing what each child means. Harvestable plants store their unharvested state at index 0 | Vanilla data: the 80 meshes\plants\ models with a switch node all have two children and index 0, covered by NifSceneReaderTests.SwitchNode_DrawsOnlyItsActiveChild |
| The opacity a blended shape outputs, which nif.xml describes only as the lighting shader’s Alpha being “the material opacity” | Texel alpha × vertex alpha (with Vertex_Alpha) × material Alpha, clamped to 0 to 1 | An Alpha above 1 then keeps a face opaque longer as its vertex alpha falls, as nif.xml says | Unverified: if wrong, Markarth’s waterfall bodies (Alpha 0.9, vertex alpha about 120) show the rock under them more or less than in game, ObjectRasterizerTests.Draw_BlendedShape_MixesWithWhatLiesUnder |
The blend equation, which nif.xml names only by its AlphaFunction factors | color × source factor + pixel × destination factor, clamped to 0 to 1 after each face; the destination alpha counts as 1 | The Direct3D blend the game renders with; the map is opaque | Design, ObjectRasterizerTests.Draw_BlendedShape_MixesWithWhatLiesUnder |
An AlphaFunction value past 10, which nif.xml doesn’t define | Counts as ONE | No vanilla shape uses one: they use 6/7, 6/0 and 1/2 | Vanilla data |
| The order the game draws blended shapes in | Over each pixel, from the lowest face up; at one height, in the order of the references, then of the triangles | The game sorts them back to front from the camera, here straight above | Design, ObjectRasterizerTests.Draw_BlendedShapes_MixFromTheLowestUp |
| How an effect shader computes its color and alpha, which nif.xml doesn’t state | As NifSkope’s sk_effectshader.frag: texture × vertex colors × base color × scale, or a palette lookup; alpha × falloff × base alpha squared | The only renderer of these fields at hand | Tooling, ObjectRasterizerTests.Draw_EffectShape_* |
| Equal falloff start and stop angles, where GLSL’s smoothstep is undefined | A step: the stop opacity below the angle, the start opacity from it | NifSkope notes the case without settling it | Design |
| Whether the map’s light shades an effect shape | Not shaded | NifSkope’s effect shader reads no light; the effects glow or show their own colors | Tooling, ObjectRasterizerTests.Draw_EffectShape_IsNotShadedByTheMapLight |
| The texture coordinate a palette lookup reads | The texture’s green as the DDS stores it, the map’s tone left out | The tone would move it along the palette | Design, ObjectsLayerTests.Texture_EffectLooksItsColorUpInItsPaletteByTheUntonedGreen |
If wrong, the footprints HavokShapeReader returns are off:
- Shapes behind a
bhkConvexTransformShapelook offset: try the last row. - Rotated compressed mesh chunks look displaced: apply the transform before the translation.
The NiAVObject convention was checked on every NIF of the Anniversary Edition archives and two
mods. For the 241 models with an identity root, a rotated node or shape below it and a root
collision, the bounding box of the visual mesh was compared with the collision’s under both
readings. 148 fit better as read, 21 transposed (animated and effect meshes, whose collision
doesn’t follow the visual mesh), 72 tie. With the wrong reading, rotated parts of a model would turn
the wrong way on the map.
hkPackedNiTriStripsData is almost absent from vanilla interiors, so the half-float reading has
little effect either way. Shapes the code doesn’t read are in
Not implemented.
Tests: HavokShapeReaderTests, NifReaderTests, NifBlockReaderTests, NifSceneReaderTests,
ObjectRasterizerTests.
Face winding
Reference: nif.xml, StencilDrawMode: DRAW_CCW draws “only
the triangles whose vertices are ordered CCW with respect to the viewer”, the standard behavior. The
NIF pages say nothing of the winding of a shape without an NiStencilProperty, the case of every
Skyrim shape with a BSLightingShaderProperty.
| Question | Code | Why | Basis |
|---|---|---|---|
| Which side of a face is its front | The side its vertices wind counterclockwise from; seen from above, a face whose vertices wind counterclockwise faces up (ObjectHeightSampler) | The standard draw mode culls the other side | Tooling, and vanilla data: Blackreach, DLC1DarkfallPassageWorld, LabyrinthianWorld03 and BlindCliffCaveWorld cut every cell, SolitudeWorld and MarkarthWorld none, see map levels. The other winding would cut the roofs and leave the caves |
A shape flagged Double_Sided | Counted by its winding, like the others | The flag isn’t read, see map levels | Design: a double-sided vault ceiling counts as a roof, so its cell isn’t cut |
Tests: ObjectHeightSamplerTests, VaultMapTests.
Effect shader soft falloff
Reference: nif.xml names Soft_Effect (flag 1 bit 30) and
Soft Falloff Depth without describing them; NifSkope leaves the depth unused.
Community Shaders’ Effect.hlsl fades the opacity by
saturate(scene distance / k - face distance / k), with k a material constant.
| Question | Code | Why | Basis |
|---|---|---|---|
| The fade | Opacity × clamp(gap / Soft Falloff Depth, 0, 1) (EffectShading.Soft) | k read as the soft falloff depth | Article; k inferred from the field’s name |
| The gap, seen from above | Height above the highest opaque surface under the pixel, terrain or object | A vertical view’s distance is a height | Design |
| Water | Not counted: the gap reaches the ground under it | The shader doesn’t show it | Unverified: if wrong, effects over water are fainter in game |
| A shape without alpha blending | Not faded | Only blending reads the opacity | Design |
| A depth of 0 or less, or NaN | No fade | No vanilla shader has one | Design |
Most vanilla effects fade over 64 units or less; see also map objects for the depths a map leaves out.
Tests: NifSceneReaderTests.EffectShader_GivesItsSoftFalloffDepthWhenSoftEffectIsSet,
ObjectRasterizerTests.Draw_SoftEffectShape_FadesNearWhatLiesUnderIt.
Map markers
Reference: UESP REFR lists FULL
(lstring), FNAM (uint8 marker flags) and TNAM (uint16 marker type, an enum from 1) without the
subrecord that starts them.
| Question | Code | Why | Basis |
|---|---|---|---|
| What marks a reference as a map marker | XMRK, an empty subrecord; FNAM, FULL and TNAM count only after it | Every vanilla marker reads XMRK (0 bytes), FNAM (1), FULL (4), TNAM (2), and no other reference carries those three | Vanilla data: the 472 markers of the five masters |
TNAM 0, not in the enum | Kept, typeName left out | Vanilla gives it only to interior markers, on no worldspace map | Vanilla data: 35 markers of Skyrim.esm |
| The enum’s numbering | As listed, 1 is City | Riverwood is 2 (Town), the caves 4 (Cave), the cities their castle or capitol | Vanilla data |
Tests: ReferenceReaderTests, WorldspaceMarkersTests.
Child worldspace map offset
Reference: UESP WRLD gives ONAM
as float[4], World Map Scale (-1 hides the map markers) and Cell X, Y, Z offsets, “where map
markers will appear in relation to the parent”. It doesn’t say how they combine. See
Child worldspaces.
| Question | Code | Why | Basis |
|---|---|---|---|
| How scale and offset combine | child * scale + offset, in game units | AlftandWorld (scale 0.001, offset 79872, 77824) lands on Tamriel’s Alftand marker (78347, 77408); a KarthspireRedoubtWorld door plus its offset lands within 1,000 units of the Tamriel door it leads to. Dividing would throw Alftand off the map | Vanilla data |
| Negative scale | Hidden, like -1 | The spec names -1 only; Sovngarde is the only negative one | Design |
| Scale 0 | Every marker on the offset point | Follows the formula; DLC01SoulCairn is the only one | Design |
No ONAM | The child isn’t placed | xEdit marks ONAM required; every vanilla WRLD has one | Tooling |
| A grandchild | Each offset applied on the way up | Follows from the field’s meaning; vanilla has no grandchild: every parent is Tamriel or DLC2SolstheimWorld, neither of which has a parent | Design |
The formula fits the worldspaces built in place or moved as a block. Blackreach (scale 2.5) isn’t
built to scale: its three lifts to Tamriel are in a different order than their Tamriel doors, so
no scale and offset map one onto the other. FallowstoneCaveWorldEnd is built in Tamriel’s own
coordinates, yet its ONAM (scale 0.0001, offset 22528, -8192) gathers it near Whiterun, far from
Fallowstone Cave. The code follows ONAM in both cases. If the game shows Giant’s Grove near
Fallowstone Cave on its world map, ONAM isn’t what places a child’s markers there.
Tests: WorldspaceReaderTests, MapMarkerCatalogTests.
A worldspace’s CELL records
Reference: UESP WRLD puts a single
CELL directly in the World Children group, then the exterior cell blocks. UESP
Mod File Format, Form IDs, gives a FormId’s
owner by its master index. Neither says which plugins “make” a worldspace. The map’s plugin chain
lists every plugin carrying the worldspace’s WRLD or one of its CELL records.
| Question | Code | Why | Basis |
|---|---|---|---|
| Is the persistent cell one of the worldspace’s cells? | Yes, counted like a block cell | A mod placing a persistent reference in the worldspace carries only that cell | Design |
A plugin carries the same CELL twice | Counted once for that plugin | The chain counts cells, not records | Design |
| New or changed cell | New when the resolved FormId’s owner is the plugin itself, changed otherwise | Follows the FormId’s master index | Design |
A CELL or WRLD whose FormId doesn’t resolve | Left out of the chain | The worldspace datasets already drop and report it | Design |
Tests: WorldspaceCellsTests, WorldspaceMapQueryTests.
Texture paths
A texture path in a NIF texture set or in book markup is relative to the Data folder, under
textures\. Neither nif.xml nor UESP says how the engine reads a path that doesn’t fit.
| Question | Code | Why | Basis |
|---|---|---|---|
A path without the textures\ prefix | Read under textures\ | Book markup and some NIFs omit the prefix | Vanilla data |
A path holding a data\textures\ folder, such as skyrimhd\build\pc\data\textures\plants\thistle01.dds | Everything before textures\ is dropped | The front is the author’s build tree; the rest names an archive entry | Vanilla data: 45 of the 1,408 diffuse paths of placed models, all found once cut |
Tests: TextureColorsTests, MenuArtTextureConverterTests.
SWF DefineFont3
Reference: SWF19. Detail in SWF font parsing.
| Question | Code | Why | Basis |
|---|---|---|---|
DefineFont3 EM square | 20480 units, not DefineFont2’s 1024 | Ascent, descent and advances only fit 20480 | Vanilla data |
Glyph Y direction versus TrueType glyf | Flipped: SWF points down | A glyph’s path extent matches [-ascent, +descent] | Vanilla data |
FontBoundsTable | Ignored; bounds come from the contour points | Always [0,0]×[0,0] in real fonts | Vanilla data |
All three were checked on the vanilla interface SWFs.