NWN Custom Palette File Format

The custom palettes are resource files in GFF format, of type ITP. It may be helpful while reading this document to have Torlack's nwnexplorer program open on a module file with a few entries in a custom palette. Look under the category 'Blueprint Palettes'. You should also be familiar with Torlack's description of the GFF format (though he calls it ITP)

The root entry has one child element called MAIN, of LIST type.

The file represents a tree. There are three types of nodes in the tree: terminals, non-terminals, and entity descriptors. Non-terminals may not contain entity definitions, they may only contain a list of other non-terminal nodes. Terminals may only contain entity definitions, not other non-terminals nor terminals.

Non-terminal nodes contain two elements.

A terminal node has the same two child elements as a non-terminal node, with the addition of a UINT8 named ID. All terminal nodes have a unique ID. The entity blueprint resources refer back to their palette node with a property PaletteID also of type UINT8, containing that number.

However, for a terminal node, the LIST element contains only entity descriptors. The contents of an entity descriptor depend upon the type of palette. For all palettes, there is a STRING named NAME, and a RESREF named RESREF. Creatures have two more, CR and FACTION, but they are not relevant to us.