Editing an NPC (Hair Mesh, Hair Eye Colours) - Padme4000/Bg3_Tutorials GitHub Wiki
Editing Editing an NPC (Hair Mesh, Hair Eye Colours)
So there are several ways to edit properties of an NPC. If they have unique meshes, materials (for eyes, hair colour and such) then the best method is directly replacing those assets instead of editing their CharacterVisuals file. This way mods that do need to edit that file will be compatible with your mod if those assets unique identifiers are not changed.
Character Visuals
So one of the main places where NPC's have their hair, skin, eyes and colours all defined is in the CharacterVisuals
For changing a characters hair/beard mesh you can also do it here. In fact in some ways if a mod is adding directly the NPC asset to Tav without making a duplicate of it, it would also effect that mod. So editing the values in the Character Visuals sometimes can be more beneficial. Though sadly incompatible then with people wanting to swap
So some Pros and Cons of using CharacterVisuals to edit the meshes.
Pros:
- If a mod is adding the NPC asset to Tav without duplicating the asset this will mean your edits won't effect those mods
Cons:
- Two mods can't edit the same character in the charactervisuals. Unless some values are not changed in the character visuals.
- for example if swapping hair colour reference only that means mods editing the meshes directly of the head, beard, hair will still be compatible with it.
Location of CharacterVisuals in the game files.
Public\Shared\Content\[PAK]_CharacterVisuals\ _merged.lsf
Public\SharedDev\Content\[PAK]_CharacterVisuals\ _merged.lsf
Public\Gustav\Content\[PAK]_CharacterVisuals\ _merged.lsf
Public\GustavDev\Content\[PAK]_CharacterVisuals\ _merged.lsf
Characters will be split across these files and some like Companions across multiple.
Some characters do go by different names rather than directly their name. for example Minthara in charactervisuals goes by DrowCommander
Locating the in file name of a Character
To find their in file name we have to search in the English.loca (converted to xml) for their name. Sometimes they are multiple times in the localisation file so you may need to do multiple searches until you find correct one.
Just be aware the localisation file is full of spoilers.
Ctrl + F and type >Name< so for example searching for >Minthara<
In this case it comes up with 13 so we want to copy the handle. The section in the "" like in the image below
WIP FROM THIS POINT ON
but once you find them copy their section into your mods folder. Path can be Public/Yoursharedfolder/Content/[PAK]_CharacterVisuals/_merged.lsf even if the entry is in the Gustav section.
then find the section of that whole section you just copied over.
in this section you replace the VisualResource ID with the ID of the thing you want to change it to. if I use modders multi tool index search to find this hair VisualResource ID I can see it is the HAIR_HUM_M_Gale so I would then find the ID of the Hair I want to replace it with and paste that over the VisualResource ID in the charactervisuals merged
So first what we want to do if it isn't already is convert those files to .lsx so we can open them with our editing program.
Either by using Decompress with Modders Multi-Tool when setting that up, as it now deletes the original file when converting to save space. As you really don't need both the original .lsf and the converted .lsf.lsx when using those files to create your mods.
Why .lsf.lsx? It's the format Modders Multi-tool uses so when you convert your mod into a .pak via the tool it auto converts that.lsf.lsx into .lsf for the game to read. But having it as .lsf.lsx when editing means we can read it in our chosen program.
Replacing the Mesh/Textures Directly
So first and foremost when creating a .pak to replace meshes and/or textures you want to copy the merged of the mesh you're editing. Using head as an example:
Public\Shared\Content\Assets\Characters\Race You're editing\Heads\Head You're Editing
or for strong types and dragonborn
Public\SharedDev\Content\Assets\Characters\Race You're editing\Heads\Head You're Editing
When creating a .pak you want to copy that head merged you're editing and make the same folder structure to that file in your workspace folder.
Then for the textures and mesh you can copy the same folder structure as the game or make a custom one. Main thing is that the merged file of the head has the patch changed to your new path
For example using one of my own mods for the structure:
My meshes and textures go here EA_Gale_Head\Generated\Public\GalePatch6\P4_Gale
EA_Gale_Head is what we call the workspace folder. The very first folder that has all the things we are editing in.
EA_Gale_Head\Public\GalePatch6\Content\Assets\Characters\Humans\Heads[PAK]_HUM_M_Head_Gale_merged.lsf
So if editing a texture I want to go all the way down to the texture bank section. If all I am editing is the textures then this is the only section I need in my modded _merged.lsf
using this section as an example
Generated/Public/Shared/Assets/Characters/_Models/Humans/HUM_M_NKD/HUM_M_Gale/Resources/HUM_M_NKD_Body_Gale_CLEA.DDS
we'd then just update this line to the path in our workspace folder so
Generated/Public/GalePatch6/P4_Gale/HUM_M_NKD_Body_Gale_CLEA.DDS
repeat for all the textures you are editing.
once finished either manually convert your .lsx to .lsf or let modders multitool to do the conversion for you when you pack by naming the file extension .lsf.lsx
do the same for any head mesh replacements as well
do not touch the UUID's in the <attribute id="ID" type="FixedString" value=" sections keep those as they arae if you are just replacing making sure to change any \ to /
Character Editor Presets
Public\Shared\Content\Assets\Characters\Character Editor Presets
Public\Shared\Content\Assets\Characters\Character Editor Presets\Origin Presets
Public\Shared\Content\Assets\Characters\Character Editor Presets\Origin Presets\CharacterName
so all these have merged.lsf files that have hair/eye colour values for NPC's and Companions best thing to check if an edit is working is make the value an extreme My mini tool tools section has a colour converter for Hex to the games sRGB 0 - 1.0 values found here.
For these values never have any , in between the numbers.
hair colours include eyebrow, beard, body hair and them all.
Make sure textures and meshes have uppercase extensions
so .DDS not .dds .GR2 not .gr2
Replacing the LSX/LSF Files Directly
So this is placed under Character Editor Presets as it is similar in how it is done, but where the files might be are different.