--- title: X Catalog Tool: extracting and packing summary: Open CAT/DAT archives, extract selected files and build a separate extension package. section: tools kind: guide status: reference updated: 2026-10-27 tags: ["X4","modding","tool","catalog"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/X%20Catalog%20Tool/","https://www.egosoft.com/download/x4/bonus_en.php"] --- ## Purpose and preparation The official tool is available from Egosoft Bonus Material or Steam Library with Tools enabled. XRCatToolGUI.exe provides inspection; XRCatTool.exe supports repeatable builds. CAT is the index and DAT stores data; keep the pair together. ## First exercise 1. In the GUI use Import catalogs to open a CAT/DAT pair. 2. For current data consider all numbered catalogs: later inputs override matching earlier entries. DLCs have their own catalogs. 3. Select entries and Extract with the folder hierarchy preserved. Keep reference files separate from edits. 4. Set $Game and $Tool to your own paths. The example extracts schema/MD paths from numbered base catalogs. ```powershell New-Item -ItemType Directory -Force -Path .\reference $Catalogs = Get-ChildItem -LiteralPath $Game -Filter '*.cat' | Where-Object BaseName -Match '^[0-9]+$' | Sort-Object Name & $Tool -in $Catalogs.FullName -out .\reference -include '^libraries/' '^md/' ``` ## Expected result reference receives matching files with their paths preserved; game archives are unchanged. To pack, use a prepared content folder as -in and a new ext_01.cat as -out; keep content.xml beside the archive. ## Checks and limits Create the output folder first. -include uses regular expressions rather than *.xml globs. -diff compares catalog content; it does not produce an XML patch. Check package contents and Failed reading messages as well as exit status. Next: [XML patches](wiki:xml-patches).