NWNWiki
NWNWiki
3,719
pages
This article covers the layout of the file; for the default contents, see portraits.2da (contents).

The portraits.2da file is the .2da file that provides Neverwinter Nights with information about the various portraits in the game, for both creatures and placeables. This information is used to sort the portraits in the Toolset and during character creation. The only portraits available in the Toolset are those defined in this file, but additional portraits may be available at character creation if the portrait .tga files have been placed in a player's portraits directory. (The additional portraits from the portraits directory are unsorted and displayed after the portraits listed in this file.)

As an optimization, the game will often store an index into this file (taking up 2 bytes of space) rather than the name of the portrait itself (which would take up 16 bytes of space). Consequentially, this file has an effective limit of 65,536 rows.

Columns of portraits.2da
Name Description
ID (no actual name) Row numbers for the benefit of human readers. The game engine ignores the value in this field, instead generating sequential row numbers as the file is read. It is good practice to keep the entries in this field sequentially numbered to avoid confusion.
BaseResRef The name of the files containing the images for this portrait, without the leading "po_" and without the trailing size indicator ("h", "l", "m", "s", or "t") and extension (.tga).
Sex For portraits of creatures, this is an index into gender.2da, indicating the gender depicted in the portrait. If this portrait is to be available at character creation, this column must match the gender of the character being created (0 for male, 1 for female).
Race For portraits of creatures, this is an index into racialtypes.2da, indicating the race depicted in the portrait. During character creation, portraits are grouped by race, with the portraits for the character's race displayed first.
InanimateType For portraits of objects, this is an index into placeabletypes.2da, indicating the type of object depicted.
Plot If set to "1" (one), this portrait will be suppressed during character creation (used by BioWare to suppress the portraits of major characters in the official campaigns). For creature portraits that should not be suppressed, this should be "0" (zero).
LowGore An alternate image used when the "Violence Level" (one of the game options) is set to "Low". This allows the substitution of a less gory portrait. The format is the same as the BaseResRef column.