Skip to content

Baldur's Gate 3: bug fixes - #240

Open
daescha wants to merge 9 commits into
ModOrganizer2:masterfrom
daescha:bg3-fixes
Open

daescha wants to merge 9 commits into
ModOrganizer2:masterfrom
daescha:bg3-fixes

Conversation

@daescha

@daescha daescha commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Baldur's Gate 3: bug fixes

Fixes in the BG3 plugin. Each one has a unit test under tests/, run with python -m unittest.

  • modsettings.lsx escaping: mod names and folders with &, <, > or quotes produce valid XML.
  • Profile switch: the modsettings.lsx path follows the current profile.
  • LSLib download: the download picks the .zip asset, checks GitHub's sha256 digest, uses a network timeout and overwrites old tools on update.
  • Force-loaded DLLs: mod DLLs load into bg3.exe and bg3_dx11.exe only, not the Larian Launcher.
  • Empty-folder cleanup: nested empty folders are removed bottom-up and the root stays.
  • Data checker: the strongest status across entries wins, so a fixable entry is not hidden by a later valid one.
  • YAML/JSON conversion: unreadable files are skipped with a warning, and files are read and written as UTF-8.
  • File mapping: canceling keeps the modsettings.lsx mapping, and mappings are built per call.
  • Cleanups: isinstance checks, closed file handles in the diff log, and an explicit is_file flag for create_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.

  1. Read paks in Python (diff): reads LSPK v15, v16 and v18 meta.lsx and 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.
  2. Thread-safe metadata parsing (diff): workers parse paks; only the main thread touches Qt, the organizer and meta.ini. Cancel aborts the launch, LSLib downloads only when a pak needs Divine, and the cache stores each pak's size and mtime.
  3. Install and load-order helpers (diff): pak variant picker on install, warnings for out-of-order dependencies and an emptied modsettings.lsx, and an Import Game Mods tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant