{"id":30622506,"url":"https://github.com/mistralys/x4-data-extractor","last_synced_at":"2026-04-06T07:01:50.299Z","repository":{"id":297437162,"uuid":"996744737","full_name":"Mistralys/x4-data-extractor","owner":"Mistralys","description":"Batch file generator to extract X4 game files with the XRCatTool including DLC metadata.","archived":false,"fork":false,"pushed_at":"2026-01-25T16:11:13.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-26T05:57:01.034Z","etag":null,"topics":["extract-data","unpacker","x4foundations"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mistralys.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-05T11:57:12.000Z","updated_at":"2026-01-25T16:10:49.000Z","dependencies_parsed_at":"2025-08-30T15:41:48.650Z","dependency_job_id":"7d1d03e4-5372-47a6-a16e-4e7c4515d76a","html_url":"https://github.com/Mistralys/x4-data-extractor","commit_stats":null,"previous_names":["mistralys/x4-data-extractor"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Mistralys/x4-data-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fx4-data-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fx4-data-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fx4-data-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fx4-data-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mistralys","download_url":"https://codeload.github.com/Mistralys/x4-data-extractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fx4-data-extractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extract-data","unpacker","x4foundations"],"created_at":"2025-08-30T15:41:31.537Z","updated_at":"2026-04-06T07:01:50.294Z","avatar_url":"https://github.com/Mistralys.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X4 Game Files Extractor\n\nX4 helper: Batch file generator to extract X4 game files with the XRCatTool.\n\nAnalyzes a local X4 installation to detect all `.cat` files for the base game \nand installed DLCs, and generates batch files to extract them to the configured \noutput folder.\n\n## Requirements\n\n- PHP 8.2 or higher.\n- [Composer](https://getcomposer.org/).\n- [X Catalog Tool][] (requires a forum account).\n\n## Extracting Game Files\n\n1. Clone this repository.\n2. Copy `dev-config.php.dist` to `dev-config.php`.\n3. Edit `dev-config.php` to set the required paths.\n4. Run `composer install` to install the dependencies.\n5. Run `composer build-batches` to generate the batch files.\n6. Open the `batches` folder in the repository root. \n7. Run any of the generated batch files to extract the game files.\n\n\u003e Use the `unpack-all.bat` file to extract all files at once.\n\n### Delete Output folder first\n\nTo ensure a clean extraction, delete the output folder\nfirst. You can use this command in PowerShell:\n\n```ps\nRemove-Item -Recurse -Force output\n```\n\n\u003e NOTE: This will run for a while without any progress indication.\n\n## Accessing Extracted Files\n\n### Structure \n\nTo be able to recognize whether files belong to the base game or a DLC,\na folder is created for the base game and each DLC separately. \nThis is important for modding, as changing files belonging to a DLC \nrequires using a matching folder structure in those mods.\n\n### Programmatic Access\n\nWhen used as a library (installed via Composer), the `X4GameInfo` \nclass can be used to easily access information on the game and\nthe available extensions.\n\n```php\nuse \\Mistralys\\X4\\ExtractedData\\X4GameInfo;\n\n$gameInfo = X4GameInfo::create();\n\n// The game version, e.g. `8.0.0.0`\n$version = $gameInfo-\u003egetGameVersion();\n\n$dataFolders = $gameInfo-\u003egetFolderCollection();\n\n// Show a list of all data folders\nforeach($dataFolders-\u003egetAll() as $folder)\n{\n    echo $folder-\u003egetLabel().PHP_EOL;\n}\n```\n\n### Locally Extracted Folders\n\nWhen working with a local copy of extracted folders (with\nthis tool), set the path to the folder to access the full \ndata folder paths to get at the files contained within.\n\n```php\nuse \\Mistralys\\X4\\ExtractedData\\X4GameInfo;\n\n$folders = X4GameInfo::create()\n    -\u003esetExtractedDataFolder('/path/to/output/folder')\n    -\u003egetFolderCollection();\n\nforeach($folders-\u003egetAll() as $folder) {\n    $path = $folder-\u003egetPath();\n}\n```\n\n### Manual Access \n\nAn `info.json` file is generated in each folder, which provides some basic\ninformation on the source of the files. This is the JSON generated for the \nBoron DLC, for example:\n\n```json\n{\n  \"id\": \"ego_dlc_boron\",\n  \"label\": \"Kingdom End\",\n  \"isExtension\": true\n}\n```\n\n[X Catalog Tool]: https://www.egosoft.com/download/x4/bonus_en.php?download=598\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistralys%2Fx4-data-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistralys%2Fx4-data-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistralys%2Fx4-data-extractor/lists"}