diff --git a/games/baldursgate3/lslib_retriever.py b/games/baldursgate3/lslib_retriever.py index 9a7b7af..5a031f0 100644 --- a/games/baldursgate3/lslib_retriever.py +++ b/games/baldursgate3/lslib_retriever.py @@ -25,9 +25,12 @@ def _needed_lslib_files(self): "Divine.dll.config", "Divine.exe", "Divine.runtimeconfig.json", + "K4os.Compression.LZ4.dll", + "K4os.Compression.LZ4.Streams.dll", "LSLib.dll", "LSLibNative.dll", "LZ4.dll", + "Newtonsoft.Json.dll", "System.IO.Hashing.dll", "ZstdSharp.dll", } diff --git a/games/baldursgate3/pak_parser.py b/games/baldursgate3/pak_parser.py index e3757e4..7797df5 100644 --- a/games/baldursgate3/pak_parser.py +++ b/games/baldursgate3/pak_parser.py @@ -154,7 +154,11 @@ def _get_metadata_for_file( f"pak with same name as packable dir exists in mod directory. not packing dir {file}" ) return "" - pak_path = self._utils.overwrite_path / f"Mods/{file.name}.pak" + parent_mod_name = file.parent.name.replace(" ", "_") + pak_path = ( + self._utils.overwrite_path + / f"Mods/{parent_mod_name}_{file.name}.pak" + ) build_pak = True if pak_path.exists(): pak_creation_time = os.path.getmtime(pak_path) @@ -249,7 +253,7 @@ def metadata_to_ini( # 2. it has files in Mods// other than the meta.lsx file, or # 3. it has files in Public/ result = self.run_divine( - f'list-package --use-regex -x "(/{folder_name}/(?!meta\\.lsx))|(Public/Engine/Timeline/MaterialGroups)"', + f'list-package --use-regex -x "(/{re.escape(folder_name)}/(?!meta\\.lsx))|(Public/Engine/Timeline/MaterialGroups)"', file, ) self._mod_cache[file] = ( diff --git a/games/game_baldursgate3.py b/games/game_baldursgate3.py index 03bd8a0..fcc4497 100644 --- a/games/game_baldursgate3.py +++ b/games/game_baldursgate3.py @@ -179,6 +179,7 @@ def _base_dlls(self) -> set[str]: def _on_finished_run(self, exec_path: str, exit_code: int): if "bin/bg3" not in exec_path: return + self.utils.log_dir.mkdir(parents=True, exist_ok=True) if self.utils.log_diff: for x in difflib.unified_diff( open(self.utils.modsettings_backup).readlines(),