We have a Steam curator now. You should be following it. https://store.steampowered.com/curator/44994899-RPGHQ/

【 BG3 Toolkit 】Tutorials & Resources Megathread

Game development hub. Projects, modding, and resources.

Moderator: Mod Janitor

Post Reply
User avatar
loregamer
Posts: 3577
Joined: Dec 3, '23

【 BG3 Toolkit 】Tutorials & Resources Megathread

Post by loregamer »

Figured we can use a thread for this. Write up any findings or questions you have and I'll link it in an index like this:

Index
  1. Changing NPC Visuals
  2. Editing Dialogue
  3. Creating a New Level
  4. Adding a Custom Origin in BG3
  5. Converting Existing Mods to Toolkit
  6. Setting Up a MO2 Instance - Keep Your Game Files Clean (TBD)



Unlocking The Toolkit
To unlock the full functionality of the toolkit, visit the Modding Toolkit Unlocked thread and follow the installation steps.

This will unlock all features and write permissions for the BG3 Toolkit including level editing, save editing, and more.



For converting your existing mods or quickly managing your toolkit project, check out this tool:
BG3 Toolkit Helper

Image
Last edited by loregamer on March 17th, 2025, 01:32, edited 29 times in total.
User avatar
loregamer
Posts: 3577
Joined: Dec 3, '23

Post by loregamer »

Editing Default Tav Presets
Tutorial from Padme4000, but I used AI to make him sound more like himself and not the gross troon voice.

Last edited by loregamer on September 8th, 2024, 20:45, edited 1 time in total.
User avatar
rusty_shackleford
Site Admin
Posts: 30406
Joined: Feb 2, '23
Gender: Watermelon
Contact:

Adventurer's Guild

Post by rusty_shackleford »

loregamer wrote: September 8th, 2024, 20:32
Editing Default Tav Presets
Tutorial from Padme4000, but I used AI to make him sound more like himself and not the gross troon voice.

ffmpeg -i in.mp4 -c copy -movflags faststart out.mp4
https://superuser.com/questions/856025/ ... -parameter

I need to change vault to do this automatically
Last edited by rusty_shackleford on September 8th, 2024, 20:37, edited 1 time in total.
User avatar
loregamer
Posts: 3577
Joined: Dec 3, '23

Post by loregamer »

rusty_shackleford wrote: September 8th, 2024, 20:36
ffmpeg -i in.mp4 -c copy -movflags faststart out.mp4
https://superuser.com/questions/856025/ ... -parameter

I need to change vault to do this automatically
Did it, I think
User avatar
Vergil
Posts: 14568
Joined: Sep 6, '23

Post by Vergil »

loregamer wrote: September 8th, 2024, 20:32
Editing Default Tav Presets
Tutorial from Padme4000, but I used AI to make him sound more like himself and not the gross troon voice.

Okay now one for editing origins pls
User avatar
DagothGeas5
Posts: 2347
Joined: Dec 13, '23

Adventurer's Guild

Post by DagothGeas5 »

It might be covered in the dialogue part in the future, but I am very curious about the facial animations, gestures, and all the rest that happen during dialogue for this game. They butchered Astarion's movements and camera angles in the "full" version, but how would it be possible to re-do or even make new animations? Would it require mo-cap or some 3D animating skills, or are there a set of animations that can be chosen and applied like it was in Skyrim?
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

Dialogue and Timeline Cinematics Intro


► Outdated
Last edited by Statesman on September 19th, 2024, 22:47, edited 1 time in total.
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

LSLib - PAK Exporter Tool

This package provides utilities for manipulating Divinity Original Sin 1, Enhanced Edition, Original Sin 2 and Baldur's Gate 3 files:
  • Extracting/creating PAK packages
  • Extracting/creating LSV savegame packages
  • Converting LSB, LSF, LSX, LSJ resource files
  • Importing and exporting meshes and animations (conversion from/to GR2 format)
  • Editing story (OSI) databases
ImageReleases
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

Vergil wrote: September 8th, 2024, 20:55
Okay now one for editing origins pls
Close enough?

Adding a Custom Origin in BG3
Rough guide made by Passke on how to add custom characters. Keep in mind unique characters might have some specific things needed to work including story scripts (Since I added the default setup to origin characters unique before it would work).

Last edited by Statesman on September 14th, 2024, 18:37, edited 1 time in total.
User avatar
Vergil
Posts: 14568
Joined: Sep 6, '23

Post by Vergil »

Statesman wrote: September 14th, 2024, 18:36
Vergil wrote: September 8th, 2024, 20:55
Okay now one for editing origins pls
Close enough?

Adding a Custom Origin in BG3
Rough guide made by Passke on how to add custom characters. Keep in mind unique characters might have some specific things needed to work including story scripts (Since I added the default setup to origin characters unique before it would work).

Nah I mean like editing the appearance, dialog, and voice clips for companions.
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

Vergil wrote: September 14th, 2024, 18:48
Nah I mean like editing the appearance, dialog, and voice clips for companions.
Ah, well you can modify appearance without the Toolkit, with the Toolkit and even with mods Appearance Edit Enhanced (if you don't plan on sharing them). Haven't seen a guide using the Toolkit yet, but it probably is close enough to the the other Divinity Engine games. Or just ask orinEsque for help with the older methods.

Besides that, I posted a video on how to edit dialog above (a bit clunky, but it does work). Now voice clips are a headache, you'll need a trained AI Voice Model (beyond my expertise atm). You'll also lack lip-sync on new lines, but there are some people working on fixing that particular issue (apparently Starfield uses the same lip-sync tech, so someone will figure it out eventually). So TLDR, we are halfway there.
User avatar
Vergil
Posts: 14568
Joined: Sep 6, '23

Post by Vergil »

Statesman wrote: September 15th, 2024, 00:09
Or just ask orinEsque for help with the older methods.
Are you threatening me?
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

Vergil wrote: September 15th, 2024, 00:11
Statesman wrote: September 15th, 2024, 00:09
Or just ask orinEsque for help with the older methods.
Are you threatening me?
No, lol. We have several other BG3 modders you could bother if, for some reason unknown to me, you'd feel more comfortable asking them. She was just the first user that came to mind when thinking about NPC appearances ;)
Last edited by Statesman on September 15th, 2024, 00:18, edited 1 time in total.
User avatar
Statesman
Posts: 843
Joined: Apr 7, '24

Adventurer's Guild

Post by Statesman »

Adding new Voice Lines and lip-syncing them

@Vergil Getting closer...

User avatar
loregamer
Posts: 3577
Joined: Dec 3, '23

Post by loregamer »

Altering Dialogue Nodes & Flow
Image


  1. Create a new mod project
  2. Open any level (doesn't matter)
  3. Open the Resource Manager
    Image
  4. Click "All" on the left sidebar, and search for the dialogue you are trying to alter.
    • Not exactly sure how to find the exact correct one, but for instance, I wanted to alter the conversation with Astarion at the tiefling party. The one to edit is CAMP_GoblinHuntTieflingCelebration_CRD_Astarion
    • I assume you can just filter by DialogResource and then deduct from there
  5. Right click on it, and Override in active mod
    Image
  6. Click "Yes" on maintaining the same package structure
  7. Find the new Dialogue Timeline on the left panel and you should see a new duplicate of the DialogResource
    Image
  8. Double click on it
  9. Make your changes
  10. Save, ignore any warnings
  11. When ready, go to Project > Project Settings > Publish Local
Last edited by loregamer on September 21st, 2024, 22:36, edited 1 time in total.
User avatar
Xenich
Posts: 3852
Joined: Feb 24, '24

Post by Xenich »

Anything on core mechanic changes for adapting to different systems? Possible or hardcoded?
Last edited by Xenich on September 21st, 2024, 22:44, edited 1 time in total.
User avatar
Kowe
Posts: 372
Joined: Feb 6, '24
Gender: Helicopter

Adventurer's Guild

Post by Kowe »

Xenich wrote: September 21st, 2024, 22:44
Anything on core mechanic changes for adapting to different systems? Possible or hardcoded?
These may interest you:

Script Editor - Can be for itemScripts and GameScripts.
Image

StoryEditor - Also includes scripts.
Image

Just glanced over them.
User avatar
Xenich
Posts: 3852
Joined: Feb 24, '24

Post by Xenich »

Kowe wrote: September 21st, 2024, 23:39
Xenich wrote: September 21st, 2024, 22:44
Anything on core mechanic changes for adapting to different systems? Possible or hardcoded?
These may interest you:

Script Editor - Can be for itemScripts and GameScripts.
Image

StoryEditor - Also includes scripts.
Image

Just glanced over them.
Thanks, I guess I will have to load things up and start toying with them. I don't have BG3 installed atm which is why I was wanting to avoid doing so if it were a quick answer. I spent a lot of time browsing through the DOS editor a while back to run into a dead end for what I had in mind.

Basically I was looking to see where systems like AC and "to hit" are handled in combat as those would be major revisions at their core to adjust for 1st/2nd edition. If that is hardcoded in a way where it could not be easily manipulated, you would have to rely on the scripting engine to adjust it mid process (which could cause its own issues).

Depending on how flexible the engine is though (hoping) the goal would be to see if it could be further adapted outside of D20, and allow for some other system implementations like Shadowrun's D6 system for instance.

Anyway, like I said, I am probably going to have to get my hands dirty eventually I guess (don't have the time at the moment). That or hold off and wait for people to find out more anyway, as it seems a lot of people are delving into it pretty deep.
User avatar
loregamer
Posts: 3577
Joined: Dec 3, '23

Post by loregamer »

For converting your existing mods or quickly managing your toolkit project, check out this tool:
BG3 Toolkit Helper

Image


You will need to separate all your LSX's that contain multiple resource nodes into separate ones named off of UUID.
Last edited by loregamer on March 31st, 2025, 03:17, edited 3 times in total.
User avatar
orinEsque
Posts: 3558
Joined: Oct 9, '23
Location: Narnia
Gender: Potato

Post by orinEsque »

Editing Dialogue
Its now possible to only change specific lines
  1. Put your line changes in an english.xml file under the following structure
    YourMod/Mods/YourMod/Localization/English/english.xml

    Note: For a french translator this would be: YourMod/Mods/YourMod/Localization/French/french.xml
  2. Add the original line in this structure:
    Image
  3. Alter the lines and increase the version number of each line by 1
    Image
  4. Pack the mod using BG3 modding tool or official mod kit.
Important: lingo files no longer take notes or free text out side tags. If you add them, your game will crash.
Last edited by orinEsque on September 26th, 2024, 05:44, edited 8 times in total.
User avatar
orinEsque
Posts: 3558
Joined: Oct 9, '23
Location: Narnia
Gender: Potato

Post by orinEsque »

loregamer wrote: September 23rd, 2024, 02:32
Separate LSX Into Separate LSF Files For Toolkit
...
You need to add exceptions for GameObjects, which have node id=GameObjects, and instead of ID it's called MapKey

You can also run converter tool from inside python [if you bake it in for people].

for example this is how I convert xml to loca programmatically in R:

Code: Select all

# Convert to Loca
setwd("F:\\My Documents\\BG3_modding_dev\\ExportTool-v1.18.7\\Tools")
tool="divine.exe"
type="convert-loca"
game="bg3"
source='"F:/My Documents/BG3_modding_dev/my_mod_no_alphabets/NoAlphabetsLingo/NoAlphabetsLingo/Mods/NoAlphabetsLingo/Localization/English/english.loca.xml"'
dest='"F:/My Documents/BG3_modding_dev/my_mod_no_alphabets/NoAlphabetsLingo/NoAlphabetsLingo/Mods/NoAlphabetsLingo/Localization/English/english.loca"'

system(paste0(tool
              , " -a " , type
              , " -g " , game
              , " -s " , source
              , " -d " , dest
))
CLI interface for BG3 Multimodder tool
https://github.com/ShinyHobo/BG3-Modder ... -Interface

CLI interface for Convertor tool
Command line exists but Norbyte never made documentation for it. You can figure it out from this file:
https://github.com/Norbyte/lslib/blob/m ... guments.cs

This guy made some documentation of the old divine.exe. Some conversions like convert-loca is missing in his manual.
https://github.com/fireundubh/divine
Last edited by orinEsque on September 23rd, 2024, 14:41, edited 6 times in total.
User avatar
orinEsque
Posts: 3558
Joined: Oct 9, '23
Location: Narnia
Gender: Potato

Post by orinEsque »

Portraits
https://docs.google.com/document/d/1bEC ... mjcoc9krqc
► Old Instructions
Last edited by loregamer on April 18th, 2025, 03:03, edited 13 times in total.
User avatar
orinEsque
Posts: 3558
Joined: Oct 9, '23
Location: Narnia
Gender: Potato

Post by orinEsque »

Bypass "File Name too Long Error" in Windows
You'll need this if you are making custom changes to a mod you made using the toolkit
  1. Search for Windows Powershell in your Start menu
  2. Right Click and "Run as Administrator"
  3. Paste in the following command (Source) to enable long file names:

    Code: Select all

    New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
    -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Last edited by orinEsque on September 24th, 2024, 15:25, edited 1 time in total.
User avatar
orinEsque
Posts: 3558
Joined: Oct 9, '23
Location: Narnia
Gender: Potato

Post by orinEsque »

VOICE MOD COMPATIBILITY SCRIPT

If you have a set of voice files that you want to override in bg3, and want the mod to be compatible with Larian's Mod Manager, then this python script automates the process.

Note: Only works for wem files that have a voiceid_handle.wem configuration. (wem files with just numbers as file names need something different that I haven't investigated)

REQUIREMENTS
You must unpack the following using bg3 multi modders tool:
(How to unpack BG3 game files)
  1. Gustav.pak
  2. Shared.pak
  3. VoiceMeta.pak
  4. English_Animations
INSTRUCTIONS
  1. Put your custom wem files that will override in-game ones in a separate folder. Preferably in the structure:
    YourMod/Mods/YourMod/Localization/English/Soundbanks
  2. Save the voice_overrider.exe file below.
  3. Double click to run the script
  4. Follow the instructions in the console window.

📥voice_overrider-v1.0.zip

Why is this an exe file? So trannies are forced to see this:
Image
Last edited by orinEsque on October 6th, 2024, 16:32, edited 19 times in total.
User avatar
Kowe
Posts: 372
Joined: Feb 6, '24
Gender: Helicopter

Adventurer's Guild

Post by Kowe »

How to use the Character Editor

Introduction

The Character Editor is responsible for the visual data of each character in the game, be it controllable or not.
It utilizes both Animation Rig data, 3D assets and textures. More about this later.
For this guide, Vemperen's Heads Repaired has been used for resource imports.

Preparation

Before we get to the Character Editor, a few preparations have to be made:
  • Anything custom which will be imported has to be under the data path of "Baldur's Gate 3/Data/Public". Either use the Multitool to unpack a mod's pack and move its content there or make a new folder in Public, with your own creations copied there.
  • Very Important: In the menu bar on top, under Preferences -> Global Settings -> Source Asset Data Path, set it to e.g. "C:/Program Files (x86)/Steam/.../Baldurs Gate 3/Data/". The exact path differs slightly, of course.
Importing Character Visuals and Models/Textures
► Show Spoiler
  1. Before anything can be edited, the Character Visuals have to be overridden in the active mod, under the right-click menu on a resource. Go to the Resource Manager. Have "All" selected, above "Recents". Type in the character name in its search bar. Mind you, some NPCs have different file names from their in-game ones. To better find them only have the icon of two teapots (Character Visuals) checked/framed. 5th from right. For Astarion, it should look like in the example.
  2. In this case, Astarion has to use a custom head armature. Click on the "Add Resource" button. The following window pops up afterwards:
    ► Show Spoiler
  3. With the preparations from above, and since Astarion will use one of Vemperen's heads, click on Model to import a head armature. A File Explorer window will pop up for it, navigate to where the specific head's .GR2 files are located, it should be two of them. Once selected, the window appears. Feel free to give it a name which makes it easy to distinguish and find. Click on Ok. A new window appears next:
    ► Show Spoiler
  4. It is a non-textured head model. Click on Import. Once it is finished and back to the Resource Manager, the custom resource will appear in the list of resources of the active mod. In the Baldur's Gate 3 Data folder, it appears both under Processed and Public/ProjectName/HeadName.
  5. For Textures it is a similar process, so follow the same steps but select the texture after having clicked on the Texture button in the Resource Wizard. This applies to any kind of texture, not only CLEA, HMVY, BM, or at least any that is utilized for character models.
Using the Character Editor
  1. When everything has been imported, double-click on the Character Visual resource to be edited. A new window pops up and it looks like this:
    ► Show Spoiler
  2. Let's go over the menu bar first. Under File: Open Character Visual, Close, Save, Save All, Load Preset, Save Preset. One small remark, a character's visual data can be saved as a preset and loaded in other files. Makes it easier for mass-editing. Under Edit: Undo, Redo, Remove Unused Resources. The last one is particularly good for removing any deleted imports not accessible anymore. Under View: Properties Explorer, Body Editor. These two are of utmost importance. In the middle of the screen is the Character Preview.
  3. Now, for anyone familiar with changing NPC Visuals, things will be easier to handle. Otherwise, this tutorial here is a recommended read.
  4. The Body Editor contains both the BaseVisuals as Rig Type and BodySetVisuals as Visuals. The Editor itself handles it well in that only certain Visuals are available to a Rig Type, so it is sorted already. No NPC has either of them set in stone, so they can be freely changed. Beneath those two, anything what is listed under "Slot" nodes in the .lsx code, is available. An important distinction: Body doesn't mean a character's body, but equipment slots for it, be it a chest armor or some kind of pants. They are also limited by the Rig Type and Visuals, so female armor cannot be selected for male characters under All Visuals, under the search bar. Here are the available Slots:
    ► Show Spoiler
  5. As for the Properties Explorer, meshes and textures are found under "Override Parameters". Any materials selected in the Body Editor can be found here. So Head, Body (not Equipment!), Armor pieces, Wings, Hair, it can be found here. Each texture can be modified with various parameters and textures can be chosen for each mesh. The former can be seen in the image under key point 1 of this paragraph, the latter with this image:
    ► Show Spoiler
  6. As an example, two more images will be provided, but first some information. If any material is missing a texture it will show up as what is names as "Engine_Default_Mesh_Lit_Opaque". There are also textures which can be defined as "global" textures, meaning they aren't sparsely used on just one character, but widely. SHARED_LashShadow and the other three SHARED_ textures in one of the next two images are such. Play around with them, but not every texture will apply well on each type of material/model. Anyway:
    ► Show Spoiler
    ► Show Spoiler
  7. Under Presets are all the MaterialPresets from the code and the Parameters. There are only Scalar, Vector2, Vector3, Vector (technically Vector4), Texture and VirtualTexture parameters which can be found here. The latter two are of no importance here. Every other parameter has one to four float (decimal) values, with Scalar having one and Vector having four. As with the Override Parameters, play around with the Presets. A tip, there are presets available under each Preset. To give an example, 06Eyes and the various eye colors in the Character Creation menu.
  8. When all is done, do not forget to save under File! The Toolkit should ask if you if you want to save if you didn't, though.
Root Templates
  1. To get the new Character Visual working, the mod requires a RootTemplate file. Even more data with imported resources, but more about this below. The Root Templates follow the same procedure as other resources under the resource manager, but this time Root Templates window below the Manager is utilized. All of them can be found under these four: Gustav, GustavDev, Shared, SharedDev. Use the window's search bar to find the right file. Right-click on it and click on "Override in Active Mod".
  2. Navigate to the Resource Manager, select the RootTemplate in the mod. In the sidebar to the left, is all the information necessary. Of most importance are EquipmentClass and ParentTemplateID. They have to be the correct ones for the new Rig Type and Visuals. So, for example, if it is an elf, it has to be the equipment class for elves and, in case of Astarion, Elves_Female_Players or something like this for ParentTemplateID.
  3. Small remark again: I did this manually and haven't utilized the Toolkit for RootTemplates. So this may or may not work. A UUID should be provided with the RootTemplate in the Toolkit so it can be looked up via the Multitool search feature and be created manually, then moved to the mods RootTemplate folder. Which should be under Data/Public/ProjectName.
Further Requirements for Custom Heads

In case of custom resources, there is often more data which has to be imported to the mod. In the case with my mod of Astaria, SkeletonBank, MaterialBank, AnimationBank, AnimationSetBank, AnimationBlueprintBank. TextureBank in case for any imported textures. A quick rundown of the purpose of them. And a disclaimer again, I did this manually and haven't utilized the Toolkits features for these banks. In case of Vemperen's Heads, the .lsx file was found under Data/Public/vemperens_heads/Content/[PAK]_vemperens_heads, as it has been moved to the Baldur's Gate 3 folder. Which is necessary, to my knowledge. The banks copied from it are in green:
  1. SkeletonBank: Anyone who has taken a look at i.e. a head armature in Blender has noticed its bones aka skeleton. They are responsible for the correct form of the model.
  2. MaterialBank: Forgot what it is again for, but it it uses common files.
  3. AnimationBank: Facial Expressions.
  4. AnimationSetBank: Contains IDs of the AnimationBank resources and then corresponding Mapkeys for Blueprints and Head Assets.
  5. AnimationBlueprintBank: Genomes. IK nodes and their rigging. Foundational code stuff. It can be accessed via the Genome Editor in the Toolkit, but this is for another guide in the future.
Setting up the Banks

While the Toolkit allows to access these banks, I haven't tried out using the option. So, for the manual method, along with trouble-shooting, here are a few things that require to be done before the mod shows the custom head properly in-game:
  1. SkeletonBank ID from the custom head has to be the UUID for SkeletonResource in both VisualBank and AnimationBank.
  2. Bounds Min and Bounds Max have to be copied from the mod the head armature is from. Found under VisualBank.
  3. Same with AnimationSetOverrides and AnimationWaterfall nodes. Copy them from the head armature mod to the VisualBank.
  4. BlueprintInstanceResourceID under VisualBank has to be taken from the AnimationBlueprintBankID of the head it replaces. In case of Astaria, to give an example, it is from ELF_M_Head_Astarion, or something similar. Found under either Gustav or Shared and their Content folder.
FAQ
  • Help! The eye mesh disappears when zooming towards the character's head in the Character Editor! - Just an issue of the Toolkit, it displays normally in-game if everything else has been done properly.
  • Help! The head is stretched and deformed! The eyes and face is set in front of the head! - SkeletonBank issue.
  • Help! The head is shown and animated, but looks deformed or has wrong proportions! - Do not use AnimationWaterfall nodes from other heads. Only the custom/imported one.
  • Help! The had is floating above the body, with empty space between the chest and neck! - I forgot the exact reason, but it may be AnimationBluepringBank or Min/Max bounds under VisualBank.

To-Do List
  • Import models for other slots and see how it differs from using a custom head for a mod.
Last edited by Kowe on October 7th, 2024, 18:11, edited 4 times in total.
Post Reply