924
editsMore actions
no edit summary
m (EmeraldTechno moved page Guide:Hair Creation to Guide:Hair Mod File Setup: since this is regarding the files, changing the name to be more precise) |
No edit summary |
||
(27 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | |description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | ||
|image=Modding_resources.webp | |image=Modding_resources.webp | ||
}}{{ | }}{{Modding box}}{{Modding sidebar}} | ||
Welcome to the file setup portion of making a hair mod. For the | Welcome to the file setup portion of making a hair mod. For an overview of all the steps, see [[Modding:Creating Hair Mods]]. | ||
== Tools You'll Need == | == Tools You'll Need == | ||
* [https://github.com/ShinyHobo/BG3-Modders-Multitool BG3 Modders Multitool] (required) | * [https://github.com/ShinyHobo/BG3-Modders-Multitool BG3 Modders Multitool] (required) | ||
* [https:// | * [https://bg3.wiki/wiki/Modding:BG3_Mini_Tool BG3 Mini Tool] (optional but helpful) | ||
* [https://www.nexusmods.com/baldursgate3/mods/437 Padme's Hair Template] (required unless you have a template from somewhere else) | * [https://www.nexusmods.com/baldursgate3/mods/437 Padme's Hair Template] (required unless you have a template from somewhere else) | ||
* [https://code.visualstudio.com/ VSCode] or [https://notepad-plus-plus.org/ Notepad++] (required) | * [https://code.visualstudio.com/ VSCode] or [https://notepad-plus-plus.org/ Notepad++] (required) | ||
Line 27: | Line 27: | ||
=== What are autosnapping and non autosnapping hairs? === | === What are autosnapping and non autosnapping hairs? === | ||
Autosnapping hairs are basically when you have an asset you want to work for more than one race/bodyshape/bodytype, but don't want to make a mesh for every single variation. So when setup to be autosnapping, you can apply one mesh to be used by multiple races/bodyshapes/bodytypes. And the game "autosnaps" them into place using a series of "sockets" that the hair is weighted to. | {{CollapsibleOnDesktop|Autosnapping hairs are basically when you have an asset you want to work for more than one race/bodyshape/bodytype, but don't want to make a mesh for every single variation. So when setup to be autosnapping, you can apply one mesh to be used by multiple races/bodyshapes/bodytypes. And the game "autosnaps" them into place using a series of "sockets" that the hair is weighted to. | ||
Sometimes you may still need three autosnapping meshes, one for the shorter races, one for the default bodytype and one for the strong bodytype. However we will go through when this is needed further into the tutorial. | Sometimes you may still need three autosnapping meshes, one for the shorter races, one for the default bodytype and one for the strong bodytype. However we will go through when this is needed further into the tutorial. | ||
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.|collapsed=Autosnapping hairs are basically when you have an asset you want to work for more than one race/bodyshape/bodytype, but don't want to make a mesh for every single variation. So when setup to be autosnapping, you can apply one mesh to be used by multiple races/bodyshapes/bodytypes. And the game "autosnaps" them into place using a series of "sockets" that the hair is weighted to. | ||
Sometimes you may still need three autosnapping meshes, one for the shorter races, one for the default bodytype and one for the strong bodytype. However we will go through when this is needed further into the tutorial. | |||
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.}} | |||
== Following the Template == | == Following the Template == | ||
Line 42: | Line 46: | ||
*If using the CharacterCreationSharedVisuals method, technically five files including Races.lsx. More on that later! | *If using the CharacterCreationSharedVisuals method, technically five files including Races.lsx. More on that later! | ||
Alternatively you can follow [https://youtu.be/dNLP6Lt_zFo?si=fmRVTUYBpF00s-Uc this video] by Bububull for the file setup if you want to use the CharacterCreationAppearanceVisuals method. | |||
== Mods/meta.lsx == | == Mods/meta.lsx == | ||
Line 52: | Line 58: | ||
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. This way, you don't have to manually do the conversions yourself. However, if you prefer to do manual conversions, change the extension to .xml only. | 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. This way, you don't have to manually do the conversions yourself. However, if you prefer to do manual conversions, change the extension to .xml only. | ||
You can find the _merged file at: Localization/English/custom_name_here.loca.xml. | |||
Change custom_name_here to a custom name. It's best to add a personalized prefix beforehand so there is no chance of your mod name clashing with another mod. For example, Padme4000 uses her username, but shortened to P4. So for Padme's viking braid hair, her .loca.xml would be called p4_viking_braid.loca.xml | Change custom_name_here to a custom name. It's best to add a personalized prefix beforehand so there is no chance of your mod name clashing with another mod. For example, Padme4000 uses her username, but shortened to P4. So for Padme's viking braid hair, her .loca.xml would be called p4_viking_braid.loca.xml | ||
Line 69: | Line 77: | ||
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. | 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. | ||
=== (Optional) Using mini tool to create/edit the .loca === | === [https://bg3.wiki/wiki/Modding:BG3_Mini_Tool#Using_mini_tool_to_create%2Fedit_the_.loca (Optional) Using mini tool to create/edit the .loca] === | ||
== Hair _merged.lsf == | == Hair _merged.lsf == | ||
Line 256: | Line 242: | ||
For autosnapping hairs, we can use either CharacterCreationSharedVisuals.lsx or CharacterCreationAppearanceVisuals.lsx. For non autosnapping, use only CharacterCreationAppearanceVisuals.lsx. | For autosnapping hairs, we can use either CharacterCreationSharedVisuals.lsx or CharacterCreationAppearanceVisuals.lsx. For non autosnapping, use only CharacterCreationAppearanceVisuals.lsx. | ||
You can use Padme's mini tool to help create the CharacterCreationAppearanceVisuals.lsx file, as well as its slots. Or, alternatively, use the file in this template to do it manually. | You can use [https://bg3.wiki/wiki/Modding:BG3_Mini_Tool Padme's mini tool] to help create the CharacterCreationAppearanceVisuals.lsx file, as well as its slots. Or, alternatively, use the file in this template to do it manually. | ||
Why would we want to use CharacterCreationAppearanceVisuals (CCAV) vs CharacterCreationSharedVisuals (CCSV)? Well, CCSV is a lot easier to set up, file-wise. However, it is incompatible with other mods that edit the same files. Unless you plan on using Compatibility Framework, we recommend sticking with CCAV for both types of hair. | Why would we want to use CharacterCreationAppearanceVisuals (CCAV) vs CharacterCreationSharedVisuals (CCSV)? Well, CCSV is a lot easier to set up, file-wise. However, it is incompatible with other mods that edit the same files. Unless you plan on using Compatibility Framework, we recommend sticking with CCAV for both types of hair. | ||
Line 262: | Line 248: | ||
'''Important note: CharacterCreationAppearanceVisuals and CharacterCreationSharedVisuals should be .lsx format, not .lsf or .lsf.lsx format. If you use .lsf.lsx format, the multitool will convert to .lsf and then the game will not know how to read them.''' | '''Important note: CharacterCreationAppearanceVisuals and CharacterCreationSharedVisuals should be .lsx format, not .lsf or .lsf.lsx format. If you use .lsf.lsx format, the multitool will convert to .lsf and then the game will not know how to read them.''' | ||
== CharacterCreationAppearanceVisuals == | === CharacterCreationAppearanceVisuals === | ||
<node id="CharacterCreationAppearanceVisual"> | <node id="CharacterCreationAppearanceVisual"> | ||
<attribute id="BodyShape" type="uint8" value="0" /> | <attribute id="BodyShape" type="uint8" value="0" /> | ||
Line 274: | Line 259: | ||
</node> | </node> | ||
Okay, let's break this down into sections: | |||
<attribute id="BodyShape" type="uint8" value="0" /> | <attribute id="BodyShape" type="uint8" value="0" /> | ||
This line defines which body shape the hair is for. | |||
* 0 = Standard | * 0 = Standard | ||
* 1 = Tall Muscular | * 1 = Tall Muscular | ||
* | * For Half-Orcs, even though they use Tall Muscular bodyshape, this value needs to be 0 | ||
<attribute id="BodyType" type="uint8" value="1" /> | <attribute id="BodyType" type="uint8" value="1" /> | ||
Line 287: | Line 273: | ||
<attribute id="RaceUUID" type="guid" value="0eb594cb-8820-4be6-a58d-8be7a1a98fba" /> | <attribute id="RaceUUID" type="guid" value="0eb594cb-8820-4be6-a58d-8be7a1a98fba" /> | ||
The template is currently set up for the race uuid being Human. You will find the other Race UUID's at the bottom of this file on | The template is currently set up for the race uuid being Human. You will find the other Race UUID's at the bottom of this file on Padme's template or alternatively you can check them [[https://bg3.wiki/wiki/Modding:Race UUID|here]]. | ||
<attribute id="SlotName" type="FixedString" value="Hair" /> | <attribute id="SlotName" type="FixedString" value="Hair" /> | ||
This tells the game you are adding the asset to a hair slot in character creation. | This tells the game you are adding the asset to a hair slot in character creation. This is where you would change the designation if you were making a beard for example. | ||
<attribute id="UUID" type="guid" value="d6663db9-f572-4f81-b9a2-fcac96149abe" /> | <attribute id="UUID" type="guid" value="d6663db9-f572-4f81-b9a2-fcac96149abe" /> | ||
This must be a unique uuid | This must be a unique uuid. | ||
<attribute id="VisualResource" type="guid" value="d1f51daa-5fc0-446e-92d0-318c187d2ece" /> | <attribute id="VisualResource" type="guid" value="d1f51daa-5fc0-446e-92d0-318c187d2ece" /> | ||
This must match the ID line in the Hairs _merged file that we created. | |||
==== [https://bg3.wiki/wiki/Modding:BG3_Mini_Tool#Using_Minitool_to_create_your_CharacterCreationAppearanceVisuals (Optional) Using Minitool to create your CharacterCreationAppearanceVisuals] ==== | |||
=== CharacterCreationSharedVisuals === | |||
Remember that you need your hair to be autosnapping to work properly in this section. | Remember that you need your hair to be autosnapping to work properly in this section. | ||
Line 508: | Line 357: | ||
This one from the our sharedvisuals file. When you've finished adding the entries you want to add the races.lsx is ready to go. | This one from the our sharedvisuals file. When you've finished adding the entries you want to add the races.lsx is ready to go. | ||
If you wish to use [[Modding:Compatibility Framework]] see that guide on how to use it as an alternative to Races.lsx. However we suggest you use both in order to not rule out your Mac users from using your mods. | |||
== When to use three or more meshes for autosnapping hairs == | |||
Do you notice your autosnapping hair looks good on default bodies, but doesn't work quite right for the shorter or taller bodyshapes? | |||
This is where you would make several autosnapping hairs. Each variation needs its own VisualBank entry in your merged.lsf file. | |||
So if your hair has issues on different bodyshapes, you can do what Larian did and make several. | |||
*One made around a dwarven head. | |||
** this would be for Gnomes, Halflings and Dwarves | |||
*One made around the default Elf height. | |||
** this would be for Elves, Drow, Humans, Half Elves/Drow, Githyanki and Tieflings | |||
*One for Taller bodyshapes. | |||
** this would be for Strong Elves, Drow, Humans, Half Elves/Drow, Tieflings and Half Orcs | |||
If you still get issues on Tiefling heads then you might want to use Tiefling masc heads as a base for your default and tall height. You can make as many autosnapping variants as you need, but usually three will be enough. | |||
Once you have these set up and have made the visualbank entries, you can then make the additional edits to your CharacterCreationAppearanceVisuals or CharacterCreationSharedVisuals. | |||
=== CharacterCreationAppearanceVisuals === | |||
If using CharacterCreationAppearanceVisuals, change the VisualResourceID to the new ones in the correct slots you made previously for testing the mod, as you should have all the vanilla race and bodyshapes available from your first creation of the file. | |||
=== CharacterCreationSharedVisuals === | |||
If using CharacterCreationSharedVisuals, you want to make new entries with these options. And in races.lsx instead of using Humanoid/Fey/Fiend/Celestial you want to use the race sections of the races the hairs will work on. | |||
* For the Dwarven height, add to Gnomes, Halflings and Dwarves | |||
* For the default height, add to Elves, Drow, Humans, Half Elves/Drow, Githyanki and Tieflings | |||
* For the taller height, add to Strong Elves, Drow, Humans, Half Elves/Drow, Tieflings and Half Orcs | |||
== Troubleshooting == | |||
Here are some common hair issues and how to troubleshoot them. | |||
'''My hair doesn’t show up at all, there’s not even a slot in Character Creation!''' | |||
Check your CharacterCreationAppearanceVisuals or CharacterCreationSharedVisuals, as that is where the CC slots are defined. | |||
'''My hair shows up as a slot, but when I select it, the hair is invisible!''' | |||
Check your hair _merged file, especially the file paths to your SourceFile and Template. Any inconsistency between this and the actual folders will result in the game not finding your mesh, and thus not loading it. Also note that folders must be separated by /, not \. E.g. Mod/Generated/Mod/Hair.GR2 | |||
{{Modding navbox}} | |||
[[Category:Modding guides]] | [[Category:Modding guides]] [[Category:Hair modding]] |