Just getting started? This guide will help you figure out how to make sure you have the right set-up to begin creating a mod.
The Community Library Team has prepared a base template that may be helpful as a starting point, which can be found on GitHub.
When creating mods, you want to be sure you have the right project setup. This will ease the process a bit, as well as keep things organized. A common convention is to use a folder structure like this:
Mods/ProjectName/
Readme.md/txt
Source/
Localization/
LANGUAGENAME/
modname-english.xml
Mods/
MODNAME/
meta.lsx
Public/
MODNAME/
Assets/
Releases/
The Assets
and Releases
folders exist to store artifacts relating to publishing your mods - zipped up .pak files, images for your nexus page, etc.
Source
is where the meat of your mod will be, and consists of three folders: Localization
, Mods
, and Public
.
Localization
requires a subfolder for the language you’re localizing in, and a .xml
file of any name.
Mods
contains a folder with the name of your mod, within which you’ll need a meta.lsx
file, which defines the metadata, including the UUID, Name, and expected folder of your mod.
Public
contains a folder with the name of your mod, within which you’ll place the data files you work with, matching Larian’s folder structure.
The Community Library Team has prepared a base Script Extender template that may be helpful as a starting point, which can be found on GitHub.
If you intend on working with Script Extender(SE), you’ll need a little bit more as well. Within yourSource/Mods/MODNAME
folder, you’ll want the following file structure:
Source/Mods/MODNAME/
meta.lsx
ScriptExtender/
Config.json
Lua/
BootstrapServer.lua
BootstrapClient.lua
The Config.json
file defines a few aspects of your mod for Script Extender, including which SE modules you want to use and what the minimum required version of SE should be.
The Lua
folder contains two files - you technically only need one of these, but this guide lists both as they’re both potentially important.
BootstrapServer.lua
is for code that should run on the server.BootstrapClient.lua
is for code that should run on the client.More information can be found in the official SE Documentation.
Listed below are tools that will help you in creating mods.
This simplifies the mod installation process. You can drag the .zip file of a mod into this program, and it will install it automatically for you. All you have to do is drag it from the inactive load order to the active load order, click Save, and click Export. You can also adjust the load order of your mods, which prevents conflicts and ensures functionality between mods that depend on other mods to function.
See A Modder’s Guide to Git if you’re new to the idea of Git or Version Control, or just want a refresher.
Git is a useful way to keep track of different versions of your code. It allows you to easily store and backup your project at various states. If you don’t have Git, we highly recommend it as a way to handle versioning and manage your code. It’s a lifesaver.
Visual Studio Code(VSCode) or VSCodium is the preferred file editor for creating BG3 Mods:
CL_Status_BOOST.txt
, you can start typing it and select the full name from a list. It can also search every file in a project at once. This is especially useful if you need to find and replace every instance of a UUID.[TODO: Add more tools]