Repository navigation
Conversation
added 9 commits
October 9, 2026 01:06
Names with & < or " produced an invalid modsettings.lsx.
Extraction overwrites existing files and keeps Packed/Tools subfolders. Download uses a timeout, picks the .zip asset, checks GitHub's sha256 digest and always closes its progress dialog.
A cached path kept writing the first profile's file after a switch.
Contributor
Author
|
@Holt59 ready for review when you have time. |
Contributor
Author
|
Wiki plan: after this PR merges, add the page below as The Proposed page[PCGamingWiki](https://www.pcgamingwiki.com/wiki/Baldur%27s_Gate_3) | [Nexus Mods](https://www.nexusmods.com/baldursgate3)
## Current Support
* Pak mods (`Mods\*.pak`), with load order written to `modsettings.xml` on every launch
* Script Extender and its config files (`Script Extender` folder)
* Native DLL mods (`bin`), force-loaded without Native Mod Loader
* Loose file override mods (`Data`)
* Mod workspaces: unpacked mod folders are built into paks on launch
* Pak metadata (name, UUID, version, dependencies) read with [LSLib](https://github.com/Norbyte/lslib), downloaded on first use
* Executables: DX11, Vulkan and Larian Launcher
* Savegames in `PlayerProfiles\Public\Savegames\Story`
## Mod Installation
The plugin sorts archive contents into these folders. Most mods from Nexus install without changes.
| Mod folder | Virtual Mapped Path |
| ----------------- | --------------------------------------------------------------------- |
| Mods\\*.pak | %LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\Mods |
| Script Extender | %LOCALAPPDATA%\Larian Studios\Baldur's Gate 3\Script Extender |
| bin | Baldur's Gate 3\bin |
| Data | Baldur's Gate 3\Data |
Files the game writes (`LevelCache`, `Stats`, `Temp`, `GMCampaigns`, Script Extender logs) go to Overwrite.
## Load Order
* The left pane order is the pak load order.
* MO2 rebuilds `modsettings.xml` before each executable starts. Do not manage it with another mod manager at the same time.
* Dependencies come from each pak's `meta.lsx`. Run **Tools → BG3 Tools → Reparse Pak Metadata** after editing a pak by hand.
## Script Extender
* Install [BG3 Script Extender](https://github.com/Norbyte/bg3se) as a normal mod; MO2 puts its `DWrite.dll` in `bin`.
* Launch through the MO2 executables, not Steam or the Larian Launcher, so the VFS is active.
* Optional: enable `convert_yamls_to_json` to edit Script Extender mod configs as YAML. **Tools → BG3 Tools → Convert JSONS to YAML** converts existing configs.
## Plugin Settings
Under **Settings → Plugins → Baldur's Gate 3**.
| Setting | Default | Effect |
| ------- | ------- | ------ |
| force_load_dlls | true | Force-load every DLL in active mods |
| autobuild_paks | true | Build pak-like folders into paks on each run |
| delete_levelcache_folders_older_than_x_days | 3 | Clean old `Overwrite\LevelCache` entries; negative disables |
| remove_extracted_metadata | true | Delete extracted `meta.lsx` files after parsing |
| extract_full_package | false | Extract the whole pak when parsing metadata |
| convert_yamls_to_json | false | Convert YAML configs to JSON on each run |
| log_diff | false | Log a diff of `modsettings.xml` before and after the game runs |
## Tools
Under **Tools → BG3 Tools**:
* **Check For LsLib Updates**: download the latest LSLib release
* **Reparse Pak Metadata**: reread metadata of all active paks now
* **Convert JSONS to YAML**: convert JSON configs in active mods to YAML
## Troubleshooting
* Mods missing in game: enable `log_diff` and check whether the game rewrote `modsettings.xml`.
* LSLib download fails: run **Check For LsLib Updates**, or place LSLib in the plugin's `tools` folder.
* A mod shows as invalid: it lacks `Mods\*.pak`, `bin`, `Script Extender` or `Data` at its root; fix the folder layout in the installer.
Version Changelog:
* MO v2.5.x: Added plugin
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Baldur's Gate 3: bug fixes
Fixes in the BG3 plugin. Each one has a unit test under
tests/, run withpython -m unittest.&,<,>or quotes produce valid XML.modsettings.lsxpath follows the current profile..zipasset, checks GitHub's sha256 digest, uses a network timeout and overwrites old tools on update.bg3.exeandbg3_dx11.exeonly, not the Larian Launcher.modsettings.lsxmapping, and mappings are built per call.isinstancechecks, closed file handles in the diff log, and an explicitis_fileflag forcreate_dir_if_needed.Follow-up PRs
Three more PRs build on this one and open after it merges. Each link shows only that branch's own commits.
meta.lsxand file lists in Python, and uses Divine only for Zstd, solid or corrupt paks. Adds an Extract Pak tool, and runs Divine with an argument list and a timeout.meta.ini. Cancel aborts the launch, LSLib downloads only when a pak needs Divine, and the cache stores each pak's size and mtime.modsettings.lsx, and an Import Game Mods tool.