A tool designed to help merge multiple STALKER 2 mods, resolving conflicts between pak files automatically where possible and providing tools for manual merging where needed.
- Automatic display and detection of mod conflicts for each conflicting file (cfg file, etc)
- Visual file tree display of all mod contents
- Automatic merging of non-conflicting files
- Guided manual merging process for conflicting files using WinMerge
- Automatic backup creation of original pak files (with *.pakbackup filename extension)
- Validation of merged pak files
- Detailed logging and error handling
- Python 3.11 or newer installed and added to system PATH
- WinMerge installed (https://winmerge.org/) (installed in users local appdata folder but can be installed anywhere)
- Repak CLI tool installed GitHub link: https://github.com/trumank/repak/releases/download/v0.2.2/repak_cli-x86_64-pc-windows-msvc.msi
- Simply drag and drop your .pak files onto "1 drag & drop pak files onto this bat file.bat"
- The tool will automatically start processing the pak files
- Merged pak file is saved as "ZZZZZZZ_Merged.pak" in your mods folder
- Original pak files are automatically backed up with .pakbackup extension
- The tool creates temporary directories during the merge process
- A validation report is generated after merging
-
When you open the cfg files to compare, differences are automatically highlighted
-
Use Alt + Up/Down arrow keys on your keyboard to jump to each difference
-
For each difference: Alt + Left arrow key copies changes from left file to the right file and Alt + Right arrow key copies changes from right file to the left file
-
make sure you copy all changes you want saved to the same cfg file each time
-
Use Ctrl + D to focus only on differences when files are large
Pro Tip: If you're comparing large files, start with Ctrl + D to show only differences, then use Alt + Up/Down to navigate through changes more quickly.
(needed only if mods folder not found in common default locations)
-
Download and extract the tool to a convenient location
-
Open "1_Python_Merging_s2hoc.py" in a text editor Locate the following line near the top:
CUSTOM_MODS_PATH = r"E:\s2hoc\Stalker2\Content\Paks\~mods"Change the MODS path to match your STALKER 2 mods folder location
- The tool analyzes all provided pak files for conflicts
- Non-conflicting files are automatically merged
- For conflicting files: must use winmerge to review each file (most reliable method by far) • Files are extracted to a temporary folder in the same spot your pak files are in • User opens WinMerge for manual conflict resolution • Follow the on-screen instructions to merge conflicts
- Original conflicting pak files are renamed to .pakbackup after the merge process fully completes
- A new merged pak file (ZZZZZZZ_Merged.pak) is created
- If WinMerge isn't found, verify its installation path
- Check the validation_report.txt for details about any merge issues
- If a merge fails, original .pakbackup files can be renamed back to .pak
- corrupt_paks.log will list any corrupted pak files encountered
- Requires manual intervention for resolving complex conflicts
- WinMerge must be installed for conflict resolution
For issues or questions, please post in the comments section. Include any relevant error messages and the contents of validation_report.txt if applicable.
I wanted a extended version of the original python script, and with more verification and validation of files.