This tool allows you to build gate connections for the game X4 Foundations. It helps players create connections between any sectors in the game. The tool generates a mod (extension) for the game, which can be easily installed and uninstalled.
Features
- Build gate connections between any sectors in the game.
- Select sectors from a list or from the Galaxy map.
- Create any number of connections, where a connection is a pair of gates in two sectors.
- Easily arrange the location of gates in sectors by moving them on the map using the mouse.
- Easily rotate the gates in sectors by using the mouse.
- Direct mode - when you need only to select a game folder and start building connections. Nothing to extract.
Anyone can use the gate connections built by this tool in their mods or simply in the game.
If you use the connections in mods, please mention the author and the tool in the mod description.
Installation
Simply download the latest version and extract it to any folder.
You can start building your connections right away.
Usage
Direct Mode
In the Direct Mode, you don't need to extract the game files. You just need to select the game folder and start building the connections.
In this case the tool will load the game data directly from the game files. And will work only with the "Chem Gate Keeper" mod in the game Extensions folder. You will be able only to save it, without possibility to select its location.
Direct Mode First Start
On the first start, the tool will inform you that you need to select the game folder, and will switch to the options menu tab.
If you will unselect Direct Mode- you will go via start process described below in the First Start section.
After selecting the game folder, the tool will start loading the game data.

Direct Mode First Mod Creation
After loading the game data, you will see the main window and can start building the Gate connections.
When you will be finish with the connections, you can save the mod via the Mod -> Save menu item.
Mod will be saved in the game Extensions folder.

On the next starts tool will automatically load not only game data, but also the "Chem Gate Keeper" mod data. So, after starting you will see the main window with the connections from the mod.
You can update the connections, add new ones, or remove the existing ones. After that you can save the mod via the Mod -> Save menu item.

At any time you can switch between the Direct Mode and the Usual Mode. Just go to the options menu and select or unselect the Direct Mode checkbox.
In some cases it will require to load the extracted game data again.
First Start
On the first start, the tool will inform you that you need to select the folder with the game files.
If you will unselect the Direct Mode - you will go via the start process described below.
And when you press a button to select the folder, the tool will propose two ways to do it:
- Select the extracted game folder. If you already have it - simply press the "Yes" button.
- Extract the game files. If you don't have the game files extracted, you can press the "No" button to initiate the extraction.
After selecting the folder, the tool will start loading the game data.

Without Extracted Game Files
You will be forwarded to the menu containing the button to start the extraction. Please press it to start the extraction.
Now everything is simple:
- Select the folder with the game files.
- Select the folder where will be placed new folder with the extracted game files. It will be created automatically with a name containing the current game version. Like "X4v710-extracted".
- Press the "Extract Data" button.

- Extract only needed data - this will extract only the data needed for the tool to work. It will be faster than the full extraction.
- Verify extracted data - this will check the consistency of the extracted data. Recommended to use it every time you extract the data.
- Overwrite existing files - this will overwrite the existing files in the output folder. Again, recommended to use it every time you extract the data.
- Set as source and load after extraction - this will set the extracted folder as the source for the game data and load it after the extraction.
Loading the Mods with the Game Data and DLC's
On the options page there is a checkbox which allows you to load the mods with the game data and DLC's. This is useful if you want to work with the mods in the tool. The mods will be loaded from the extensions folder in the game data. Can be extracted the same way as the game data and DCL's.
Available from version 0.7.0.
Updated in version 0.8.1.
Data Loading Important Notice
From version 0.7.0 the tool requires the content.xml files for the DLC's and Mods in the extracted game data.
The tool will extract them automatically for DLC's. If you have an extracted data by previous version of a tool (before v0.7.0)- please repeat the process.
Reloading the Game Data
If you need to reload the game data, especially if the Mod or DLC was updated (for example, if you are mod developer, and want to know how the galaxy map will look after your changes) - you can do it via the X4 Data -> Reload menu item.
Available from version 0.10.2.
Main Window
After starting, you will see the main window with a list of connections and an area to define a gate connection, i.e., two areas to define the gates in the two sectors.
The new gates are already shown on the map in the default position in the sector center.

Direct Sector Selection and Simple Map
To start, simply select any sector from the list in the Direct Sector group.
Then the items from the selected sector will be displayed on the raw and simple sector map and as a list on the right side of the map.
Existing gates are displayed as yellow gate icons from the game. Gold ones are from the currently edited mod. Green represents the currently edited gate.
In addition, the SuperHighway gate and stations from the god.xml will be displayed.
The background of the sector map matches the color of the sector owner in the game.
Define Gate Location
You can define the gate location by pressing the left mouse button on the gate and moving it to the desired location.
A more precise position can be set by entering the coordinates and rotation angles.
Please note that the coordinates are split into two parts:
- Coordinates themselves, in km (this is the appropriate zone position in the sector).
- Position - the position from the coordinates point in meters (this is the position of the gate in the zone).

The rotation of the gate can be defined using three angles: Yaw, Pitch and Roll.
Pitch is the most important one, as it defines the direction the gate is facing in the sector. Yaw and Roll are generally not needed for most cases, but can be used for specific scenarios.
Here is an explanation of each:
- Yaw: This is just the clockwise/counterclockwise rotation of the ring. A value of 90 would put the side pods of the ring at the top and bottom instead and so is also generally unnecessary and can be left at 0 in most cases.
- Pitch: This is the left/right rotation of the ring and is the one to actually use if you want to face the ring in a certain direction on the map. A Pitch of 0 degrees has the ring facing North and the connection line on the map coming out of the south side of the ring. +45 degrees has the ring turn right to face North-East with the map line going to the South-West. While ship traffic doesn't care which way the map line is facing, it does make the map a bit wild and unnecessarily cluttered if it's facing the wrong way. Also, you can't enter more than 180 degrees in the box, so if you want to face west you must use a negative value. And oddly, you can't type in a negative sign (-) without a value already in the box. For example, -135 would face the gate South-West with the map line going North-East.
- Roll: This is the forward/backward pitch of the gate and so is generally unneeded unless the gate is well above or below the plane of the sector. It can typically just be left at 0.
You can rotate the gate by pressing and holding the right mouse button on the new gate icon on the map and moving the mouse around. Increasing the distance from the center of the gate will increase the rotation accuracy.

Gate orientation on a Galaxy Map
Orientation of the gate on the Galaxy Map is displayed by the Pitch angle.

Extended Sector Map
If the current sector map size is too small for you, you can press the appropriate button to open the extended sector map.
On this map, you can set the gate location in the same way as on the simple map, but more precisely.

Under the sector map, there is a slider to change the sector map "real" size. This is effectively the scale of the sector map.

You can define rotation angles for the gate and set the status of the gate. For some reason, you can deactivate it (if you plan to use it in your own scenarios).
Opposite Sector Selection
Now you can select the second sector and define the gate location in it.
Please note that in the selection list for the second (Opposite Sector), some sectors will be grayed out and not available for selection. This is because the sector is already selected as the first sector or they already have a connection with the Direct Sector.

Add Gates Connection
Simply press the Add button.

Modify Existing Connection
If you move the gate in the sector for the existing connection, you will see two "identical" gates on the map.
One (gold) is the gate from the connection, and the other (green) is the gate in the new location.

There are two buttons at the bottom of the window:
- Add/Update - to add the gate connection to the list. We already discussed it.
- Reset - to reset the gate data fields to the default values. See below for more information.
If you have no selected gate connection in the list, the reset button will reset all gate connection-related information to the defaults, mostly empty or zero values.
Otherwise, it will reset the gate data fields to the values of the selected connection.
Map Objects Tooltips
You can hover over the map objects to view additional information about them, such as their status, coordinates, and related connections. This feature helps in better understanding the relationships between different gates and sectors.

The Galaxy Map allows you to navigate through various sectors in the game. You can zoom in and out to view details about each sector and the gates within them. Using the map, you can select sectors to use in the gate connections.

- Use the slider at the top of the map.
- Use the mouse wheel while holding the Ctrl key.
When you click the left mouse button on a sector, it will be selected as the direct or opposite sector in the connection. If the selected sector is not available for the connection, like grayed-out sectors in the dropdown lists, the tool will do nothing.
Note: If you cannot see the sector you need on a map, but is is available in the list - it is probably because the located in cluster which coordinates cannot be aligned to the hexagonal grid. It will be a possible problem in appropriate Mod or DLC.
Clusters and sectors tooltips
You can hover over the clusters and sectors on the map to view additional information about them:
- For clusters you can see a name, macro and coordinates.
- For sectors you can see a name, owner, sunlight, economy, security, macro and coordinates. Additionally information about parent cluster is shown.

Hiding and showing the DLC's and Mods on a map
You can toggle the visibility of DLCs and Mods on the map to focus on your current editing tasks. This feature allows you to clearly see the connections you are working on without distractions from additional content. Use the map options menu to show or hide these elements according to your needs.

Showing an empty cluster cells
You can toggle the visibility of empty cluster cells on the map. This feature allows you to see the empty cells where a new cluster can be placed. Use the map options menu to show or hide these elements according to your needs. Additionally, you will have the possibility to see the coordinates of such cells on the appropriate tooltip.

When you finish with the connections, you can save the mod via the Mod -> Save menu item. Please ensure you have completed all necessary edits before saving to avoid losing data. If the connections are not finalized, the save option may be disabled.
Please note that if you have not finished editing the connections, this menu item will be disabled. Save the current connection or reset it to have the ability to save the mod.
After selecting the Save menu item, the tool will ask you to select the output folder for the mod.

Load the Mod
If you have a previously saved mod, you can load it via the Mod -> Load menu item.
The difference from saving the mod is that you have to select the content.xml file in the mod root folder in contrast to selecting the output folder.
This was made to avoid selecting the wrong folder.

Overview New Gates in the Tool and in the Game
There is a short overview of the mod in the tool to see the gate locations.





- EGOSOFT - for the game itself (In fact - for the series of games)!
- Members of the x4_modding discord channel - for the answers, support, ideas and inspiration!
- SiliconStew - for the documentation of the Gate Rotation specifics!
Please report any issues or bugs encountered while using the tool. You can submit your reports through the GitHub repository Issues. Your contributions help improve the tool for everyone!
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.