Created by ghostboats and khbsd, this VSCod(e/ium) extension is designed to help mod authors speed up their mod creation workflows. The extension has multiple useful utilities that include but are not limited to:
If all of this sounds gouda, and you are comfortable with initial setup and just want to see what the extension can do, please jump to here while we cover the basics.
Although the extension is still receiving regular updates, it’s very functional, and has lots of tools and tricks useful to mod authors. It is built off the philosophy of “Few clicks, few tabs” ie, being able to mod without having to tab out as often and requiring as few clicks as possible to get the job done. It has saved us a lot of time, and I hope it can do the same for you!
While I use “VSCode” in this article, it is in the marketplace for both VSCode and VSCodium
Goal: The goal of this wiki is twofold: provide documentation for mod authors and developers (coming soon) who may wish to contribute/fork their own version.
Note: Previous versions of the extension required direct use of
divine.exe
. This has since been replaced with LSLib. Make sure your path now points to the directory containinglslib
. Likewise, previous versions of the extension required python and some external modules (ImageMagick, PIL, etc). This has been removed and only thelslib
folder is required.
Nothing is perfect, let’s get the rough stuff out of the way before we start, to possibly save you time in case this extension is not what you are looking for.
Being on this list doesn’t guarantee that it will or will not be possible in the future. Just that it is unlikely.
There are several ways to download the extension, but below is the easiest method.
View
tab on the top ribbonExtensions
Search Extensions in Marketplace
search box, enter bg3
Install
on the correct extension (bg3_mod_helper)It is recommended that you restart VSCode after installing. In fact, you should restart VSCode everytime you change your workspace.
After installing the extension, you will see a message like this:
or this:
in the bottom right of VSCode, especially if this is your first time using the extension.
There are a few quick setup steps that the extension requires to be in a working state, namely adjusting the paths in the extension’s settings. I cover that below, but first let’s get a proper workspace set up so you can utilize all the features of the extension. Once installed, the extension is designed to launch right when you start VSCode.
While the extension doesn’t perform any actions in the background, it is technically always on. This shouldn’t hinder your other non-modding projects, but it’s good practice to disable or delete any extension if you don’t plan on using it for a while.
The key working with the extension is setting up a workspace. There are a few different ways to do it but here is the simplest and safest.
Open Folder
.Open Folder
, you should select the folder that contains your Localization, Mods, and Public folder as your workspace folder. You should see the message below if you have opened up your workspace correctly (and have your settings set up which I cover in the section below)VSCODE QUICK TIP: In Windows, you can pin VSCode to your taskbar and simply right click on it. This will give you the option to open previously opened workspaces right away or open an empty workspace. Also, it is possible to add an
Open with Code
option when right clicking a folder on your desktop (or anywhere) to instantly open and add a folder to VSCode. It’s useful to learn these methods should you swap between mod folders a lot. More info and possible steps here.
As I mentioned, you better have been listening, if it’s your first time starting the extension (or if you have an error on startup which could be unrelated) you may see the image below when you open up VSCode or a workspace.
This error means LSLib.dll
isn’t in the folder in your settings.
This error means there’s something wrong with your Root Mod Path.
There are a few quick setup steps that the extension requires to be in a working state, namely adjusting the paths in the extension’s settings. There are a few ways to get to these settings, with the following being the easiest:
bg3
in the settings search barYou should be seeing something like this (settings seem to move around):
Before we actually look at any of the settings we need to understand the difference between User settings and Workspace settings in VSCode. In the picture above, we can see options for User and Workspace. User settings persist across multiple VSCode windows. Workspace settings are for that specific VSCode window. This distinction is important because of how the extension handles paths for you. Things will make more sense as you go though each setting option below, but understanding this distinction is important, especially for Root Mod Path.
Let’s go through each settings option.
Certain files/folders are automatically excluded, like meta.lsx
-continueGame
flag; it will auto load your last save when it gets to the maine menu.C:\Users\ghostboats\Desktop\ExportTool-v1.19.5\Packed
.Baldur's Gate 3
install folder (C:\Program Files (x86)\Steam\steamapps\common\Baldur’s Gate 3). This is used to launch the game from VSCode.While the extension has many other capabilities and shortcuts, the best way to access the features of the extension is to use the data provider. I’m sure when you first installed the extension, you noticed the little box on the far left (given you havent moved around your VSCode ui). Clicking it opens up the data provider, which is a quick one stop shop for alot of (but not all) the main functionality of the extension.
If you see a
>
before an option, such as Pack/Unpacking Tool, it means that button does multiple things. If you press the text next to it, its main action will be performed, typically open up some sort of webview to work with that tool or process. Your other option would be to hit the>
, revealing a dropdown list of quick options you can execute without accessing the more intensive main action.
If you don’t see the cardboard box, you don’t have the extension installed correctly or something is corrupted.
If none of the options are available when you click the data provider (it will say something like nothing to display), something failed when the extension loaded up. It could be a number of things but the first thing to check would be the make sure all the paths you have provided in settings are correct and that you do have lslib downloaded.
I will cover most of what these do below, but here is each current setting and a very quick breakdown of what they are.
Mods
folder. Please place your dds files in there temporarily if you wish to test and use this tool currently.I hear you saying “reading is annoying!” and “I don’t want to read all this.”
Too bad.
The one thing you should get comfy with, even if youstupidlyunfortunately don’t care about some of the shortcuts and other features, is the data provider. It will always house the most powerful features of the tool and it would be a waste of your time not to use them.
Use the
Add Handles To All Locas
setting to apply the newly created handle to all your loca files should you have multiple. Otherwise, you will be prompted to select which files to insert the handle in.
Conversion Tool
in the data provider.Conversion Tools
to display quick options regarding conversion such as Convert all XML to LOCA
or Convert all LSX to LSF
.Look for
Excluded Files
in the settings to add files to exclude. You can also right click on a file and clickAdd to Conversion Exclusion List
orRemove from Conversion Exclusion List
.
Pack/Unpacking Tool
to display quick options regarding packing such as Pack Mod
and Unpack Mod
.Pack Mod
performs a number of background checks:Look for
Auto Launch On Pack
to launch game right away after packing, chains well with theLaunch Continue Game
setting.
Look for
Hover: Enabled
in the settings to disable the hover feature of the extension to avoid visual clutter if you see fit. Look forHover: Max Files
for a better solution as it will limit the amount of files returned to help with visual clarity. Look forMax Cache Size
if you are dealing with lag issues.
Convert To DDS
or Convert To PNG
.Resize Image
. Four options will appear:Resize Image Custom
which will prompt you to select a height and width (make them the same please)Resize Image to Controller (144x144)
Resize Image to Hotbar (64x64)
Resize Image to Tooltip (380x380)
Add Icon Background
which will prompt you to either choose from multiple in game backgrounds or a custom one if you have one.Create BG3 File
or press Control + 1
which opens a dropdown of file templates to choose from.Export Tools
, and select the relevant option.Coming soon, you heathens.