Creating a Mod - Baldurs-Gate-3-modders/Best-Practices-Wiki GitHub Wiki

Creating a Mod

Basic modding information (how to get started)

In the simplest terms, making mods for BG3 simply requires you to modify text files. There are five kinds included within the .pak files the game uses to run. They are .lsx, .lsf, .lsb, .lsj, and .txt. The first four in the list are essentially XML files, of which .lsx is the only one in a non-compressed format. To modify the latter three XML types, they must be uncompressed with LSLib and turned into .lsx files. .txt files are used to create flat lists.

.lsx exmple:

<?xml version="1.0" encoding="UTF-8"?>
<save>
    <version major="4" minor="0" revision="0" build="48"/> 
    <region id="Tags">
        <node id="root">
            <attribute id="Description" type="LSString" value="|All tadpole special powers are blocked with this tag.|"/>
            <attribute id="DisplayDescription" type="TranslatedString" handle="ls::TranslatedStringRepository::s_HandleUnknown" version="0"/>
            <attribute id="DisplayName" type="TranslatedString" handle="h31606a02gee6cg4170g9803g3488f6f8c3ba" version="3"/>
            <attribute id="Icon" type="FixedString" value=""/>
            <attribute id="Name" type="FixedString" value="TADPOLE_POWERS_BLOCKED"/>
            <attribute id="UUID" type="guid" value="dbbb5a43-a45f-4d6e-b6dd-eba372e8f294"/>
            <children>
                <node id="Categories">
                    <children>
                        <node id="Category">
                            <attribute id="Name" type="LSString" value="Code"/>
                        </node>
                    </children>
                </node>
            </children>
        </node>
    </region>
</save>

.txt example:

new entry "COMPELLED_DUEL"
type "StatusData"
data "StatusType" "BOOST"
data "DisplayName" "Status_BOOST_COMPELLED_DUEL_DisplayName"
data "Description" "Status_BOOST_COMPELLED_DUEL_Description"
data "DescriptionParams" "Distance(9)"
data "Icon" "unknown"
data "StackId" "COMPELLED_DUEL"

new entry "COMPREHEND_LANGUAGES"
type "StatusData"
data "StatusType" "BOOST"
data "DisplayName" "Status_BOOST_COMPREHEND_LANGUAGES_DisplayName"
data "Description" "Status_BOOST_COMPREHEND_LANGUAGES_Description"
data "Icon" "Spell_Divination_ComprehendLanguages"
data "StackId" "COMPREHEND_LANGUAGES"
data "Boosts" "Tag(COMPREHEND_LANGUAGES)"

More info

  • UUIDs (in the form of "00000000-0000-0000-0000-000000000000") are generally used to connect various files together by reference. They can be generated for custom content using a tool like this.
  • Much of the text of the game relies on the use of tags to reference translation text.
⚠️ **GitHub.com Fallback** ⚠️