Modern PakRat-style tool for editing the PAKFILE lump inside Source .bsp maps.
It includes:
- Native Windows GUI
- CLI for scripting and automation
- Built
.exelauncher
Recommended launch options:
- Run the compiled app:
PakRatModern.exe
- Or run the PowerShell GUI script directly:
powershell -ExecutionPolicy Bypass -File .\pakrat_modern_gui.ps1Quick workflow:
- Open a
.bspand it loads automatically - Set
Game Path - Click
Scan - Review missing files and use
Add allorAdd all + Save - Save in place or use
Save As...
Main GUI features:
- PakRat-style embedded file list with
In,Name,Path,Size,Type - Dark theme UI
- Sortable list headers
- Tree/List toggle
- Add files and folders
- Drag and drop support
- Edit internal PAK paths
- Delete selected entries
- Extract selected entries
- PAK verification
- Scan map references from BSP data
- Skip files that are already shipped in the selected game's base VPKs and
gameinfo.txtsearch paths - Auto-add addable missing files
- Scan summary bar: missing, addable, not found, already in PAK
- Export scan results to
.txt - Remembered game paths with path manager
- Optional
.bakbackup before in-place save
Optional extras currently checked by scan:
maps/<mapname>.navmaps/<mapname>.txtresource/overviews/<mapname>.txtresource/overviews/<mapname>.ddsresource/overviews/<mapname>_radar.ddsmaterials/overviews/<mapname>.vmtmaterials/overviews/<mapname>.vtfmaterials/overviews/<mapname>_radar.vmtmaterials/overviews/<mapname>_radar.vtf
Main CLI script:
PowerShell wrapper:
The wrapper uses local Python 3 when available and falls back to WSL python3.
Examples:
powershell -ExecutionPolicy Bypass -File .\pakrat_modern.ps1 list C:\path\map.bsp
powershell -ExecutionPolicy Bypass -File .\pakrat_modern.ps1 verify C:\path\map.bsp
powershell -ExecutionPolicy Bypass -File .\pakrat_modern.ps1 extract C:\path\map.bsp --out C:\path\pak_out
powershell -ExecutionPolicy Bypass -File .\pakrat_modern.ps1 add C:\path\map.bsp C:\path\materials --base C:\path\materials --out C:\path\map_packed.bsp
powershell -ExecutionPolicy Bypass -File .\pakrat_modern.ps1 remove C:\path\map.bsp materials/custom/test.vmt --out C:\path\map_stripped.bspBuild script:
Manual build:
powershell -ExecutionPolicy Bypass -File .\build_pakrat_modern_gui.ps1
powershell -ExecutionPolicy Bypass -File .\build_release.ps1Output files:
PakRatModern.exePakRatModern.exe.config
Release package:
release\PakRatModern\release\PakRatModern-release.ziprelease\PakRatModern\PakRat Modern.lnk
- Does not rebuild the whole BSP from scratch
- Updates
PAKFILEand adjusted lump offsets only - Blocks unsafe PAK resize if
LUMP_GAME_LUMPis after the PAK lump - Prevents unsafe extraction paths like
../ - Blocks unsafe Windows path characters in internal PAK paths
- Applies size and entry-count limits while reading packed ZIP data
- Supports validation before saving
- Supports optional
.bakbackup for in-place save
