X4: Foundations

File information

Last updated

Original upload

Created by

MacBain

Uploaded by

MacBain81

Virus scan

Safe to use

Tags for this mod

About this mod

The X4 Editor shows many values of different items and entities in game. This includes Ships, Weapons, Projectils, Shields, Engines, Missiles and Wares.
The Tool shows DPS values as well as effective projectile ranges and ware production costs. It can also export changes made to the items into a separate mod.

Permissions and credits
Changelogs
X4 Editor

WARNING:
Rule number 1: Before you use this tool, be sure to have a BACKUP of your mods you want to open in the Editor. I am not responsible for any data loss due to bugs or wrong usage of the tool.


Precondition:
Extract all X4 and Mod Data you want to use so the X4 Editor can read the files (do this with the "X Rebirth Catalog Tool 1.10").

Patreon support:
If you like my work, and if you want to support me with some money, you can now be my patreon :) https://www.patreon.com/user?u=52126891&fan_landing=true

How to use:


  • Set the vanilla folder path to the folder where you extracted the X4 vanilla data into. Then click on Read Vanilla. This will show you all vanilla data for the specified tables.
  • Set Mod folders. The tool supports an optional base mod and an active mod to be loaded into the editor. First enter the base mod path if needed and then your active mod path. Both is optional, but the base mod path can not be the export path.
  • Edit or just compare the values in the tables.
  • If you want to export your changes, set the export path the folder of your mod. This must be the active mod folder or a totally new folder. Simply click on export and thats it.



Features:

  • The X4 Editor shows most (not all) values for Ships, Weapons, Projectiles, Missiles, Shields, Engines and Wares in a compact and simply to compare view
  • Additionally the tool shows calculated values like DPS, DPS to shield, effective projectile range, production costs and margin of wares
  • For ships it shows the number of shields, turrets and weapons slots mountable on the ship
  • It makes it simple to find the values of a specific item by showing in game names if accessible (the 0001.xml file needs to be inside the "t" folder) 
  • It offers several filter options to search specific items including item size or the option to filter for words in the name or ID of the items
  • The separate wares window can be set to show only the wares related to the filtered items of the main window
  • Mass edition/calculation over multiple selected cells is possible
  • Right click opens the related xml file in the oposite order of the loaded mods. So if the item you right click on was edited by the Active Mod, then this item xml file will be opened. If Active Mod has not changed the item at all but the BAse Mod did, then the file of Base Mod will be opened. If neither of these mods has edited the item, then the vanilla file will be opened.
  • Double Click on a weapon/turret filters the related projectil
  • Double Click on a projectile filters the related Turret/weapon
  • The X4 Editor saves your path and filter settings in a config file to make it as easy as possible to use
  • If no content.xml file in your export folder exists, the tool will generate a default one.


If you only want to compare and check different values of several items of vanilla X4 and mods, there is no danger in using this mod. It is the perfect tool for you!
You can skip the next part.
If you want to create a mod based on other mods or vanilla X4 and this mod does not exist yet, there should not be any problem. Simply put a new export folder path and thats it.
You can also skip the next part.

If you have a mod with new content as active mod or export folder, then you should read the next section carefully!


Known Problems/Dangers 

The mod will only create diff files with changed parameters of the file in that session. Only changes compared to all read mod files will be written. For example I changed the rotationspeed and rotationacceleration of the shotgun in the editor. This will result in the creation of the xml file turret_arg_m_shotgun_01_mk1_macro.xml including following lines.

<?xml version="1.0" encoding="utf-8"?>
<diff> 
<replace sel="//macros/macro/properties/rotationspeed/@max">200.00</replace>
<replace sel="//macros/macro/properties/rotationacceleration/@max">2.00</replace>
</diff>

If one of the mods is editing another mod (for example modA) inside an extension folder, this will produce a problem. The files will be written correctly, but they will not land inside the correct extension/mymod/extension/modA folder. Please check the files and move them accordingly.



Export path same as active mod path problem!
If you have already created a mod that adds new content like weapons, shields or ships and you set the export path to this mod because you want to edit your mod, the X4 editor will not check that the new content is new. Lets say you added a ship file for a new ship and load the mod in X4 Editor. If you dont edit any property of the ship and export the mod, then you dont have any problems because the file will not be written. But if you edit a property like hull value of that new ship and export the mod this will result in a similar file as you see above with just the hull value changed. The old xml file including all other values is then totally overwritten and destroyed! Therefore... 

=> Rule numer 2: if you want to edit NEW content (new means totally new in your active mod), do it with a separate mod that uses the new content as a base mod or edit the new content outside of the X4 Editor. Simply right click on the item and the xml file will be opened. Be careful to reload the mod after this if you want to see the changes made outside the tool because all other not exported changes are gone then.

Not 100% tested! 
During the long developement of the tool, I found several hundreds of bugs that I all could fix, but that shows that there might be more hidden. So always keep a copy of you mod you are writing into, especially if you have a big one. Errors might appear to a later time, even when the mod seems to tun flawlessly.