Phenotypes defined in phenotype.2da are an interesting way to define different model parts and animations for more complex models. There are some interesting things Bioware and DLA did for horses, and other ways to use them.

It also makes adding animations both a pain (finding where to do it) and easier (they're not spread out across a gazillion files).

Making a new phenotype can be relatively easy; but see Part-Based Models: Creatures for a overview of adding some bits and understanding naming. This is an additional reference.

Uses

Bioware's main uses were:

Others have used it for:

Limitations and pain points:

Some bugs EE has fixed:

Example of Phenotypes Loading Parts Based Models

Phenotypes rely on the parts based system, which itself is quite rigid in it's way. The example below will show what loads when you have a Female, Human of Normal Size phenotype, and a Female, Human of Normal Size Horse phenotype. They are wearing a cloak and a robe for this example (the specific model numbers do not really matter).

The reason for 2 examples is the phenotype.2da file can define a DefaultPhenoType which will load any models not fully defined from that phenotype instead.

The parts of models is mostly kinda defined in capart.2da and noted below for reference since heads, robes and cloaks are not.

NameModel Base NameModel Node NameRelated 2da FilesNaming ConventionNotes and DescriptionExample: Female, Human, Normal Size

Example: Female, Human, Normal Size Horse

Bolded if different to pfh0

Base Nodes and AnimationspXYZ.mdln/aphenotype.2da

pXYZ.mdl

  • X - m for male, f for female
  • Y - "RACE" ID in appearance.2da, eg: H for Human/Half-Elf
  • Z - Number line ID from phenotype.2da

This defines the placement of model parts (where the arms go for instance) and start the top level of animations specific to this model.

99% of the time this is purely the node locations, and a similarly named file is the animation file, which then links to other animation-only files, eg:

  • Normal: pfh0.mdl → a_fa.mdl (contains some specific animations) → a_ba.mdl (most generic animations) → a_ba_non_combat.mdl (non-combat animations)
  • Fat: pfh2.mdl → a_fa2.mdl (contains some specific animations) → a_ba2.mdl (most generic animations) → a_ba.mdl → a_ba_non_combat.mdl (these two same as above)

This means the Fat phenotype can have some better animations for certain ones, but anything generic can be left in a_ba.mdl and be found by it eventually in the hierarchy.

If you edit a_ba.mdl and add a new model animation, eg to the custom slots, you can tie that into all models using it. Mind you certain things like horses may go a bit weird when it's called with them being mounted and all.

pfh0.mdlpfh3.mdl
Non-Animation Models


pXYZ_basename000.mdl

  • basename = "Model base name" column
  • 000 = Part ID. 000 is invalid ("nothing") but 001 and upwards work



Headheadhead_gnonepXYZ_head000.mdl

These models are "just a model" - no animations - which if are base naked versions are overriden by armor versions (or helmets for the head) when equipped.

The point of these though is to be appropriately set to the right node in the base model, which then is referenced in the base model animations.

Head models are special in so far as there is no 2da file defining them. Chargen uses a break in models to stop the progression into NPC only heads.

pfh0_head001.mdlpfh0_head001.mdl
Foot, Rightfootrrfoot_gparts_foot.2dapXYZ_footr000.mdl


pfh0_footr001.mdlpfh0_footr001.mdl
Foot, Leftfootllfoot_gparts_foot.2dapXYZ_footl000.mdl
pfh0_footl001.mdlpfh0_footl001.mdl
Shin, Rightshinrrshin_gparts_shin.2dapXYZ_shinr000.mdl
pfh0_shinr001.mdlpfh0_shinr001.mdl
Shin, Leftshinllshin_gparts_shin.2dapXYZ_shinl000.mdl
pfh0_shinl001.mdlpfh0_shinl001.mdl
Leg, Leglegllthigh_gparts_leg.2dapXYZ_legl000.mdl
pfh0_legl001.mdlpfh0_legl001.mdl
Leg, Right

legr

rthigh_gparts_leg.2dapXYZ_legr000.mdl
pfh0_legr001.mdlpfh0_legr001.mdl
Pelvispelvispelvis_gparts_pevlis.2dapXYZ_pelvis000.mdl
pfh0_pelvis001.mdlpfh0_pelvis001.mdl
Chestchesttorso_gparts_chest.2dapXYZ_chest000.mdl
pfh0_chest001.mdlpfh0_chest001.mdl
Beltbeltbelt_gparts_belt.2dapXYZ_belt000.mdl
pfh0_belt001.mdlpfh0_belt001.mdl
Neckneckneck_gparts_necks.2dapXYZ_neck000.mdl
pfh0_neck001.mdlpfh0_neck001.mdl
Forearm, Rightforerrforearm_gparts_forearm.2dapXYZ_forer000.mdl
pfh0_forer001.mdlpfh0_forer001.mdl
Forearm, Leftforellforearm_gparts_forearm.2dapXYZ_forel000.mdl
pfh0_forel001.mdlpfh0_forel001.mdl
Bicep, Rightbiceprrbicep_gparts_bicep.2dapXYZ_bicepr000.mdl
pfh0_bicepr001.mdlpfh0_bicepr001.mdl
Bicep, Leftbicepllbicep_gparts_bicep.2dapXYZ_bicepl000.mdl
pfh0_bicepl001.mdlpfh0_bicepl001.mdl
Shoulder, Rightshorrshoulder_gparts_shoulder.2dapXYZ_shor000.mdl
pfh0_shor001.mdlpfh0_shor001.mdl
Shoulder, Leftshollshoulder_gparts_shoulder.2dapXYZ_shol000.mdl
pfh0_shol001.mdlpfh0_shol001.mdl
Hand, Righthandrrhand_gparts_hand.2dapXYZ_handr000.mdl
pfh0_handr001.mdlpfh0_handr001.mdl
Hand, Lefthandllhand_gparts_hand.2dapXYZ_handl000.mdl
pfh0_handl001.mdlpfh0_handl001.mdl
Roberoberootparts_robe.2dapXYZ_robe000.mdl

Robes can be defined manually again (instead of inherited from another phenotype) on horses so they are laid out correctly.

Robes can hide essentially all the body parts, although amusingly doesn't mention wings or tails unlike cloaks for some reason. The full list of what can be hidden is: HIDEFOOTR  HIDEFOOTL  HIDESHINR  HIDESHINL  HIDELEGR  HIDELEGL  HIDEPELVIS  HIDECHEST  HIDEBELT  HIDENECK  HIDEFORER  HIDEFOREL  HIDEBICEPR  HIDEBICEPL  HIDESHOR  HIDESHOL  HIDEHANDR  HIDEHANDL  HIDEHEAD

pfh0_robe003.mdlpfh3_robe003.mdl
Cloakcloakcloak_gcloakmodel.2da

Special; defined in cloakmodel.2da which model to load, but the names are styled still with an additional underscore:

pXYZ_cloak_000.mdl

Cloaks can be defined manually again (instead of inherited from another phenotype) on horses so they are animated correctly. In Bioware's case they just made them all empty so they don't show up! Nowadays you can just manually hide the objects using nwscript commands.

Cloaks also can hide the wings, tail, shoulders left and right as part of the cloakmodel.2da file.

Note: for horse compatibility it appears HIDETAIL is always set to 0 (else the horse would disappear when wearing certain cloaks). A pain but oh well! You could alter these columns to 1 if you don't run horses.

pfh0_cloak_001.mdlpfh3_cloak_001.mdl
Wingsn/awingswingmodel.2daArbitrary, eg; c_wingsdm.mdl is "Demon" wingsWings are (thankfully) just used as wings by Bioware.c_wingbat.mdlc_wingbat.mdl
Tailn/atailtailmodel.2daArbitrary, eg; c_horse1.mdl is "Horse, Walnut"

Tails are used to load, well tails. It can also load other simple single models (which become fully animated too!) - and their primary use in the example is for horses.

Other uses Bioware added were for scaling models up and down more easily without hundreds more appearance.2da lines.

c_tailbone.mdlYou'd set a horse model, eg c_horse1.mdl to override this (and set it back when dismounted)