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

[BG3] Modding BG3 - Getting Started

Game development hub. Projects, modding, and resources.
Post Reply
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

[BG3] Modding BG3 - Getting Started

Post by orinEsque »

Index
  1. Prerequisites
  2. Unpacking Game Files
  3. Using the BG3MT Search function
  4. Creating a .pak Mod that works with mod managers
  5. How to change your mod's version
  6. Unpacking an existing mod
  7. Modding Best Practices
  8. How to change NPC visuals [redirect]
  9. How to change Voice using AI [redirect]


[back to index]
1.Prerequisites
  1. BG3 Multimodders Tool (BG3MT) - Download
  2. Norbyte's Lslib Tool - Download
  3. Notepad++ - Download

    If you intend to edit/create BG3 meshes in blender:
  4. Norbyte's Collada/GR2 Blender plugin - Download
[back to index]
2.Unpacking Game Files
  1. Open BG3 Multimodders Tool (BG3MT)
  2. Click on "Configuration" & set your BG3.exe path to where is steamlibrary folder is. This should be something like: C:\SteamLibrary\steamapps\common\Baldurs Gate 3\bin\bg3.exe
  3. Set your game's document folder to: C:\Users\yourUserrname\AppData\Local\Larian Studios\Baldur's Gate 3
  4. Now go to Utilities > Game File Operations > Unpack Game Files
    Image
  5. Unpack the relevant pak file, or all if you have enough disk space.
    ► Which .pak do I need?
    Image
  6. Game File Operations > Decompress Unpacked Game Files
    Image
  7. Index > Index Pak Files
    Image
  8. Index > Index Unpacked Files
Last edited by orinEsque on April 10th, 2024, 00:41, edited 42 times in total.
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

Post by orinEsque »

[back to index]
3. Using the BG3MT Search function
Once you have indexed your game files, BG3MT can be used to search for contents of these game files.
Starting with an easy example, let's say I want to find the file that defines what Lorroakan looks like.
  1. Click Search Index
    Image
  2. Search "Lorroakan". And set file type to .lsx
  3. Scroll down till you find [PAK]CharacterVisuals\_merged.lsf.lsx
    Image
  4. Open this file in notepad++
  5. Do a search (Ctrl+F) for "Lorroakan" and it should take you to the section that defines his visuals.
  6. What you have here is an xml file. It's similar to bbcode in that it has "tags" that open and close. <mytag> some text </mytag>
    Image
Last edited by orinEsque on March 6th, 2024, 14:57, edited 7 times in total.
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

Post by orinEsque »

[back to index]
4. Creating a .pak mod that works with mod managers
  1. Let's create myFirstMod-v1.0.
  2. Create a folder named myFirstMod-v1.0
  3. Inside create a folder called "Mods".
  4. Inside the "Mods" folder create a unique folder name that corresponds to your mod but without spaces e.g: called myFirstMod. This folder name is important.
    ► you can skip these step now
  5. Now you can drop the myFirstMod-v1.0 folder into the blue area in BG3MTool.
    Image
  6. Now BG3MT will as you to put Author, Description and Version.
    Image
  7. Make sure you set version to be higher than 0.0.0.0. Otherwise your mod may not work.
  8. This will now create myFirstMod-v1.0.zip. It doesn't do anything in the game yet but if you drop it in your mod manager, it will show up as a mod.
Last edited by orinEsque on April 22nd, 2024, 23:03, edited 12 times in total.
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

Post by orinEsque »

[back to index]
5. How to change your Mod's version
  1. Open BG3 Multi Modders Tool (BG3MT)
  2. Go to Utilities > Version Calculator
  3. I want version 2.3. So set it and copy the long number
    Image
  4. Paste this in place of the two long numbers indicated as version.
    Image
[back to index]
6. Unpack an Existing mod
  1. If the mod is in a zip file, unzip it.
  2. Open BG3MT
  3. Drop the .pak file in the blue area
  4. Then go to Shortcuts > Unpacked Mods
  5. You should see a folder corresponding to the .pak file's name. Congratz, you have unpacked the mod!
[back to index]
7. Modding Best Practices
Only use the necessary assets & make your mod future proof.
  1. LSF files in the same file path after SharedDev, Shared, GustavDev, Gustav all merge together into one before the game is loaded. E.g.
    • Public / SharedDev /Content/[PAK]Character_visual/merged.lsf
    • Public / Shared /Content/[PAK]Character_visual merged.lsf
    • Public / GustavDev /Content/ [PAK]Character_visual /merged.lsf
    • Public / Gustav /Content/[PAK]Character_visual /merged.lsf
    • Public / yourmodname /Content/[PAK]Character_visual /merged.lsf.
    All the LSF files from above get merged into one big xml file. With yourmodname/merged.lsf getting priority.
  2. Renaming your merged.lsf to random.lsf still works.
  3. Multiple .lsf files can be dropped in the same Public/yourmodname/ folder and have the same effect as dropping Gustav/../merged.lsf and GustavDev /../merged.lsf separately. E.g.
    Image
  4. Your mod’s LSF file does NOT need to contain everything from the original file if you use this file convention:
    • Public/Yourmodname/Content/[PAK]Character_visual /renamed.lsf
    This way you can avoid issues like headless cats! being changed in a new patch. And your mod size will be tiny because your .LSF file will only contain the code for the character you changed only. E.g. I have only included Wyll’s variables so instead of a 100000+ lines, I have 2500.
    Image
  5. Note: EVERYTHING between a <node=”Resource”> and </node> has to be included otherwise if you change eye colour in the Resource and leave out the rest. You’ll just have floating eyes.
  6. It's best to use the LSV from the latest PatchXHotfixY.pak file instead of the one from Gustav.pak or Shared.pak when you first build your mod.
  7. Finally, you can pack your mod into a handy little zip file using bg3-modders-multitool, and we can easily import stuff into BG3 manager. This way we can decide which mod gets priority if two mods have some clashing character Resources.
Last edited by orinEsque on March 6th, 2024, 17:42, edited 9 times in total.
User avatar
Oyster Sauce
Turtle
Turtle
Posts: 2079
Joined: Jun 2, '23

Post by Oyster Sauce »

I tried making a mod and it seemed too difficult so I gave up. Now, thanks to this guide, I know I was correct.
Last edited by Oyster Sauce on February 17th, 2024, 02:01, edited 1 time in total.
User avatar
BobT
Posts: 844
Joined: Jan 29, '24
Location: USA

Post by BobT »

Oyster Sauce wrote: February 17th, 2024, 02:01
I tried making a mod and it seemed too difficult so I gave up. Now, thanks to this guide, I know I was correct.
If a woman can do it, why can't you? ;)
User avatar
Kowe
Posts: 68
Joined: Feb 6, '24

Post by Kowe »

A rather general question. What programming language is used for Baldur's Gate 3 ? Someone said C# and Lua on a Steam forum post. Is this correct ?
I am only a bit familiar with Java and Python (therefore some general knowledge), but it can't hurt to dive deeper into the code in the long-run.
User avatar
rusty_shackleford
Site Admin
Posts: 10260
Joined: Feb 2, '23
Contact:

Post by rusty_shackleford »

Kowe wrote: February 21st, 2024, 22:04
What programming language is used for Baldur's Gate 3 ?
Engine is in C++, scripting is done in their own scripting language that is based on prolog/datalog.
User avatar
Kowe
Posts: 68
Joined: Feb 6, '24

Post by Kowe »

rusty_shackleford wrote: February 21st, 2024, 22:06
Kowe wrote: February 21st, 2024, 22:04
What programming language is used for Baldur's Gate 3 ?
Engine is in C++, scripting is done in their own scripting language that is based on prolog/datalog.
Thank you very much!
Time to get some good tutorials/books/PDFs for both.
User avatar
rusty_shackleford
Site Admin
Posts: 10260
Joined: Feb 2, '23
Contact:

Post by rusty_shackleford »

Kowe wrote: February 21st, 2024, 22:09
rusty_shackleford wrote: February 21st, 2024, 22:06
Kowe wrote: February 21st, 2024, 22:04
What programming language is used for Baldur's Gate 3 ?
Engine is in C++, scripting is done in their own scripting language that is based on prolog/datalog.
Thank you very much!
Time to get some good tutorials/books/PDFs for both.
The only one of the two used by modders will be the latter, but not until they release their devkit.
User avatar
Tweed
Turtle
Turtle
Posts: 1635
Joined: Feb 2, '23

Post by Tweed »

BobT wrote: February 17th, 2024, 02:19
Oyster Sauce wrote: February 17th, 2024, 02:01
I tried making a mod and it seemed too difficult so I gave up. Now, thanks to this guide, I know I was correct.
If a woman can do it, why can't you? ;)
>woman
User avatar
AtomicSpaceKitty
Posts: 8
Joined: Dec 4, '23

Post by AtomicSpaceKitty »

Thank you so much, @orinEsque , for these tutorials. They helped me to figure out how to merge your No Alphabets Lingo file with the Show Approval Ratings mod. :toot:
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

Post by orinEsque »

AtomicSpaceKitty wrote: March 2nd, 2024, 04:35
Thank you so much, @orinEsque , for these tutorials. They helped me to figure out how to merge your No Alphabets Lingo file with the Show Approval Ratings mod. :toot:
Glad I could help!
User avatar
gastovski
Posts: 79
Joined: Dec 15, '23

Post by gastovski »

Is it possible to convert spells to cantrips? there is a nice paladin overhaul mod on nexus but its a bit tedious to play atm.
User avatar
orinEsque
Posts: 1588
Joined: Oct 9, '23
Location: Narnia

Post by orinEsque »

gastovski wrote: April 16th, 2024, 11:43
Is it possible to convert spells to cantrips? there is a nice paladin overhaul mod on nexus but its a bit tedious to play atm.
@Slavic Sorcerer may be able to answer this question
User avatar
Slavic Sorcerer
Posts: 852
Joined: Sep 9, '23
Location: Poland

Post by Slavic Sorcerer »

orinEsque wrote: April 16th, 2024, 11:53
@Slavic Sorcerer may be able to answer this question
Thanks for tagging me :heart:
gastovski wrote: April 16th, 2024, 11:43
Is it possible to convert spells to cantrips? there is a nice paladin overhaul mod on nexus but its a bit tedious to play atm.
It is possible. I didn't do it (yet), but part of my Cleric and Paladin mod project (still WIP) was converting NPC spells into Player ones.
Converting a spell to a cantrip shouldn't be too different.

What spell you'd want to convert to a cantrip? I could write a guide on the process.
Last edited by Slavic Sorcerer on April 16th, 2024, 13:57, edited 2 times in total.
User avatar
gastovski
Posts: 79
Joined: Dec 15, '23

Post by gastovski »

i think i have figured it out
► Show Spoiler
i have removed spell slot costs so instead converting it only costs bonus action i hope it wont be op later, thanks for response
Post Reply