Baldur's Gate 3

File information

Last updated

Original upload

Created by

Magnetuning

Uploaded by

magnetuning

Virus scan

Safe to use

Tags for this mod

About this mod

A guide to making individual game text overrides compatible with others, without overriding the whole localization file. Includes a sample mod, Nautiloid Nonsense, that makes some text on the Nautiloid a bit sillier. Can be used on its own if you're getting bored replaying the Nautiloid, or as an example for your own mods.

Requirements
Permissions and credits
Donations
Hi! I couldn't find any guides on this, so I thought I'd make my own. This guide was written between March and May of 2024, with the game versions I've working with being Patch 6, Hotfix 21 through Hotfix 25, but I do think this will work for other patches.

This guide does actually assume you know a little bit about modding already, just, as a warning! At least, enough to know your way around BG3 Modder's Multitool and LSLib. I wanted to do a more comprehensive guide for people completely new to modding, but I ended up feeling pretty daunted by the concept, and delaying the release of this just, because of that. I may still make a more detailed guide at some point, though! But, in the meantime, you can find a lot of resources to get you started on the BG3 Wiki, and Padme4000 has more good tutorials and template mods here, including one on working with localization files!

If you just want the base files for mods that require them, though, you can find them here!

Now, on with the guide!

---

So, I've noticed there's quite a few mods that edit text from the game that aren't compatible with each other, because they override the entire localization file for a given language. And these mods have to be updated frequently, because any text added by Larian in a patch will be missing from their .loca file override, making that new added text register as "Not Found." This doesn't have to happen, though! There's actually a pretty simple fix for it—and this guide will show you how. To put it simply, though:

Put the lines of text you want to edit in a .loca file by themselves, and then rename that file!

As long as you have a base file for the language you want, and your file name comes after it alphabetically, you can override individual strings no problem.


It's pretty simple, actually! ...With the added little catch of it needing to be alphabetical. (I'll explain that more in a bit!) But, really, as long as you only take the strings you need from the original localization file, rename your .loca file, and put both your .loca file and a base file for a given language in the right localization folder, you can override individual lines of game text without touching any of the others. This means you can have compatible game text edits without having to incorporate the changes into other mods!

This is the method I used for my Be Nice To Wyll mod, which is fully compatible with the sample mod provided in this guide, Nautiloid Nonsense (which I explain more at the end of the page!)

What is a base file, though?

A base file is just an unedited .loca file for a given language, taken straight from the game and placed in the localization folder for the same language. Again, Padme4000 has a guide on localization files here if you'd like to know more about working with them!

Anyone is completely welcome to make their own base files! I've provided them myself in the page linked above, for all languages I have access to in Steam, but if I'm not able to update them in a timely manner you can 100% make your own (and here's how!)

To make your own base file, extract the original .loca file for the language you'd like using BG3 Modder's Multitool, and place it unedited in the corresponding folder.

For example, here's the folder structure you'll be looking at for base files for English, Latin American Spanish, and Polish:

English:

//Data/Localization/English/english.loca

Latin American Spanish:

//Data/Localization/LatinSpanish/latinspanish.loca

Polish:

//Data/Localization/Polish/polish.loca

Both the localization files and their corresponding folders seem to consistently be the name of the language in English (Padme4000's tutorial also discusses this!), but if you run into issues where you can't find the language you want, you can find all your installed localization files in BG3 Modder's Multitool by selecting "Search Index," filtering the file type to just include .loca files from the dropdown menu, then hitting "search files." The file you're looking for will just be the name of the language, and BG3 Modder's Multitool should extract it to the correct folder you need.

(By the way, some languages have corresponding gendered language files, but I'm not actually able to tell if they're necessary, because I'm not fluent in the languages that require them. You'll still see the gender .loca files listed for each language, but those files are blank for some languages, and not others. If someone can tell me whether it breaks anything if you don't have the gender .loca files for languages like French/Brazillian Portuguese/etc, I'd really, really appreciate it!)

BG3 Modder's Multitool will likely extract your localization file as a .loca.xml file, which will be important when making your overrides later! You'll have to copy the string handles from it, and you won't be able to edit it in .loca format. It will need to be converted back to a .loca file to function as a base file, though. I recommend duplicating the file, and converting the duplicate to a .loca file using LSLib.

Congrats!! You just made a new base file! Place it in the corresponding localization folder, and you're ready to start working on your overrides.

Why do the overrides need to be alphabetical, though?


I think this method functions by providing a way to add the original localization files to a mod load order of their own, that can then be overridden by your files. It doesn't seem possible to put the original localization files into a load order without providing your own base for it. But, if you do, that base also doesn't seem to be affected by the mod load order in BG3 Mod Manager; instead, you need to make sure that your modded .loca file name comes after the language name in English alphabetical order.

For example, in English, you need to make sure your .loca file starts with the letters F-Z (or, the letters EO/ENH/ENGM/etc, to come after English alphabetically). Anything that's before that alphabetically will not be able to override the English language file.

For other languages like Turkish, though, you're unfortunately a lot more limited. You need to make sure your override starts with the letters U-Z, or the letters TV, etc. Anything that comes before that alphabetically will not be able to override the original Turkish .loca file.


However, for all languages, there's actually a really, really simple way to configure the load order without having to worry too much about making them alphabetical. And it's literally just, adding more Zs to the beginning of the file name. A file name starting with one Z will override all original language files, and adding more Zs will allow you to configure overrides in the order you'd like.

The more Zs a file name has, the lower it'll be placed in the load order, overriding all other files that came before it. With this method, you can resolve conflicts with mods editing some of the same strings, by choosing which overrides you'd like to have priority (by making them look just, Very tired 😴💤)

For example, if Mod A and Mod B override some of the same strings, and you'd like to keep mod A's changes to those strings, while keeping the rest of Mod B's changes, your file names should look like this:

originallanguage.loca
Z Mod_B.loca
ZZ Mod_A.loca

Make sure you put a space between the Zs and the rest of the file name! _ characters are counted as loading later than Z, but spaces are not. so you'd want this file name:

Z Mod_B.loca

and not this:

Z_Mod_B.loca

(Or maybe you'd prefer it the other way around! But I personally find more Zs = loading later much easier to remember 😅)


...It's convoluted, yes, but it works.


For this reason, though, I highly encourage modders to only provide loose file versions of their overrides. This will allow players to adjust the load order of the overrides as they'd like, to help with compatibility if two mods override some of the same strings. This relies on people being able to rename the original .loca files, which can't be done as easily if they're in PAK files, so I don't recommend using them for this method.

Both the base file and your override files will then, again, have to be placed in the folder for the language you're working with to properly override the game text.

Once you've got that set up, you're ready to go!


A note:

Mods that currently override the entire original loca files may or may not be compatible with this method, and I'm not entirely sure why yet. I tested my overrides with Show Approval Ratings, Slithering Wet Malice Restored and Overexplained Interaction Options, but only Overexplained Interaction Options functioned with my overrides. The compatibility for it is also a bit imperfect. Both OIO and the overrides I tested with edited some of the same strings, and mine took priority, since they had to load after the localization file OIO uses to function. Everything else stayed exactly the same, though! Also, because OIO overrides the entire original localization file, it functions as a base file, and shouldn't be installed at the same time as one.


So, how do you override individual lines of text?

First, set up a new .loca.xml file, giving it a unique name that'll come after your language name in the English alphabet. I'd recommend using my sample mod as a template! Rename the "Z MGNTN_NautiloidNonsense.loca.xml" file from the sample mod, and start editing. You'll need your file to be in .xml format in order to edit it, then convert it to a .loca file when you're done.

Delete all the existing dialogue between the <contentList> tags, while leaving the <contentList> tags themselves.

Now, find the original .loca.xml file for the language you're editing, and use Ctrl+F to search for the specific line of text you'd like to edit. These datamined dialogue files by roksik-dnd on Tumblr are really helpful if you're looking for specific dialogue! There might be multiple versions of the same text, so be careful about which one you grab.

Once you've found the line of text you want to edit, copy the whole line, including the <content> tags and the string handle, and paste it into your renamed .loca file. Keep the string handle the same! It won't override the original dialogue properly if you change it. Make the edits you'd like, then find the next string you'd like to edit (if you're changing more than one) and copy that into your new .loca file, too, until you've made all the changes you want to make!

Only copy the strings you want to change into your new .loca file. Anything you're not changing won't be necessary, and copying over lines you don't need will make those lines incompatible with other mods editing the same strings!

Once you've made your edits, convert the file into a .loca file, and place it into the appropriate localization folder in your BG3 Data folder.

Congrats, you should now have a working game text override, that won't affect anything but the text you changed!!

---

About that sample mod...

The sample mod provided, Nautiloid Nonsense, can be used on its own, or as a template for your own mods! All it does is change some text from the Nautiloid level to be a bit sillier. (You can see some examples in the mod images above!) I was getting pretty bored with the tutorial, honestly, and wanted to make things a bit more fun (to me). I also thought it would be nice to have an example mod people could test immediately from the start of the game, which you can with this mod!

The file Template Mod - Nautiloid Nonsense on the downloads page provides the original edited XML file and the converted .loca file for my overrides, set up to install properly into the English localizaton folder (To install it for yourself, just drag the Localization folder in the .zip file into your BG3 Data folder!). It also contains a PDF version of this guide and a .txt file documentation of the changes I made. A full list of the changes made can also be found in the articles section, but I thought it'd be nice to have it with the mod itself too.


If you just want to download the mod for your own use, and don't want the template mod, absolutely go ahead!! Just download the Nautiloid Nonsense -  Mod Only file. The documentation of the changes made is still included in a .txt file in each .zip folder, but the extra .xml file and PDF version of the guide are not included.

The mod was made for Patch 6 - Hotfix 21, but is still working with Patch 6 - Hotfix 25.


Install the mod by dragging the Localization folder in the .zip file into your BG3 Data folder.

You can find your BG3 Data folder here:

\\SteamLibrary\steamapps\common\Baldurs Gate 3\Data\


You can adjust the load order of the mod within that folder by adding or removing Zs at the beginning of the file name, in case another override using this method edits some of the same strings.


This mod does, of course, require a base file to function! I've included the base files in a separate mod page here, just for my own organizational purposes. All the base files provided are loose file versions, which you'll be able to check out for the necessary folder structure, if you'd like to make your own base files.

The mod should be fully compatible with other mods using the same method, like my Be Nice To Wyll mod! It's also partially compatible Overexplained Interaction Options, but its compatibility with OIO isn't perfect. My mod overrides some of the same strings, so the changes made by OIO for those lines won't be present with my mod installed. All other lines will be left untouched, though! Also, since OIO overrides the original localization file, it actually functions as a base file, and shouldn't be installed at the same time as one!

As always, let me know if you have any issues, and enjoy!


Mods used in preview images:



(By the way, if you like my work, tips are welcome!! You can do so through my ko-fi here: https://ko-fi.com/herotune

It's the same ko-fi I use for my art, but I'll never paywall my mods. Thanks for taking a look, if you do!!)