Adding Playable Races - Baldurs-Gate-3-modders/Best-Practices-Wiki GitHub Wiki
Adding playable races requires at minimum the updating of three files:
- /Public/ModName/CharacterCreationPresets/CharacterCreationPresets.lsx
- /Public/ModName/Races/Races.lsx
- /Public/ModName/RootTemplates/_merged.lsf
Add two new CharacterCreationPresets for each new race (male and female). You will CTD if both are not present.
<!-- Civilian -->
<node id="CharacterCreationPreset">
<attribute id="CloseUpA" type="LSString" value="HFL_F_Camera_Closeup_A"/>
<attribute id="CloseUpB" type="LSString" value="HFL_F_Camera_Closeup_B"/>
<attribute id="Gender" type="uint8" value="1"/>
<attribute id="Overview" type="LSString" value="HFL_F_Camera_Overview_A"/>
<attribute id="RaceUUID" type="guid" value="54fb4eb9-2cb9-4925-a94f-c16d15e20999"/>
<attribute id="SubRaceUUID" type="guid" value="5969d111-df87-43e9-8f64-b33f01436195"/>
<attribute id="RootTemplate" type="guid" value="f1e91aa1-61a0-44ff-b30a-5001e8de0e3b"/>
<attribute id="UUID" type="guid" value="df35471e-a8ea-4f69-926b-d6e97a799b10"/>
</node>
<node id="CharacterCreationPreset">
<attribute id="CloseUpA" type="LSString" value="HFL_M_Camera_Closeup_A"/>
<attribute id="CloseUpB" type="LSString" value="HFL_M_Camera_Closeup_B"/>
<attribute id="Gender" type="uint8" value="0"/>
<attribute id="Overview" type="LSString" value="HFL_M_Camera_Overview_A"/>
<attribute id="RaceUUID" type="guid" value="54fb4eb9-2cb9-4925-a94f-c16d15e20999"/>
<attribute id="SubRaceUUID" type="guid" value="5969d111-df87-43e9-8f64-b33f01436195"/>
<attribute id="RootTemplate" type="guid" value="caeae8e0-836a-4760-90bf-8eb636564e50"/>
<attribute id="UUID" type="guid" value="5a6e26b3-2e5d-4e3d-94eb-017e3833a34b"/>
</node>
Add a new race for each race and set its ParentGuid equal to the race UUID you intend to make playable. It inherits all of the properties of the parent.
<node id="Race">
<attribute id="Description" type="FixedString" value="Minotaurs are big and scary. Watch out for the horns!"/>
<attribute id="DisplayName" type="FixedString" value="Minotaur"/>
<attribute id="Name" type="FixedString" value="Minotaur"/>
<attribute id="ParentGuid" type="guid" value="31e1a2fe-0322-4540-95c3-9a28ad7fb202"/>
<attribute id="ProgressionTableUUID" type="guid" value="00000000-0000-0000-0000-000000000000"/>
<attribute id="RaceSoundSwitch" type="FixedString" value="Monstrosity"/>
<attribute id="UUID" type="guid" value="6112e795-5d35-4057-a0d9-b2f23f8a7472"/>
</node>
Add a new root template for each race and set its ParentRootTemplate equal to the race root template MapKey UUID you intend to make playable. This lets you modify its properties without altering the base template.
<node id="GameObjects">
<attribute id="MapKey" type="FixedString" value="8d50a730-6199-4eba-84fc-266db2829adb" />
<attribute id="ParentTemplateId" type="FixedString" value="867c3061-624e-4b02-babb-a23e743fb5d3"/>
<attribute id="Name" type="LSString" value="Minotaur_867c3061-624e-4b02-babb-a23e743fb5d3" />
<attribute id="Type" type="FixedString" value="character" />
<attribute id="SpellSet" type="FixedString" value="CommonPlayerActions" />
</node>
Subraces will be available for a race if the base class is not listed as a CharacterCreationPreset. Each subrace should have the SubRaceUUID set.
Camera angles for your CharacterCreationPresets can be modified in /Mods/ModName/Levels/SYS_CC_H/Triggers/_merged.lsf. Change values in the Transform node. All attributes are relative to the model.
<node id="GameObjects">
<attribute id="DOFAperature" type="float" value="10" />
<attribute id="DOFFarOnly" type="float" value="1" />
<attribute id="DOFFarSharpDistance" type="float" value="0" />
<attribute id="DOFFocalDistance" type="float" value="2.8" />
<attribute id="DOFNearOnly" type="float" value="0" />
<attribute id="DOFNearSharpDistance" type="float" value="0" />
<attribute id="FOV" type="float" value="40" />
<attribute id="Flag" type="int32" value="1" />
<attribute id="Lerp" type="bool" value="True" />
<attribute id="LevelName" type="FixedString" value="SYS_CC_H" />
<attribute id="MapKey" type="FixedString" value="787f7d58-cfab-40af-ba28-e83aad41e1c9" />
<attribute id="Name" type="LSString" value="MINO_Camera_Overview_A_000" />
<attribute id="Speed" type="float" value="2" />
<attribute id="TemplateName" type="FixedString" value="7f4a742a-b1ab-4195-b04b-9320244592ca" />
<attribute id="Type" type="FixedString" value="trigger" />
<attribute id="UseDOF" type="bool" value="True" />
<attribute id="_OriginalFileVersion_" type="int32" value="1073741870" />
<children>
<node id="FadeChildren" />
<node id="LayerList">
<children>
<node id="Layers">
<children>
<node id="Object">
<attribute id="MapKey" type="FixedString" value="SYS_CC_H" />
<children>
<node id="Layer">
<attribute id="Object" type="guid" value="a1a84319-cc18-1de5-fb00-16b034554e0c" />
</node>
</children>
</node>
</children>
</node>
</children>
</node>
<node id="Transform">
<attribute id="Position" type="fvec3" value="6.48 3 115.51" />
<attribute id="RotationQuat" type="fvec4" value="0.008661847 0.9381363 0.009894546 0.3460165" />
<attribute id="Scale" type="float" value="1" />
</node>
</children>
</node>
- Some modded races do not benefit from long or short rest, or both (Goblin ranger for instance)
- Some modded races do not get prepared spells when a wizard (Goblin ranger for instance)
- Potentially an issue with the root template not providing the necessary tags