Skyrim Special Edition

File information

Last updated

Original upload

Created by

Herowynne

Uploaded by

Herowynne

Virus scan

Safe to use

About this mod

This is a modder's resource intended for NPC facegen export from Creation Kit. Applies KS Hairdos to vanilla NPCs during facegen export from Creation Kit.

Requirements
Permissions and credits
Changelogs
Donations
Overview

I built this mod in order to create another mod KSHair For All Vanilla NPCs, and I wanted to share this resource with the modding community.

This is a modder's resource intended for NPC facegen export from Creation Kit.

This mod applies KS Hairdos to vanilla NPCs during facegen export from Creation Kit.

Do not install this mod into your regular load order for gameplay.

This mod is only intended to be installed into a minimal load order just for NPC facegen export from Creation Kit.

You must install this mod and all its requirements into a minimal load order.


Credits

This mod was inspired by Vanilla NPCs SSE Ruhmastered and I am extremely grateful to Ruhadre for sharing knowledge with the modding community in this post.

However, if the facegens were made in the CK, then you are in luck as you can regenerate those.

First, you have to prepare your rig. Uninstall almost everything. You seriously want vanilla skyrim + EEO. NO other meshes or textures for anything affecting player or NPCs. Next, you install SUEMR, Eyes AO Fix, ENB Brow Fix, BVFE's player fangs, Double Sided Vertex Human Mouth Fix, and optionally Expressive Facial Animations if you plan on using it. (I recommend it. The teeth look sooo much better.)

Then you load up Creation Kit, select actors, sort by race....then go down and use shift+click to select each group of actors by their race. Ignore the ones with a blank for race. Just do the elven races and their vampire equivalents. Ignore children. Once you have a selection made, hit Ctrl+F4 to begin regenerating. Don't mess with CK while it does this. Even if CK appears to have crashed in the process, leave it alone...let it finish. Once it finishes, it'll magically uncrash itself allowing you to move on. After you are done, close CK. You should have freshly made elves with all the mesh improvements baked in, with all the other edits made by EEO applied. It's important to state that CK HATES makeup files that are too high resolution. You'll know you made a bad tint file when that NPC suddenly has red/purple forehead bug. EEO comes with tint files, so I am going to assume that it either comes with CK friendly makeup for Elves, or just changed how their makeup appears in the CK. To make EEO compatible with all it's patches at once...simple. Load up Vanilla Skyrim + EEO + any esps related to it's patches on your machine. Repeat what I stated above.

Made a mistake? No problem. Delete the facgens/tints you made and start again.


Requirements

Install the following mods into a minimal load order intended for use with Creation Kit.


After installing all the required mods, then install this mod.


Background

The goal of this mod is to apply KS Hairdos to NPCs instead of vanilla hairstyles during facegen export from Creation Kit, while maintaining compatibility with vanilla NPC records as defined in the base game and Bethesda DLC expansions.

NPC record compatibility is the primary goal of this mod. This facegen export rig produces NPC head meshes that are 100% compatible with the vanilla NPC records. No override NPC records are needed. The NPC head meshes produced by this rig are a drop-in replacement for the vanilla head meshes.

During the development of this mod, I learned the following information about NPC hairstyles, which you may find useful...

First, some definitions:
  • A hairstyle record is a head part HDPT record with field PNAM - Type = Hair
  • A hair extra part record is a head part HDPT record referenced by a hairstyle, with DATA - Flags - Is Extra Part = Is Extra Part
  • A hairstyle or hair extra part name is specified by field EDID - Editor ID, not field FULL - Name


An NPC record can specify a hairstyle, or an NPC record (like Tullius) can omit a hairstyle and use the NPC's Race record hairstyle instead.

To preserve compatibility with vanilla NPC records, the rig's override hairstyle record names must match vanilla names.

To preserve compatibility with vanilla NPC records, the rig's override hairstyle record names must appear in the head mesh as the corresponding node's Name String Index.

To preserve compatibility with vanilla NPC records, each of the rig's override hairstyle records must include all originally-defined hair extra part names, and they must match vanilla names.

All originally-defined hair extra part names must appear in each generated NPC head mesh as the corresponding node's Name String Index.

Additional hair extra parts are OK in the rig's override hairstyle record, and are OK in the generated NPC head mesh, and they don't cause dark head NPC.

However, any additional hair extra parts must be compatible with hats because additional extra parts are kept on the head when a hat is equipped. Only originally-defined hairstyle and hair extra parts are hidden when a hat is equipped.

The interaction between hats and hair extra parts severely limits the ability to add hair extra parts to the rig's override hairstyle records. I took care during the development of this mod to ensure compatibility with vanilla NPC records and to fit each KS Hairdos hairstyle correctly to the vanilla hairstyle it replaced.


Notes

1. Single-Mesh Vanilla Hairstyles

KS Hairdos hairstyles look nice because they use two overlapping meshes with the same shape and texture but different transparency attributes. Those two overlapping meshes are specified in the (1) hairstyle record and the (2) hair extra part record.

Most vanilla hairstyles have at least one hair extra part, which makes it straightforward to replace those vanilla hairstyles with a KS Hairdos hairstyle.

However, some vanilla hairstyles do not have a hair extra part, which makes it more complicated to replace those vanilla hairstyles with a KS Hairdos hairstyle.

I developed a technique to convert a two-mesh KS Hairdos hairstyle into a single-mesh hairstyle, for compatibility with vanilla hairstyles that lack a hair extra part:
  • First, I made a copy of the main hair mesh and used NifSkope to change the NiAlphaProperty Flags from 4845 to 4846.
  • Second, I changed the rig's hairstyle record to reference the modified copy of the main hair mesh.
  • Finally, I tested in game. If the scalp extra part clipped through the main hair mesh, then I removed the scalp hair extra part from the rig's hairstyle record.

The copied-and-modified main hair meshes are included with this mod. They are located on file paths that are separate from KS Hairdos file paths, to avoid any conflict with KS Hairdos.

The resulting single-mesh KS Hairdos hairstyles don't look quite as nice as the corresponding double-mesh KS Hairdos hairstyles, but they look much better than vanilla hairstyles. This issue affects just 9 of the 57 total female hairstyles and affects just 8 of the 87 total male hairstyles.

2. Hair Colors

This rig overrides several vanilla hair colors so they look more natural when used with KS Hairdos hairstyles.

The hair colors are embedded into the NPC head meshes as they are generated by Creation Kit, so the modified hair colors will be used for the NPCs regardless of how the hair colors are configured in your game.

3. Halldir's Cairn CTD

The ghost wizard bandit who spawns in Halldir's Cairn causes a CTD when using that NPC's facegen export head mesh generated by this rig. A similar problem was reported for the mod Vanilla NPCs SSE Ruhmastered.

That NPC's EditorID is dunHalldirs_LvlBanditGhostWizard, and his head mesh is located in file meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm/000B289E.NIF.

The vanilla game is missing that NPC's facegen export head mesh NIF and facetint texture DDS files. Apparently, Bethesda forgot to generate facegen for that particular NPC. The CTD occurs when the facegen export head mesh generated by this rig references the non-existent facetint texture DDS file.

That NPC's generated head mesh cannot be used in game due to the CTD, and must be excluded from packaging in the output BSA file that contains all the generated NPC head meshes.


Female Hairstyles

The following table shows which KS Hairdos hairstyle replaces each vanilla hairstyle, and lists some of the NPCs that use that hairstyle. Please note that the "used by" list of NPCs is a subset and is not a comprehensive list.

  • VanillaHairstyleName - KSHairdosHairstyle - used by...
  • DLC1HairFemaleSerana - FontanaDiTrevi - Serana
  • DLC1HairFemaleSeranaHuman - FontanaDiTrevi - Serana
  • DLC1HairFemaleValerica - Swan - Valerica
  • HairFemaleDarkElf01 - Kylie - vampires
  • HairFemaleDarkElf02 - Hanna - Nenya, Avrusa Sarethi, Tilisu Severin, vampires, Thalmor, bandits, Vigilants
  • HairFemaleDarkElf03 - DaBomb - Faralda, Taarie, Voldsea Giryon, vampires, Thalmor, bandits
  • HairFemaleDarkElf04 - DaBomb - Anuriel, Arivanya, Reldith, Brelyna, Dravynea
  • HairFemaleDarkElf05 - Blitz - Nimriel, Luaffyn, Dreyla Alor, Gabriella, Marise Aravel, Milore Ienth, vampires, Thalmor, bandits
  • HairFemaleDarkElf06 - Moonrise - Idesa Sadri, Thalmor, bandits
  • HairFemaleDarkElf07 - Slowly - Niluva Hlaalu, Galathil, Merilar Rendas, vampires, Thalmor, bandits
  • HairFemaleDarkElf08 - Sky224 - Ardwen, bandits
  • HairFemaleElder01 - Sky124 - Helgird, Ritual Master
  • HairFemaleElder02 - Sky241
  • HairFemaleElder03 - Guajira - (unused)
  • HairFemaleElder04 - SweetSlumber - Anise, Vigdis Salvius
  • HairFemaleElf01 - ThornBirds - Suvaris Atheron, Wylandriah, vampires, Thalmor, bandits
  • HairFemaleElf02 - Princess - vampires, Thalmor, bandits
  • HairFemaleElf03 - Pixie - Nivenor, Aphia Velothi, Varona Nelas, vampires, Thalmor, bandits
  • HairFemaleElf04 - Cliche - Irileth, Elynea Mothren, Thalmor, bandits
  • HairFemaleElf05 - Icefruit - Jenassa, Cindiri Arano, bandits
  • HairFemaleElf06 - Postcard - Niranye, Thalmor, bandits
  • HairFemaleElf07 - Lamb - Synda Llanith, Aranea Ienith, Brelas, bandits
  • HairFemaleElf08 - Lightyear - Karliah, Bralsa Drel, vampires, bandits
  • HairFemaleElf09 - LuckyStar - Endarie, Medresi Dran, vampires, Thalmor, bandits
  • HairFemaleElf10 - LilacFogChopped - Dinya Balu, Curwe, Beleval, Thalmor, bandits
  • HairFemaleImperial1 - Envy2 - Dawnguard
  • HairFemaleNord01 - Perry - Thaena, Evette San, Threki the Innocent, Bjartur, Greta, Olava the Feeble, Nocturnal, bandits, forsworn, afflicted, stormcloaks
  • HairFemaleNord02 - RosieCloud - Lydia, Ingun Black-Briar, Gerda, Olda, bandits, forsworn, stormcloaks
  • HairFemaleNord03 - Sky228 - Rikke, Gerdur, Astrid, Idgrod Ravencrone, vampires, bandits, Dawnguard
  • HairFemaleNord04 - Mollie - Fralia Gray-Mane, Constance Michel, Gemma Uriel, vampires, bandits
  • HairFemaleNord05 - Guajira - Grelka, Frea, Angi, Susanna the Wicked, Laila Law-Giver, Karita the pilgrim, Beitild, Lisbet, Argi, Adisla, Asta, Bodil, bandits, vampires
  • HairFemaleNord06 - AzureSky - Carlotta, Eydis, Faleen, Karita the bard
  • HairFemaleNord07 - Synthesis - Iona, Alfhild Battle-Born, Annekke Crag-Jumper, Lynly Star-Sung, Temba Wide-Arm
  • HairFemaleNord08 - FoamSummer - Ria, Illdi, Narri, Daighre, Colette Marence
  • HairFemaleNord09 - Daydream - Svana Far-Shield, Jala, Hillevi Cruel-Sea, Sorli the Builder, Nana Ildene
  • HairFemaleNord10 - Crescent - Arcadia, Njada, Elisif
  • HairFemaleNord11 - Sky245 - Hulda, Iddra, Hroki, Swanhvir, Adelaisa Vendicci
  • HairFemaleNord12 - Asity - Delphine, Lillith Maiden-Loom, Gisli, Alessandra
  • HairFemaleNord13 - Ominous - Pantea, Birna, Fastred, Morwen, Hjordis, Niyya
  • HairFemaleNord14 - Butterfly128 - Sigrid, Adrienne Avenicci, Ahlam, Olfina Gray-Mane, Haelga, Drifa, Illia, Senna, Idgrod the Younger
  • HairFemaleNord15 - Sky205 - Ysolda, Erdi, Lami, Fruki, Boti, Muiri, Aeri, Tekla
  • HairFemaleNord16 - Acid - Safia, Sabine Nytte
  • HairFemaleNord17 - SweetSlumber - Camilla, Bryling, Inge Six Fingers, Sosia, Voada, Mena, Tova Shatter-Shield
  • HairFemaleNord18 - Jackdaw - Aela, Lisette, Vivienne Onis, Edda, Silda the Unseen, Bothela, Hert
  • HairFemaleNord19 - Vivacity - Uthgerd, Maven Black-Briar, Vittoria Vici, Alva
  • HairFemaleNord20 - Sky116 - Sybille Stentor, Tilma the Haggard, Irgnir
  • HairFemaleNord21 - XOXO - Eriana
  • HairFemaleOrc01 - Wine - Shel, Sharamph
  • HairFemaleOrc02 - Wine - (unused)
  • HairFemaleOrc03 - OnlyYou - Lash gra-Dushnikh, Atub
  • HairFemaleOrc04 - OnlyYou - (unused)
  • HairFemaleOrc05 - Lovesick - Gharol
  • HairFemaleOrc06 - DiscoHeavenShort - Urog
  • HairFemaleOrc07 - Aviary - Murbul, Bagrak
  • HairFemaleOrc08 - Papaya - Bor
  • HairFemaleOrc09 - Sky293 - Ghorza gra-Bagol, Garakh, Bolar, Dulug, Mogdurz
  • HairFemaleOrc10 - Sky293 - (unused)
  • HairFemaleOrc11 - Envy - Shuftharz, Ghak
  • HairFemaleOrc12 - Envy
  • HairFemaleOrc13 - Cancia - Ugor, Gul
  • HairFemaleOrc14 - Sister - Borgakh, Urzoga gra-Shugurz, Arob
  • HairFemaleOrc15 - Sister - Yatul
  • HairFemaleOrc17 - Rollcake - (unused)
  • HairFemaleRedguard01 - Sky195 - Salonia Caelia
  • HairFemaleRedguard02 - Soundwave - Saadia, Umana, Oriella, Bujold
  • HairFemaleRedguard03 - Dreamgirl
  • HairFemaleRedguard04 - Labyrinth - Rayya


Male Hairstyles

The following table shows which KS Hairdos hairstyle replaces each vanilla hairstyle, and lists some of the NPCs that use that hairstyle. Please note that the "used by" list of NPCs is a subset and is not a comprehensive list.

  • VanillaHairstyleName - KSHairdosHairstyle - used by...
  • HairMaleDarkElf01 - Bloom - vampires
  • HairMaleDarkElf02 - Bacchus - Aringoth, Melaran, Maluril, Vanryth Gatharian, Sanyon, Othreloth, bandits, guards
  • HairMaleDarkElf03 - Eclipse - Dravin, Tythis, Anoriath, Ambarys, Athis, Wyndelius, Gwilin, Garan Marethi, Geldis Sadri, Revus Sarvani, bandits
  • HairMaleDarkElf04 - Leon - Valindor, Enthir, Drelas, Lleril, vampires, bandits
  • HairMaleDarkElf05 - Adnis - Teldryn Sero, Veren, Syndus, Linwe, bandits, guards
  • HairMaleDarkElf06 - RoughSketch - Drevis, Viarmo, Revyn, Ronthil, Galdrus, Vals, vampires, Thalmor, bandits
  • HairMaleDarkElf07 - Joshua - Indaren, Ungrien, Ondolemar, Orini, Neloth, Veleth, bandits
  • HairMaleDarkElf08 - Cloud - Orthorn, Malthyr, Arvel, Sarthis, Ravyn, vampires, Thalmor, bandits, guards
  • HairMaleDarkElf09 - Bittersweet - Faendal, Belyn, Aval, Fethis, Rulindil, vampires, bandits
  • HairMaleDremora01 - Benjamin - dremora, summoned dremora
  • HairMaleElder1 - Jasper - Esbern, Lemkil, Wilhelm, Angrenor, Varnius, bandits, forsworn, afflicted, soldiers, Dawnguard
  • HairMaleElder2 - Cupcake - Kjar, Thonar, Torbjorn, Horik, bandits, forsworn
  • HairMaleElder3 - Laplace - Heimskr, Proventus, Sabjorn, Arniel, Sergius, Beirand, Thongvor, Dengeir, Rorik, bandits, forsworn, Vigilants, guards
  • HairMaleElder4 - Industrial - Phinis, Caius, Septimus, bandits, Dawnguard
  • HairMaleElder5 - Zod - Noster, Bersi, Degaine, bandits, forsworn, Vigilants, guards
  • HairMaleElder6 - Adonis - Sinmir, Skjor, Giraud, vampires, bandits, forsworn, soldiers
  • HairMaleElf01 - Macho - Slitter, bandits
  • HairMaleElf02 - TheTruth - Elrindir. vampires, bandits
  • HairMaleElf03 - Faux - vampires, bandits, guards
  • HairMaleElf04 - Djinn - bandits
  • HairMaleElf05 - Fallout - bandits, guards
  • HairMaleElf06 - Benjamin - Vingalmo, guards
  • HairMaleElf07 - Haunting2 - bandits, guards
  • HairMaleElf08 - Heartquake - Erandur, vampires, bandits
  • HairMaleElf09 - RoughSketch - Nelacar, bandits
  • HairMaleImperial1 - Laplace - Tullius, Falk, Lod, Roggvir, bandits, afflicted, soldiers, guards
  • HairMaleNord01 - RedRobin - Skulvar, Farkas, Brynjolf, Vipir, Morven, vampires, bandits, forsworn, afflicted, Vigilants
  • HairMaleNord02 - Unchained - Ralof, Bolgeir, Jorn, Valdr, Gunmar, bandits, forsworn, soldiers
  • HairMaleNord03 - Camisado - Sven, Jarl Balgruuf, vampires, bandits
  • HairMaleNord04 - Divide - Tolfdir, Balimund, Vignar, vampires, bandits, afflicted
  • HairMaleNord05 - Blowback - Acolyte Jenssen, Calder, vampires, bandits, forsworn, guards
  • HairMaleNord06 - Passion - Ulfric, Erik, Kodlak, Orgnar, vampires, bandits
  • HairMaleNord07 - ChainReaction - Hadvar, Alvor, Vilkas, Bjorlam, Mikael, Galmar,Mercer, DBInitiate, vampires, forsworn
  • HairMaleNord08 - Soledad - Gorm, Thorald, forsworn, Dawnguard, soldiers
  • HairMaleNord09 - OpenUp - Addvar, bandits, forsworn
  • HairMaleNord10 - UltraLover - Cosnach, bandits
  • HairMaleNord11 - OneMinute - Dirge, bandits, forsworn
  • HairMaleNord12 - Electric - Hod, Jon, Severio, Maul, vampires, bandits
  • HairMaleNord13 - Knighthood - Idolaf, bandits
  • HairMaleNord14 - Zero - Embry, Imskar, bandits, forsworn
  • HairMaleNord15 - NiceGuy - Aerin, Vekel, Jorleif, bandits, forsworn
  • HairMaleNord16 - Fade - bandits
  • HairMaleNord17 - Higher - bandits, forsworn, Dawnguard
  • HairMaleNord18 - Haunting - Bassianus, Eorlund, Arnbjorn, Arngeir, vampires, bandits, forsworn, Dawnguard
  • HairMaleNord19 - Zac - Belrand, Louis Letrush, Kleppr, bandits, forsworn, afflicted
  • HairMaleNord20 - NightWind - Fihada, Tuthul, Odvan, vampires, bandits, forsworn
  • HairMaleOrc01 - Reach - Durak
  • HairMaleOrc02 - Reach - Dawnguard
  • HairMaleOrc03 - Reach - Moth gro-Bagul, hunters
  • HairMaleOrc04 - Reach
  • HairMaleOrc05 - Reach - (unused)
  • HairMaleOrc06 - Reach - Larak, Olur, bandits
  • HairMaleOrc07 - Reach - (unused)
  • HairMaleOrc08 - Obscura - Urag gro-Shub, Ogol, Mahk
  • HairMaleOrc09 - Obscura - Grogmar, Mogrul, hunters
  • HairMaleOrc10 - Obscura - (unused)
  • HairMaleOrc11 - Obscura - Mauhulakh, bandits, Dawnguard
  • HairMaleOrc12 - Reach - (unused)
  • HairMaleOrc13 - Reach - Yar
  • HairMaleOrc14 - Reach - Burguk
  • HairMaleOrc15 - Reach - Mulush, bandits
  • HairMaleOrc16 - Reach - bandits
  • HairMaleOrc17 - Reach - brawler
  • HairMaleOrc18 - LikeLust3 - Kharag, Umum, Lob, Gadba, bandits
  • HairMaleOrc19 - LikeLust3 - (unused)
  • HairMaleOrc20 - LikeLust3 - Nagrub, Gularzob, Dawnguard
  • HairMaleOrc21 - LikeLust3 - Gat
  • HairMaleOrc22 - LikeLust3 - (unused)
  • HairMaleOrc23 - LikeLust3 - bandits
  • HairMaleOrc24 - LikeLust3 - Ghorbash, bandits, hunters
  • HairMaleOrc25 - LikeLust3 - Oglub, Mul, bandits, hunters
  • HairMaleOrc26 - LikeLust3 - Lurbuk, bandits
  • HairMaleOrc27 - LikeLust3 - Borkul, Yamarz, hunters
  • HairMaleRedguard1 - Blue - Klimmek, Festus, Delvin, bandits, forsworn, soldiers, Vigilants, guards
  • HairMaleRedguard2 - Wavves - Nazeem, Elgrim, Sibbit, bandits, forsworn, soldiers
  • HairMaleRedguard3 - Sahara - Nazir, bandits, Dawnguard
  • HairMaleRedguard4 - Sahara - Razelan, bandits, Dawnguard, guards
  • HairMaleRedguard5 - Footprint - Brenuin, bandits
  • HairMaleRedguard6 - Macho - Ahtar, bandits
  • HairMaleRedguard7 - Zombrex - Amren, Falion, bandits
  • HairMaleRedguard8 - LikeLust2 - Kematu, bandits
  • HairMaleSnowElf01 - Gantz - Vyrthur
  • HairMaleSnowElf02 - Benjamin - Athring
  • HairMaleSnowElf03 - NightSprings - Celegriath
  • HairMaleSnowElf06 - Lex - Gelebor
  • MaleDremoraHair01 - Benjamin - Velehk Sain, dremora
  • MaleDremoraHair02 - Maine


Production Pipeline

I built this rig in order to create another mod KSHair For All Vanilla NPCs.

I am making this resource available to the modding community to help other mod authors create NPC appearance overhaul mods.

Making an NPC appearance overhaul mod is a trial-and-error process. You make a change, build a new version of the mod, install the mod, and test in game. You must repeat this development cycle many times. As with any kind of software project, a repeatable production pipeline is essential.

Here is the production pipeline that I follow in order to construct KSHair For All Vanilla NPCs.

Step 1

Start Creation Kit.

Step 2

Click the File/Open icon on the toolbar.
In the Data dialog box, double-click each of the files listed: Skyrim Update Dawnguard HearthFires Dragonborn USSEP KSHairdos KSHairRig
(Do not set an active file.)
Click OK.

Step 3

Click Yes to continue without an active file.

Step 4

As Creation Kit loads resources, it will pop up a variety of error messages.
Click Yes to All to ignore every error.

Step 5

Eventually Creation Kit will finish loading resources.
In tree view, expand Actors, expand Actor, click Actor
Click on Race column header to sort by race

Step 6

In the right pane, scroll down and skip over all NPC records that have the "--" race which means a template-based NPC.
Scroll down to the first NPC record with BretonRace and click the record to select it.
Scroll down further to the last NPC record with BretonRace and Shift+click the record to select the whole sequence of records with BretonRace.

Step 7

Scroll down to the first NPC record with BretonRaceVampire and Ctrl+click the record to select it while preserving your existing selection above of the BretonRace records.
Please note that Ctrl+click extends your selection while preserving your existing selection.
Scroll down to the last NPC record with BretonRaceVampire and Shift+Ctrl+click the record to select it while preserving your existing selection.
In this manner, you will select each sequence of records for each race of NPCs, while continually preserving your existing selection.

Step 8

Repeat what you did in Step 7 for each of the rest of the non-beast non-children NPC races:
  • DA13AfflictedRace
  • DarkElfRace
  • DarkElfRaceVampire
  • DLC2DremoraRace
  • DremoraRace
  • ElderRace
  • ElderRaceVampire
  • HighElfRace
  • HighElfRaceVampire
  • ImperialRace
  • ImperialRaceVampire
  • NordRace
  • NordRaceAstrid
  • NordRaceVampire
  • OrcRace
  • OrcRaceVampire
  • RedguardRace
  • RedguardRaceVampire
  • SnowElfRace
  • WoodElfRace
  • WoodElfRaceVampire

Ctrl+click the first record of each sequence, scroll down to the last record of the sequence, and Shift+Ctrl+click the last record of the sequence.
If you accidentally click instead of Ctrl+click, you will lose all your previous selection sequences, and you will need to start over from Step 6.

Step 9

Press Ctrl+F4
Click Yes in the Confirm Export popup window.

Step 10

Click Yes to All to ignore every error.

Step 11

Creation Kit will appear to lock up and become unresponsive.
Do not worry. Do not click on anything in the Creation Kit window. Just let it work. It will take several minutes to generate all the NPC head meshes.
Wait until the Done popup appears.
Click OK.

Step 12

Close Creation Kit.
There is no need to save anything.

Step 13

When doing facegen export, Creation Kit produces both NPC head meshes and facetint texture files.

Assuming that your Skyrim SE is installed in C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition
then the generated facetint texture files will be located in:
C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition/Data/textures/Actors/Character/FaceGenData

Depending on your goal, you can move the facetint texture files to your mod construction folder, or simply delete them if you don't need them.

Step 14

Assuming that your Skyrim SE is installed in C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition
then the generated NPC head meshes will be located in:
C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition/Data/meshes/actors/character/FaceGenData

You should move the generated NPC head meshes to your mod construction folder.

Step 15

This rig will produce 2933 head meshes if you followed the steps above and selected all the listed sequences of NPC records, which totals to about 4.8 GB of files. BSA files are limited in size to approximately 2 GB, and Skyrim SE will CTD if you try to use a BSA that is too large.

You must separate the head meshes into multiple folders before packing them into BSA files. You can use whatever organization scheme works for you.

I separate the head meshes into 3 folders:
  • Folder 1 - files from meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm that begin with 0001, 0002, or 0003 - totaling about 1.5 GB.
  • Folder 2 - the rest of the files from meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm - totaling about 2.3 GB. (This will take less space after compression into the BSA.)
  • Folder 3 - files from the Bethesda DLC expansions such as meshes/actors/character/FaceGenData/FaceGeom/Dawnguard.esm and the rest - totaling about 1 GB.

Step 16

You must exclude the Halldir's Cairn ghost bandit wizard head mesh that causes CTD. Either delete or move this file into a separate folder:
meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm/000B289E.NIF

Step 17

Finally, you can use BSArch to pack each separated folder of NPC head meshes into its own BSA file.
Be sure to use compression to minimize the BSA file sizes.


Script File

I created a Cygwin shell script file to automate Steps 13 through 17, and I use the script myself to construct the BSA files for KSHair For All Vanilla NPCs.

Please do not run this script on your system as is, because all the file paths are specific to my system.

I am offering this script as a resource for other mod authors to study, but each mod author would need to edit and customize this script to work on their system.


#!/bin/csh

cd /cygdrive/d/NewrimMods/unpacked

# Delete FaceGen textures:

rm -r 'C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition/Data/textures/Actors/Character/FaceGenData'

# Move FaceGen meshes to mod dir:

rm -r KSHairVanilla/original/part*

mkdir -p KSHairVanilla/original/part3/meshes/actors/character

mv 'C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition/Data/meshes/actors/character/FaceGenData' \
KSHairVanilla/original/part3/meshes/actors/character

# Split up FaceGen meshes into 3 parts:

mkdir -p KSHairVanilla/original/part2/meshes/actors/character/FaceGenData/FaceGeom

mv KSHairVanilla/original/part3/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm \
KSHairVanilla/original/part2/meshes/actors/character/FaceGenData/FaceGeom

mkdir -p KSHairVanilla/original/part1/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm

mv KSHairVanilla/original/part2/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm/000{1,2,3}* \
KSHairVanilla/original/part1/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm

# Exclude files that cause CTD:
# dunHalldirs_LvlBanditGhostWizard 000B289E

mkdir -p KSHairVanilla/original/part-ctd/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm

mv KSHairVanilla/original/part2/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm/000B289E.NIF \
KSHairVanilla/original/part-ctd/meshes/actors/character/FaceGenData/FaceGeom/Skyrim.esm

# Clean up prior texture file symlinks

rm -rf 'KSHairVanilla/original/tex'

mkdir -p "KSHairVanilla/original/tex/textures/KS Hairdo's/hairline"

# Identify all texture files used in meshes, and create symlinks

find KSHairVanilla/original/part? -type f -print0 \
| xargs -0 strings -af \
| grep -i "ks hairdo's.*\.dds" \
| sed -e 's|.*: ||' -e 's|\(\.dds\).$|\1|' \
| sort \
| uniq \
| tr '\\' / \
| sed -e 's|^|find KSHairdos -ipath "*/|' -e 's|$|"|' \
| csh \
| sed -e 's|^\([^/]*\)\(.*\)|ln -s "../../../../../\1\2" "KSHairVanilla/original/tex\2"|' -e '/\/hairline\//s|"|"../|' \
| csh -v

# Pack .bsa files:

BSArch/bsarch.exe pack KSHairVanilla/original/part1 KSHairVanilla/KSHairVanilla1.bsa -sse -z

BSArch/bsarch.exe pack KSHairVanilla/original/part2 KSHairVanilla/KSHairVanilla2.bsa -sse -z

BSArch/bsarch.exe pack KSHairVanilla/original/part3 KSHairVanilla/KSHairVanilla3.bsa -sse -z

BSArch/bsarch.exe pack KSHairVanilla/original/tex 'KSHairVanilla/KSHairVanilla1 - Textures.bsa' -sse -z