Skyrim Mod:Mod File Format/RACE
RACE records contain information on character and creature races.
There are a lot of fields here, many in repeating sets, and a lot of markers. Generally all sets of data are preceded by a gender-specifying marker, MNAM for male, FNAM for female. There are also markers indicating the presence of certain sets (or not).
General record structure (in order of appearance):
- General Data
- Male then female skeletal model separated by MNAM/FNAM
- General Data
- Repeating pairs of ATKD/ATKE (attack data)
- Male then female egt model separated by MNAM/FNAM, preceded by NAM1
- Male then female havok model separated by MNAM/FNAM, preceded by NAM3
- General Data
- 32x Body Part Strings - User defined Biped Object Names stord in each NAME Subrecord
- EQUP info
- Repeating pairs of PHTN/PHWT (facial expression data)
- Male then female head data separated by MNAM/FNAM (and NAM0) in the following order:
- Default headparts
- MPAI/MPAV - Morph and Morph Values
- Racial presets
- Hair colors
- Featuresets
- Repeating tint fieldsets (TINI/TINC/TINV/TIRS) optionally with 2nd set (TINT/TINP/TIND)
C | SubRecord | Name | Type/Size | Info |
---|---|---|---|---|
+ | EDID | editorId | zstring | Editor id |
- | FULL | full name | lstring | Full (in-game) name |
+ | DESC | description | lstring | Description shown in-game when selecting the player's race (or 0) |
- | SPCT | spellCount | uint32 | number of SPLO records that follow. If the race has no bonus spells, SPCT and SPLO are not present. |
* | SPLO | spell | formID | Racial SPEL or SHOU |
- | WNAM | skin | formid | ARMO record |
+ | BODT | body template | struct | 12-byte struct (same as ARMO)
|
- | KSIZ | KSIZ | uint32 | keyword count |
- | KWDA | KWDA | formID | KYWD array of KSIZ |
+ | DATA | General race stats | struct | 128-byte struct (v40) or 164-byte struct (v43)
v43 of the record increases the size to 164 bytes. The additional 36 bytes may be an array of floats. |
+ | MNAM | male marker | 0-length | marker for male model info |
+ | ANAM | skeletal model | zstring | path to .nif |
+ | MODT | model data | MODT | |
+ | FNAM | female marker | 0-length | marker for female model info |
- | ANAM | skeletal model | zstring | path to .nif (These two fields are missing for some races such as AlduinRace or SprigganSwarmRace) |
- | MODT | model data | MODT | unknown |
+ | NAM2 | marker | 0-length | marker (Note that the NAM2 field has been removed and no longer exists) |
* | MTNM | movement type name | char[4] | 4-letter code for movement types (WALK, RUN1, SNEK, BLD0, SWIM) |
+ | VTCK | default voice types | formid[2] | VTYP male/female |
- | DNAM | Decapitate armor | formid[2] | ARMO male/female |
- | HCLF | default hair color | formid[2] | CLFM male/female |
- | TINL | Tint Index Number | uint16 | This is the total number of Tints available to this race |
+ | PNAM | FaceGen | float | FaceGen - Main clamp |
+ | UNAM | FaceGen | float | FaceGen - Face clamp |
* | ATKR | Attack Race | formid | found in one record in Dawnguard |
* | ATKD | Attack Data | struct | 44-byte struct, providing data for one mode of attack
|
* | ATKE | attack event | zstring | event name but does not translate to AACT or SMEN/ENAM ex "attackStart_Attack2" |
+ | NAM1 | marker | 0-length | marker for start of egt models |
+ | MNAM | marker | 0-length | start of male model |
+ | FNAM | marker | 0-length | start of female model |
+ | INDX | marker | uint32 | always 0, precedes both .egt models |
- | MODL | lighting model | zstring | path to .egt, seems to always use UpperBodyHumanMale(1st)/Female(2nd) regardless of race (Dragonborn.esm has records without MODL fields) |
- | MODT | model texture data | ubyte[12] | always 0x02 11-0x00 (Dragonborn.esm has records without MODT fields) |
+ | GNAM | body part data | formid | BPTD, only after 2nd model |
+ | NAM2 | marker | 0-length | marker (Note that the NAM2 field has been removed and no longer exists) |
+ | NAM3 | marker | 0-length | marker for start of hkx models |
+ | MNAM | marker | 0-length | start of male model |
+ | MODL | physics model | zstring | path to .hkx, points to same for both |
+ | MODT | model texture data | ubyte[12] | always 0x02 11-0x00 |
+ | FNAM | marker | 0-length | start of female model |
+ | MODL | physics model | zstring | path to .hkx, points to same for both |
+ | MODT | model texture data | ubyte[12] | always 0x02 11-0x00 |
- | NAM4 | material type | formid | MATT "only 1 record without" |
- | NAM5 | impact data set | formid | Unarmed IPDS |
- | NAM7 | decapitation fx | formid | Blood FX ARTO (only if can be decapitated) |
- | ONAM | open loot sound | formid | Sound SNDR |
- | LNAM | close loot sound | formid | Sound SNDR |
* | NAME | Biped Object Names | zstring | repeats exactly 32 times. these are body part names as seen in BPTD, for most/humanoids:
Probably vestigial - it doesn't appear to matter if these are filled in, Witchlight have no body parts here but have BPTD parts, WerewolfBeastRace has BODY but BPTD refers to "Torso" and so on. 8/8/2012 NOTE: These Values are user defined by clicking in the "Biped Object Names" column and giving it a name. You could clik 43 and call it Cape to assign that location for capes on Humanoids after also selecting it under First Person. These values are saved in the Plugin. |
* | MTYP | Movement Override | formid | Default Movement Override |
* | SPED | Override Values | struct | Float x 11
|
- | VNAM | Equipment Type Flags | uint32 | Equipment Flags, Other values are set but not used. If all are flagged then 4 0xFF
|
* | QNAM | Equip slot | formid | EQUP |
+ | UNES | Unarmed equip slot | formid | EQUP |
* | PHTN | Phoneme Target Names | zstring | These are listed when used in PHWT. Dragons for example, have different names than humanoids. Can be listed in .tri files as well. |
* | PHWT | facial expression weight | struct | Usually in .tri files, 16xfloat presumably for 16 points on the face
|
+ | WKMV | Walk | formid | A MOVT |
+ | RNMV | Run | formid | A MOVT |
+ | SWMV | Swim | formid | A MOVT |
+ | FLMV | Fly | formid | A MOVT |
+ | SNMV | Sneak | formid | A MOVT |
+ | SPMV | Sprint | formid | A MOVT |
- | NAM0 | marker | 0-length | marker for start of head data |
- | MNAM | marker | 0-length | start of male default/preset data |
- | INDX | index(ascending) | uint32 | index (in this list) |
- | HEAD | default headpart | uint32 | Default headpart HDPT |
- | MPAI | index(ascending) | uint32 | Available Morph Index, Appears 4 times. |
- | MPAV | values | struct | Available Morph Index Flags, Appears after each MAPI. These are selected from the "Face Data" tab in the CK
|
* | RPRM | Race Presets Male | formid | Racial preset NPC_ |
* | AHCM | Available Hair Colors Male | formid | Hair color CLFM |
* | FTSM | Face Details Texture Set List Male | formid | Feature set TXST |
- | DFTM | Default Face Texture Male | formid | Head Feature set TXST |
+ | TINI | tint index | short | ascending record index |
- | TINT | tint mask | zstring | Path to .dds |
- | TINP | Mask Type | uint16 | lookup. There is no TINP entry if set to none.
|
- | TIND | Preset Default | formid | CLFM Preset Default. There is no TIND if a default isn't selected in the CK. |
+ | TINC | Preset | formid | The Preset followed by TINV |
+ | TINV | Default Value | float | Default Value of the preceding TINC |
+ | TIRS | unknown | uint16 | This is the number of the Tint. The total number of Tints is stored in TINL. |
- | NAM0 | marker | 0-length | marker for start of head data |
- | FNAM | marker | 0-length | start of female head data |
- | Repeat from NAM0/MNAM For Female
|
|||
+ | NAM8 | Morph race | formid | RACE record |
+ | RNAM | Armor race | formid | RACE record |
Raw Data Examples[edit]
Custom Races[edit]
It is common for modders to create custom races, either something fanciful for the player character (e.g. playable Dremora), or more often a near-identical variant of a vanilla race for a new follower (used to ensure the follower can have entirely custom meshes and textures).
Three important race records for such a situation are:
- ATKR (Attack Race)
- NAM8 (Morph Race)
- RNAM (Armor Race)
Various problems can be avoided by setting these to a vanilla race, such as Nord for a custom variant of Nord.
The ATKR record will use the specified race as the one that controls default combat behavior. While a custom set of combat data can be made for a race with new abilities, exactly which records and subrecords need to be created to obviate the need for an ATKR subrecord is not entirely clear or well-documented. A safer bet in most cases is to just pick one that's "close enough". Are players really going to notice that your Moonlight Elves fight like Bosmer? Do they even notice the difference between default Bosmer and Altmer combat approaches?
NAM8 being empty will cause errors in the Construction Kit if your new race does not have custom .TRI mesh-morphing files for body weight adjustments. Every race added to the game either needs a set of these or needs a NAM8 indicating which other race's morph files to use. If the race is just a copy of a vanilla one, setting NAM8 to that vanilla race is a safe "fire and forget" solution. If it's something outlandish like a playable Goblin race, custom .TRI files will actually need to be generated with mesh tools and added to the FormID Lists mentioned in the CK errors, so that something like weight 35 or weight 50 can be generated properly from the *_0.nif and *_1.nif meshes. If the race is unplayable and only for one or a few NPCs at fixed 0 or 100 weights, such that middling weights are never needed, then setting NAM8 to any vanilla race will have no effect on the game but will stop pop-up errors in the CK.
The RNAM record being set to a vanilla race obviates any need to change armor, weapon, and other records to account for the new race. This is perhaps the most common oversight in race modding. It is not actually practical to do anything else but set the RNAM to a vanilla race with the same general body/head shape and gear-using capabilities, because there are thousands of armor and clothing mods and you won't be able to add your custom race to all of them, item by item. Even doing it for vanilla gear only would be incredibly tedious and ultimately pointless. This sort of thing is one reason that custom playable new races for Skyrim are markedly less common for than for Oblivion and Morrowind, which had fewer complications of this sort. It's simply not immediately obvious to a new modder what to do to make a new race work properly, especially once third-party gear mods are involved. Fortunately, the RNAM is another situation where "close enough" should work. Most of the vanilla humanoid races are equivalent when it comes to equippability of most gear types. Some exceptions are that various Elven races have specific heads meshes and equip variant headgear meshes (if your new race has a head based on Altmer, don't pick Nord as the RNAM); beast races do as well, and cannot even equip all headgear types at all due to their snouts; and vampire race variants (since Update.esm) will no longer equip crossbows, the weapon specialized for hunting them.
The gist of the above applies to creatures as well. If you design a rideable giant Nix Hound as a mount, it will need: 1) either an ATKR of a comparably semi-fearsome quadruped, or comprehensive custom combat-related records and stats; 2) either custom .TRI files and FormID List entries for them, or fixed 0 and 100 weights only, with a dummy NAM8, perhaps for Horse or Sabre Cat; and 3) an RNAM set to the Horse race specifically if you want it to be compatible with saddles and with barding (horse armor) mods, and do not want it capable of equipping humanoid gear (your Thoroughbred Nix probably shouldn't be trying to using a sword). You may need to do mesh and skeleton adjustment work to make sure your hound-mount's body will actually fit such gear properly (which may not be as hard as it sounds; the basic skeletal armature of the in-game horse is the same as that of a dog and wolf).