NW > Layout File (FLYT)

A BFLYT file contains a layout, which defines a part the UI. This page describes version 2.2.0.0 of the file format.

All offsets are relative to the start of the section that they appear in.

OffsetSizeDescription
0x04Magic number (FLYT)
0x42BOM (Always 0xFEFF)
0x62Header size (always 0x14)
0x84Version number
0xC4Filesize
0x102Number of sections
0x122Padding

Sections

Every section is stored as follows:

OffsetSizeDescription
0x04Section identifier
0x44Section size, including this header
0x8Section data

The following sections may be found in a BFLYT file:

IdentifierDescription
lyt1Layout
cnt1Control data
usd1User data
txl1Texture list
fnl1Font list
mat1Material
grp1Group info
grs1Group start
gre1Group end
pan1Pane info
pas1Pane start
pae1Pane end
bnd1Bounding pane
pic1Picture pane
prt1Parts pane
txt1Textbox pane
wnd1Window pane

Layout

OffsetSizeDescription
0x08Section header
0x81Is drawn from middle
0x93Padding
0xC4Layout width (float)
0x104Layout height (float)
0x144Maximum parts height (float)
0x184Maximum parts width (float)
0x1CNull-terminated layout name

Resource List

OffsetSizeDescription
0x08Section header
0x82Number of filenames (N)
0xA4 * NOffsets to null-terminated filenames
Null-terminated filenames

Group

A grp1 section contains the following data:

OffsetSizeDescription
0x08Section header
0x824Null-terminated group name
0x202Number of children (N)
0x222Padding
0x2424 * NNames of children

The grs1 section and gre1 section are always empty. They mark the start and end of a group respectively. A grs1 section must always be preceded by a grp1 section.

Pane

The pan1, bnd1 and prt1 sections contain the following data. The pic1, txt1 and wnd1 sections also start with this data.

OffsetSizeDescription
0x08Section header
0x81Flags:
1 = is visible
2 = transmit alpha to children
0x91This is a bitfield:
0x03: origin X (0=center, 1=left, 2=right)
0x0C: origin Y (0=center, 1=top, 2=bottom)
0x30: origin of parent X (0=center, 1=left, 2=right)
0xC0: origin of parent Y (0=center, 1=top, 2=bottom)
0x0A1Alpha value
0x0B1Part scaling
0xC24Name of pane
0x248User data
0x2C4X position (float)
0x304Y position (float)
0x344Z position (float)
0x384X rotation (float)
0x3C4Y rotation (float)
0x404Z rotation (float)
0x444X scale (float)
0x484Y scale (float)
0x4C4Width (float)
0x504Height (float)

The pas1 section and pae1 section are always empty. They mark the start and end of the children of the pane respectively. A pas1 section must always be preceded by a pane section.

Picture

OffsetSizeDescription
0x084Pane info
0x54Material info

Textbox

OffsetSizeDescription
0x084Pane info
0x542Length
0x562Restrict length
0x582Index into material list
0x5A2Index into font list
0x5C1Origin
0x5D1Line alignment
0x5E1Active shadows
0x5F1Padding
0x604Italic tilt (float)
0x644Offset to string
0x684Top color
0x6C4Bottom color
0x704Font size X (float)
0x744Font size Y (float)
0x784Character size (float)
0x7C4Line size (float)
0x804Offset to textbox name
0x844Shadow offset X (float)
0x884Shadow offset Y (float)
0x8C4Shadow scale X (float)
0x904Shadow scale Y (float)
0x944Shadow color top (float)
0x984Shadow color bottom (float)
0x9C4Shadow italic tilt (float)
0xA0Unknown

Window

OffsetSizeDescription
0x084Pane info
0x544 * 4Rectangle (floats)
0x641Frame data count
0x651Flags
0x662Padding
0x684Offset to material info
0x6C4Unknown offset

Material Info

OffsetSizeDescription
0x04Top left color
0x44Top right color
0x84Bottom left color
0xC4Bottom right color
0x102Index into mat1 section
0x122Number of texture coordinate sets (N)
0x1432 * NTexture coordinate sets

Every texture coordinate set is stored as follows:

OffsetSizeDescription
0x08Top left
0x88Top right
0x108Bottom left
0x188Bottom right

Every corner is stored as follows:

OffsetSizeDescription
0x04X coordinate (float)
0x44Y coordinate (float)