NAVM Record – Navigation Mesh

NAVM record type.

Classes:

NAVM(flags, id[, revision, version, ...])

Navigation Mesh.

class NAVM(flags, id, revision=0, version=15, unknown=b'\x00\x00', data=[])[source]

Bases: Record

Navigation Mesh.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

  • unknown (bytes) – Default b'\x00\x00'.

  • data (List[RecordType]) – Default [].

Classes:

DATA(cell, vertex_count, triangle_count, ...)

Data.

NVCA([iterable])

Unknown.

NVDP([iterable])

Doors.

NVER(*args, **kwargs)

Version.

NVGD([cstring])

NavMesh Grid.

NVTR([iterable])

Triangles.

NVVX([iterable])

Vertices.

NvdpDoor(reference, unknown, unused)

Individual element in NVDP.

NvtrTriangle(vertex1, vertex2, vertex3, ...)

Individual element in NVTR.

NvvxVertex(x, y, z)

Individual element in NVVX.

Attributes:

data

Subrecords of this record.

flags

Record flags

id

4-byte form ID

revision

Used for revision control by the Creation Kit, if enabled.

unknown

version

Form version

Methods:

parse_subrecords(raw_bytes)

Parse this record's subrecords.

class DATA(cell, vertex_count, triangle_count, external_connections_count, nvca_count, doors_count)[source]

Bases: StructRecord

Data.

Parameters
  • cell (bytes) – Form ID of a CELL record.

  • vertex_count (int)

  • triangle_count (int)

  • external_connections_count (int)

  • nvca_count (int)

  • doors_count (int)

Attributes:

cell

Form ID of a CELL record.

doors_count

external_connections_count

nvca_count

triangle_count

vertex_count

Methods:

get_field_names()

Returns a list of attributes on this class in the order they should be packed.

get_struct_and_size()

Returns the pack/unpack struct string and the corresponding size.

cell

Type:    bytes

Form ID of a CELL record.

doors_count

Type:    int

external_connections_count

Type:    int

static get_field_names()[source]

Returns a list of attributes on this class in the order they should be packed.

Return type

Tuple[str, …]

static get_struct_and_size()[source]

Returns the pack/unpack struct string and the corresponding size.

Return type

Tuple[str, int]

nvca_count

Type:    int

triangle_count

Type:    int

vertex_count

Type:    int

class NVCA(iterable=(), /)[source]

Bases: List[int], RecordType

Unknown.

Unknown, may be triangle IDs.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

Turn this subrecord back into raw bytes for an ESP file.

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

class NVDP(iterable=(), /)[source]

Bases: List[NvdpDoor], RecordType

Doors.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

Turn this subrecord back into raw bytes for an ESP file.

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

class NVER(*args, **kwargs)[source]

Bases: Uint32Record

Version.

class NVGD(cstring: Union[str, bytes] = b'')[source]

Bases: RawBytesRecord

NavMesh Grid.

class NVTR(iterable=(), /)[source]

Bases: List[NvtrTriangle], RecordType

Triangles.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

Turn this subrecord back into raw bytes for an ESP file.

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

class NVVX(iterable=(), /)[source]

Bases: List[NvvxVertex], RecordType

Vertices.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

Turn this subrecord back into raw bytes for an ESP file.

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

namedtuple NvdpDoor(reference, unknown, unused)[source]

Bases: NamedTuple

Individual element in NVDP.

Fields
  1.  reference (bytes) – Form ID of a REFR record.

  2.  unknown (int) – Alias for field number 1

  3.  unused (bytes) – Alias for field number 2

pack()[source]

Pack the NvdpDoor to bytes.

Return type

bytes

classmethod unpack(raw_bytes)[source]

Unpack bytes for the NvtrTriangle.

Parameters

raw_bytes (BytesIO)

Return type

Self

namedtuple NvtrTriangle(vertex1, vertex2, vertex3, edge_vertices_12, edge_vertices_23, edge_vertices_31, flags)[source]

Bases: NamedTuple

Individual element in NVTR.

Fields
  1.  vertex1 (int) – Alias for field number 0

  2.  vertex2 (int) – Alias for field number 1

  3.  vertex3 (int) – Alias for field number 2

  4.  edge_vertices_12 (int) – Alias for field number 3

  5.  edge_vertices_23 (int) – Alias for field number 4

  6.  edge_vertices_31 (int) – Alias for field number 5

  7.  flags (int) – Alias for field number 6

pack()[source]

Pack the NvtrTriangle to bytes.

Return type

bytes

classmethod unpack(raw_bytes)[source]

Unpack bytes for the NvtrTriangle.

Parameters

raw_bytes (BytesIO)

Return type

Self

namedtuple NvvxVertex(x, y, z)[source]

Bases: NamedTuple

Individual element in NVVX.

Fields
  1.  x (float) – Alias for field number 0

  2.  y (float) – Alias for field number 1

  3.  z (float) – Alias for field number 2

pack()[source]

Pack the NvvxVertex to bytes.

Return type

bytes

classmethod unpack(raw_bytes)[source]

Unpack bytes for the NvvxVertex.

Parameters

raw_bytes (BytesIO)

Return type

Self

data

Type:    List[RecordType]

flags

Type:    int

id

Type:    bytes

classmethod parse_subrecords(raw_bytes)[source]

Parse this record’s subrecords.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record’s subrecords

Return type

Iterator[RecordType]

revision

Type:    int

unknown

Type:    bytes

version

Type:    int