Guide:Hair Mod File Setup: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 26: Line 26:
== Following the Template ==
== Following the Template ==


So if following my [https://www.nexusmods.com/baldursgate3/mods/437 Template] or just using it as a guide to copy parts from the game files, you can follow along with this tutorial.
Following Padme's [https://www.nexusmods.com/baldursgate3/mods/437 Template] (or using it as a guide to copy parts from the game files), follow along with this tutorial.


If adding an existing hair from the game without wanting to do any edits you can remove the Generated folder from your copy of the template.
If you are only adding an existing hair from the game to CC without wanting to do any edits, you can remove the Generated folder from your copy of the template and just link to the game hair instead.


Also remember to create your meta.lsx for your mod as well or if using multitool to pack create a Mods folder in your workspace folder and let multitool create the meta.lsx for you. Follow along this mini tutorial on how to create your meta.lsx [[Modding:Creating meta.lsx|Creating your Meta.lsx]]
Remember to create your meta.lsx for your mod as well, as it is required for all pak mods. If using multitool to pack, you can create a Mods folder in your workspace folder and let multitool create the meta.lsx for you. Otherwise, follow this tutorial on how to create your meta.lsx: [[Modding:Creating meta.lsx|Creating your Meta.lsx]]


You can choose for your hairs to be autosnapping or non autosnapping.
You can choose for your hairs to be autosnapping or non autosnapping.
Line 43: Line 43:
<br>
<br>
Non autosnapping is when the game doesn't snap the hair into place at all. So, you have to create your hair mesh for each race/bodyshape/bodytype that you want it to be usable for. Obviously, this takes more work, but it can often give better/less crunchy results than autosnapping, and it is much easier to manually weight a non-autosnapping hair than an autosnapping hair. For instance, for personal use hairs, you might decide you only want it for one character. Then non autosnapping might be the way to go.
Non autosnapping is when the game doesn't snap the hair into place at all. So, you have to create your hair mesh for each race/bodyshape/bodytype that you want it to be usable for. Obviously, this takes more work, but it can often give better/less crunchy results than autosnapping, and it is much easier to manually weight a non-autosnapping hair than an autosnapping hair. For instance, for personal use hairs, you might decide you only want it for one character. Then non autosnapping might be the way to go.
You may have downloaded the tutorial and feel overwhelmed by all the files and folders, but it's really not too complicated. There are only four files that we need to edit: loca.xml, meta.lsx, _merged.lsf.lsx and CharacterCreationAppearanceVisuals.lsx. You'll also need to place your .GR2 in the Generated folder, but more on that later.


== Localization/English/custom_name_here.loca.xml ==
== Localization/English/custom_name_here.loca.xml ==


This is the file that tells your game what text to display for your hair--aka the name of the hair in Character Creation. If this file is broken or doesn't exist, your hair will show up as "Not Found".
Let's start with the loca.xml. This is the file that tells your game what text to display for your hair--aka the name of the hair in Character Creation. If this file is broken or doesn't exist, your hair will show up as "Not Found".


Why is it named .loca.xml? This is because if you package the Main folder (also known as your workspace folder) with multitool, it will auto convert the .loca.xml to .loca.
Why is it named .loca.xml? This is because if you package the Main folder (also known as your workspace folder) with multitool, it will auto convert the .loca.xml to .loca.
Line 68: Line 70:
[[File:Handle multitool.webp|600px]]
[[File:Handle multitool.webp|600px]]


So once you have multitool open, make sure to click the box next to Handle so it has a tick inside. Then you can click Generate for the tool to generate a new handle. Clicking on the box that has the handle inside will copy it to your clipboard so you can go to your file and paste it in.
Once you have multitool open, make sure to check the box next to Handle. Then you can click Generate for the tool to generate a new handle. Clicking on the box that has the handle inside will copy it to your clipboard so you can go to your file and paste it in.


=== Using mini tool to create/edit the .loca ===
=== Using mini tool to create/edit the .loca ===
Line 96: Line 98:
== Hair _merged.lsf ==
== Hair _merged.lsf ==


What is this? Well it's the file where we tell the game where to locate our mesh in our mod, as well as other information it might need.
What is this? It's the file where we tell the game where to locate our mesh in our mod, as well as other information it might need.
 
I set up this file first as it makes it easier (for me at least) to set up the other files we need.


Public\Autosnapping_Template\Content\Assets\Characters\[PAK]_Hair\_merged.lsf.lsx this is where you will find our file in the Template
Public\Autosnapping_Template\Content\Assets\Characters\[PAK]_Hair\_merged.lsf.lsx this is where you will find our file in the Template
Line 177: Line 177:
                     <attribute id="SkeletonResource" type="FixedString" value="78d8b5f0-726c-232f-a357-3d05c4b3b859" />
                     <attribute id="SkeletonResource" type="FixedString" value="78d8b5f0-726c-232f-a357-3d05c4b3b859" />


SkeletonResource is normally blank in the game files. However if making an autosnapping hair assigning the skeleton id from the skeleton your hair uses in this line will allow you to skip the conform to original gr2 in lslib. Which is normally needed if having more than two parts to your hair mesh.
SkeletonResource is normally blank in the game files. However, if a hair uses physics, it will have a SkeletonResource. You can borrow the physics from a vanilla hair using this. (However if making an autosnapping hair, assigning the skeleton id from the skeleton your hair uses in this line will allow you to skip the conform to original gr2 in lslib, which is normally needed if having more than two parts to your hair mesh.)


                     <attribute id="SourceFile" type="LSString" value="Generated/Public/Autosnapping_Template/[PAK]_Autosnapping_Template/AT_Test.GR2" />  
                     <attribute id="SourceFile" type="LSString" value="Generated/Public/Autosnapping_Template/[PAK]_Autosnapping_Template/AT_Test.GR2" />  


This is the path to your GR2 in your mods folders.
This is the path to your hair .GR2 in your mod folders.
* Make sure to use / and not \
* Make sure to use / and not \
* always start the path from your Generated folder
* always start the path from your Generated folder
Line 188: Line 188:
                     <attribute id="Template" type="FixedString" value="Generated/Public/Autosnapping_Template/[PAK]_Autosnapping_Template/AT_Test.Dummy_Root.0" />  
                     <attribute id="Template" type="FixedString" value="Generated/Public/Autosnapping_Template/[PAK]_Autosnapping_Template/AT_Test.Dummy_Root.0" />  


Same again so feel free to copy and paste your path from before to this line.
This path is almost the same as above, so feel free to copy and paste your path from before to this line.
* Do not remove .Dummy_Root.0 from the line
* Do not remove .Dummy_Root.0 from the line
* this line does not need .GR2 at the end
* this line does not need .GR2 at the end
Line 211: Line 211:
                         </node>
                         </node>


This section is the parts that makeup our mesh in the GR2. So if you have 3 mesh parts you want 3 of these sections. But you want this part
This section defines the material for the parts that make up our mesh in the GR2. So if you have 3 mesh parts you want 3 of these sections. But you want this part


                             <attribute id="MaterialID" type="FixedString" value="89b063ff-7bf3-44a8-7e7d-41b29d0dd469" />
                             <attribute id="MaterialID" type="FixedString" value="89b063ff-7bf3-44a8-7e7d-41b29d0dd469" />

Navigation menu