mistralys / x4-data-extractor
Generate batch files to extract X4 data with XRCatTool.
Installs: 12
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mistralys/x4-data-extractor
Requires
- php: >=8.2
- ext-dom: *
- mistralys/application-utils-collections: >=1.1.6
- mistralys/application-utils-core: >=2.3.11
Requires (Dev)
- phpstan/phpstan: >=1.6.1
- phpunit/phpunit: >=9.5.20
- roave/security-advisories: dev-latest
README
X4 helper: Batch file generator to extract X4 game files with the XRCatTool.
Analyzes a local X4 installation to detect all .cat files for the base game
and installed DLCs, and generates batch files to extract them to the configured
output folder.
Requirements
- PHP 8.2 or higher.
- Composer.
- X Catalog Tool (requires a forum account).
Extracting Game Files
- Clone this repository.
- Copy
dev-config.php.disttodev-config.php. - Edit
dev-config.phpto set the required paths. - Run
composer installto install the dependencies. - Run
composer build-batchesto generate the batch files. - Open the
batchesfolder in the repository root. - Run any of the generated batch files to extract the game files.
Use the
unpack-all.batfile to extract all files at once.
Accessing Extracted Files
Structure
To be able to recognize whether files belong to the base game or a DLC, a folder is created for the base game and each DLC separately. This is important for modding, as changing files belonging to a DLC requires using a matching folder structure in mods.
Information Files
An info.json file is generated in each folder, which provides some basic
information on the source of the files. The helper class DataFolders
can be used to access this information.
This is the JSON generated for the Boron DLC, for example:
{
"id": "ego_dlc_boron",
"label": "Kingdom End",
"isExtension": true
}