phenotype.2da contains a list of phenotypes for (complex) models.

Background

A phenotype is...a crazy piece of Bioware tech to allow you to be "fat" and "normal" in the default game (a phenotype is only valid for the default 7 PC races (Dwarf, Human, Half Elf, Half Orc, Elf, Gnome and Halfling - other models don't use phenotypes), which morphed into allowing mounts (horses) in later patches, which utilised the DefauiltPhenoType column so you don't duplicate too much (although it only inherits trimesh models. Not skinmesh alas!).

These phenotypes need duplicates of all the models - thus is why likely Bioware never bothered with "thin". Crazy amounts of work to add a new one so no one would! (all custom content with new armor, for instance, would need to then create yet another type).

NwN Armoury can alleviate some of the issues resizing things for phenotypes; https://neverwintervault.org/project/nwn1/other/tool/nwnarmory-12-source-code

You can alter a creatures phenotype in the toolset (eg; to be "Fat") or use script commands; SetPhenoType and GetPhenoType.

Players in EE can select more than just fat and normal with the ruleset.2da value CHARGEN_ENABLED_PHENOTYPES. This allows duplicate phenotypes but with different heads, for instance.

Inheritance of MDL and PLT and DefaultPhenoType

This isn't the best place for it but information here relates to NWN:EE and how it deals with DefaultPhenoType

MDL and PLT files can be inherited from the DefaultPhenoType or fallback to the human PLT. In Diamond it only defaults back to the human.

Note the toolset doesn't necessarily do all this, so ALWAYS TEST IN GAME!

Let's assume a chest part. You have this setup:

Phenotype ID 123
Female
Half-Orc
Chest model 400

Phenotype line is parented back to Phenotype 2 for being completes sake, but you'll see this won't matter for the PLT if the main model is found. It will matter if a fallback model is used.

This gives us a MDL file with this:

pfo123_chest400.mdl

If not found it will try:

pfo2_chest400.mdl

MTR just is for normals etc. so can be ignored (or removed).

The PLT file will load in order:

  1. pfo123_chest400.plt (if this model doesn't exist and it loaded pfo2_chest400.mdl it'll load pfo2_chest400.plt first)
  2. pfo0_chest400.plt (it goes to phenotype 0 - this is hardcoded - but still retains race/gender)
  3. pfh0_chest400.plt (old default, same gender but human race phenotype 0)
  4. pmh0_chest400.plt (old default, if not human male already do human male)

Line Limits

There are three potential limits to be aware of;

  • The ruleset.2da value CHARGEN_ENABLED_PHENOTYPES which allows phenotypes 0 through 30 to be usable at character creation
  • The phenotype limit the engine uses. This is unknown and needs testing and may be as low as 255. The creature file format suggests an INT size but this may be bogus.
  • File length limits - the number of characters for the phenotype files is limited to 16; eg phm12345_chest001.mdl is the maximum file name size, meaning 0 through 99999 is one potential limit.

2da Columns

ColumnExample ContentsValid ValuesDescription and Notes
LabelNormalTextThe label of the phenotype
Name2223TLK ReferenceThe name of the phenotype, used in the toolset.
DefaultPhenoType0phenotype.2da line

Most will be 0 (the default "Normal" size of creature). The others use 2.

This provides a fallback model to use so you don't have to duplicate things (eg; armor, heads) for new phenotypes (so a "Normal" sized creature can get their "Normal" sized head model loaded).

Note: skinmesh models like Robes are not affected by this and need to be created for every valid phenotype!

Default Contents

phenotype.2da
2DA V2.0

    Label       Name        DefaultPhenoType
0   Normal      2223        0
1   Skinny      ****        0
2   Large       2225        0
3   Normal_M    111015      0
4   ****        ****        0
5   Large_M     111016      2
6   N_Joust_M   111017      0
7   ****        ****        0
8   L_Joust_M   111018      2
  • No labels

1 Comment

  1. The information about "Line Limits" being set to 0-20 is wrong. There are numerous projects that use lines beyond 20 and models in those slots work fine. For example, Project Q utilizes phenotypes 21, 30-33, 39-43, 46, 54-58, 65-71, and 80-86, while Sanctum of the Archmage series of modules utilize lines 45 and 47-53. I believe that the actual line limit for the 2DA is 255 (0-254), although I have not personally tried line numbers with three digits (e.g., pmh101, etc.).