Deviations
The code does something other than what the reference states. Basis values are defined in Spec deviations.
WRLD NAM0 and NAM9 bounds
Reference: UESP WRLD.
| Reference | Code | Why | Basis |
|---|---|---|---|
NAM0/NAM9 are int32[2], “assumed from Oblivion” | Read as float32[2] | Tamriel gives (-233472, -176128) to (253952, 208896), whole cells | Vanilla data |
The spec itself flags the type as a guess carried over from Oblivion.
Tests: WorldspaceReaderTests.
CELL XCLW no water
Reference: UESP CELL.
| Reference | Code | Why | Basis |
|---|---|---|---|
XCLW 0x7F7FFFFF and 0x4F7FFFC9 mean no water, 0xCF000000 may | Those three, NaN, and any height of 1e9 or more in magnitude mean no water | Blackreach also stores 0x4F7FFFFC (4.29e9, cell 0, 1) and 0xFF7FFFFF (-float.MaxValue); read as heights, the first floods a whole cell | Vanilla data |
No vanilla terrain or water plane comes near 1e9 units, so the threshold only catches these markers.
Tests: CellReaderTests.
Grass water mode
Reference: UESP GRAS.
| Reference | Code | Why | Basis |
|---|---|---|---|
DATA “How water distance is applied” numbered 1 to 8, from “Above - At Least” to “Either - At Most Below” | The same list numbered 0 to 7 (GrassWaterMode) | Every dry-land vanilla GRAS stores 0 with a distance of 0, which only reads as “Above - At Least” (above the water). The kelp, coral and underwater rocks store 2 with 105 to 390 units: “Below - At Least” under 0 to 7, “Above - At Most” under 1 to 8 | Vanilla data, and xEdit’s wbDefinitionsTES5.pas, whose enum starts at 0 |
The reference gives no unit for “Distance from water”. The code reads it in world units, see assumptions.
Tests: GrassReaderTests, GrassCoverTests.
Rule of One merge
Reference: How Skyrim Loads Forms. Design in Load order and merging.
| Article | Code | Why | Basis |
|---|---|---|---|
| An override clears the whole form, then reloads it | Fields merge one by one: a missing field keeps the earlier value | No exemption list exists for the records read here; readers already tolerate partial records | Design |
| Papyrus data is cleared on every override | HasScript is latest-wins | Follows the article | Article |
The engine clears a form and reloads it from each override, so a field the override doesn’t carry
becomes empty unless Bethesda’s code exempts it. The code can’t reproduce those exemptions
without a list of them, so it keeps earlier values instead. The one field the article doesn’t
cover is in XTEL across overrides.
Keying a REFR by its own FormId, independent of its cell, is not a deviation: the article lists
CELL/REFR as independently overridden parent and child. LocationMerger.MergeRecords is the
one merge every command uses, interiors included.
Tests: LocationMergerRuleOfOneTests, BookMergerFieldOverwriteTests,
InteriorCellFinderRuleOfOneTests.
VMAD string encoding
Reference: UESP File Format Conventions, xEdit What’s New, 4.0.0.
| Reference | Code | Why | Basis |
|---|---|---|---|
| Every string is Windows-1252 | VMAD script names, property names and string values are UTF-8, invalid bytes become U+FFFD | The game expects UTF-8 there | Tooling |
xEdit states that VMAD strings are “always explicitly stored as UTF8” and that “any other
codepage would result in errors” in every supported game. It gives no override, so the code has no
fallback encoding either.
Tests: VmadReaderTests.