Skyrim Mod:Mod File Format/NVNM Field

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

NVNM fields contain navmesh geometry data.

Name Type/Size Info
Unknown uint32 Seems to always be 12 or 0x0000000C. I suspect it's a copy of NVER.
Location Marker? uint32 Appears before location info.
World Space formid Formid of the world space. If World Space = 0x0000003C then the following uint32 contains grid info, otherwise it contains a cell formid. Is null(0x0000000) for interior cells.
Cell/Grid formid or sint16 & sint16 These four bytes are the UInt32 Formid of the cell if the World Space above is null(0x0000), Otherwise this is a pair of two signed shorts representing grid coordinates of the exterior cell. Note that grid coordinates are in reverse order (first one is Y and second one is X).
Vertices struct Vertex[num] List of vertices in the navmesh. It contains the length of the list followed by repeating sequence of three floats that correspond to the 3d position of each vertex.
Num_Vertices (nvert) int32 This is a number of vertices in the navmesh.
X: float32 This is a repeating structure (occurs num_Vertices times) of X,Y and Z coordinates that make up the vertices in the navmesh. The values are the game coordinates of the vertices (same coordinate system as placed objects. A vertex at 0,0,0 will overlap with an object placed at 0,0,0 in the Creation Kit)
Y: float32
Z: float32
Triangles struct Triangle[num] List of Triangles in the navmesh.

rowspan=8|struct Triangle: This is a repeating structure (occurs Num_Tris times) of 3 vertex indices, 3 edge neighbour indices, a cover marker and cover flags. The edges are either -1 if they don't border another triangle, or they hold the index of the triangle they do border. The cover marker seems to be an indicator of where the cover flags begin and usually contains 0x0008 or 0x0408.

Flags Info
0000 No cover
0001 Open edge with no cover
0010 Wall with no cover
0011 Ledge cover
0100 64(units)
0101 80(units)
0110 96(units)
0111 112(units)
1000 128(units)
1001 144(units)
1010 160(units)
1011 176(units)
1100 192(units)
1101 208(units)
1110 224(units)
1111 Max cover(255 units)

The cover flags are contained in a uint16 size of data. Only 2 edges of a triangle are allowed to have cover.

size of uint16
Unknown edge 1 Unknown edge 0
1111 00 1111 00 1111
Num_Tris int32 This is the number of triangles in the list.
Vertex 0 int16 Index of first vertex from the above Vertices list.
Vertex 1 int16 Index of second vertex from the above Vertices list.
Vertex 2 int16 Index of third vertex from the above Vertices list.
Edge 0 int16 Index within this list of the triangle that neighbors the first edge (vertex 0 to vertex 1)
Edge 1 uint16 Index within this list of the triangle that neighbors the second edge (vertex 1 to vertex 2)
Edge 2 uint16 Index within this list of the triangle that neighbors the third edge (vertex 2 to vertex 1)
Cover marker? uint16
Cover flags uint16
External Connections struct Connection[num] This is a list of triangles that border other navmeshes
Unknown uint32 struct Connection: This struct is made up of an unknown int32, Navmesh formid and triangle index. The triangle index identifies the triangle that connects to the external navmesh, indicated by the navmesh formid.
Navmesh formid
Triangle int16
Door triangles struct Door triangle[num] This is a list of triangles at the door threshold.
Number int32 Number of Triangles in the list
Triangle int16 Index of a triangle from triangles list above.
Unknown uint32 Appears to be a marker for door REFR formids.
Door REFR formid Form-ID of the linked DOOR reference.
Cover triangles int16[num] This is a list of triangles that have cover.
Cover triangle int16 Index of triangle that has cover.
Divisor? uint32 This appears to be a divisor to determine distance. The formula is ABS(( MaxX - MinX ) / Divisor ) = Max X Distance.

(It may not necessarily be the maximum distance, but the formula fits the result).

Max X Distance float32 This is result for X from the formula above.
Max Y Distance float32 This is result for Y from the formula above.
Min X float32 Min X of the navmesh.
Min Y float32 Min Y of the navmesh.
Min Z float32 Min Z of the navmesh.
Max X float32 Max X of the navmesh.
Max Y float32 Max Y of the navmesh.
Max Z float32 Max Z of the navmesh.
Triangles structure as follows: This is a repeating sequence of lists that occurs divisor^2 times. It appears to divide the navmesh into 2d segments.
Length uint32 The number of indexes in this segment.
Triangle index uint16 Index of triangle from the triangle list that belong to this segment.