Download the PHP package mistralys/x4-core without Composer

On this page you can find all versions of the php package mistralys/x4-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package x4-core

X4 Database Core

Database and utility classes used to access X4: Foundations game data in an OOP way. It is designed to be used as a dependency in other projects (see X4 Tools, for example).

Version

Current Version: 1.0.1 Documentation: Project Manifest

Database features

Requirements

Installation

Require the package in your Composer project:

Usage

Raw JSON data files

All extracted game data is stored in JSON files in the data folder.

The faction classes

All factions available in the game can be accessed through the faction collection.

The faction collection

All factions are available through the FactionDefs collection class.

Faction getter methods

When working with the faction classes, dedicated getter methods exist to access factions instead of using the faction ID constants.

The ware classes

All items available in the game, from trade goods to ships, are available in the main ware collection.

The ware collection

All wares are available through the Wares collection class.

This fetches wares by ID:

The ware finder

The ware finder utility class allows selecting search criteria to filter the wares and retrieve specific wares. The following example uses the ware finder to retrieve all ship engines provided by the Boron DLC.

The ship classes

All ships available in the game can be accessed through the ship collection.

Accessing translations

The official translations are bundled with the package, and can be accessed to translate text codes like {20101,20604} ("Manorina (Gas) Vanguard").

Development setup

Unpacking game data files

The mod requires the game's data files to be unpacked using the X4 Data Extractor tool. The tool acts as a library to access the extracted information. This includes the DLC metadata necessary to generate the correct mod file structure.

Please refer to the tool's instructions to unpack the game data files.

Configuration

  1. Unpack the data files (see above).
  2. Clone this repository.
  3. Copy dev-config.php.dist to dev-config.php.
  4. Edit the file to set the correct paths.

Database update

To update the bundled database, use the build Composer command to update the JSON files in the data folder.

X4 Tools and libraries


All versions of x4-core with dependencies

PHP Build Version
Package Version
Requires components/jquery Version >=3.5.1
fortawesome/font-awesome Version ^5.15
mistralys/application-utils Version >=2.3.2
mistralys/application-utils-core Version >=2.3.12
mistralys/application-localization Version >=2.1.1
mistralys/x4-data-extractor Version >=2.0.0
symfony/css-selector Version >=v7.2.0
thomaspark/bootswatch Version ^v5.1.3
twbs/bootstrap Version ^v5.1.3
php Version >=8.4
ext-simplexml Version *
ext-json Version *
ext-mbstring Version *
ext-dom Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mistralys/x4-core contains the following files

Loading the files please wait ...