You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Contains area 3D data, including:

  • Terrain geometry
  • Water geometry
  • Grass
  • Textures
  • If the file is a TRN file:
    • Walkmesh geometry, identical to terrain geometry
  • If the file is a baked TRX file:
    • Walkmesh geometry, modified by placeable walkmeshes and walkmesh cutters
    • Pathfinding pre-calculated data



File format

The TRN file format is quite similar to MDB format.

Header struct (12 bytes)

TypeNameDescription
char[4]file_typeAlways NWN2
uint16_tversion_major
uint16_tversion_minor
uint32_tpacket_countNumber of packets

PacketKeyTable struct (8 bytes)

TypeNameDescription
char[4]typePacket type name
uint32_toffsetByte offset of the packet from the beginning of the file

Packet struct (variable length)

TypeNameDescription
char[4]typePacket type name
uint32_tsizePacket data size in bytes
uint8_t[size]dataPacket data

Each packet contains different data depending on their type

Packet types

There are 3 types of packets:

  • TRWH: Terrain Width Height info
  • TRRN: Terrain geometry info
  • ASWM: Walkmesh geometry & pathfinding data
  • WATR: Water geometry info

Source: https://neverwintervault.org/project/nwn2/other/trn-fileformat



  • No labels