Where are the ship configuration files?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Where are the ship configuration files?

Post by BrummBear02 »

Xmf can not be converted to xml. I already said that. Those are two completely different files that do completely different things. I don't know how I can make this any more clear so i won't comment on this any further.

I can offer you to make a extension that adds a copy of the ship you want to edit if you tell me which ship you want. You then can edit the xml files in that extension
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
Buzz2005
Posts: 2298
Joined: Sat, 26. Feb 05, 01:47
x4

Re: Where are the ship configuration files?

Post by Buzz2005 »

I unpacked the game and for example here:

X4 Foundations\unpacked\assets\units\size_s

I have all xml files like ship_gen_s_fighter_01.xml at the end of the directory, so yea you did something wrong if you dont have this files
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Buzz2005 wrote: Wed, 26. Jun 19, 17:17 I unpacked the game and for example here:
X4 Foundations\unpacked\assets\units\size_s
I have all xml files like ship_gen_s_fighter_01.xml at the end of the directory, so yea you did something wrong if you dont have this files
Any speculation as to what might be wrong with the unpack? I didn't see any error message. As far as I know, it went perfectly.

Or whats a batch file code to try again?
Buzz2005
Posts: 2298
Joined: Sat, 26. Feb 05, 01:47
x4

Re: Where are the ship configuration files?

Post by Buzz2005 »

apricotslice wrote: Wed, 26. Jun 19, 17:31
Buzz2005 wrote: Wed, 26. Jun 19, 17:17 I unpacked the game and for example here:
X4 Foundations\unpacked\assets\units\size_s
I have all xml files like ship_gen_s_fighter_01.xml at the end of the directory, so yea you did something wrong if you dont have this files
Any speculation as to what might be wrong with the unpack? I didn't see any error message. As far as I know, it went perfectly.

Or whats a batch file code to try again?
Don't know, I know only that it took a long time to unpack

Delete everything and try again, I followed the tutorial from here
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.
j.harshaw
EGOSOFT
EGOSOFT
Posts: 2200
Joined: Mon, 23. Nov 15, 18:02

Re: Where are the ship configuration files?

Post by j.harshaw »

do you have the CAT tool? XRCatToolGUI.exe, downloadable here:

https://www.egosoft.com/download/x4/bonus_en.php

should be the only downloadable item on that page. this thing?

https://imgur.com/fYe048U
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

j.harshaw wrote: Thu, 27. Jun 19, 20:19 do you have the CAT tool? XRCatToolGUI.exe, downloadable here:

https://www.egosoft.com/download/x4/bonus_en.php
I thought that might be the answer.

The version I had was dated 2016. The one on the Egosoft download page is dated Feb 2019.

Alas. No change.
j.harshaw
EGOSOFT
EGOSOFT
Posts: 2200
Joined: Mon, 23. Nov 15, 18:02

Re: Where are the ship configuration files?

Post by j.harshaw »

Then, with the GUI, import all of the .cat files in your X4 Foundations directory. There should be eleven files, numbered 01.cat to 11.cat. (you won't need the *_sig.cat files, but won't hurt to get those as well.)

Then extract all.

Sorry if you've already done all this, but it sounds like you might be missing some files and would like to cover all of the bases.

To reiterate, using the Argon Discoverer as an example:

The template file of the Argon Discoverer which defines the hardpoint connections on this ship model is:

assets\units\size_s\ship_arg_s_scout_01.xml

Note that this is not the same folder where the .xmf files are.

The macro file of the Argon Discoverer Vanguard which defines the physics characteristics of this ship is:

assets\units\size_s\macros\ship_arg_s_scout_01_a_macro.xml

Just did this myself at home (about time. last time i updated loose files at home was around release.), and can verify that the ship template and macro files are where they're supposed to be.

If you still don't get all of the files, would suggest that you redownload the game, either by verifying integrity if from Steam, or simply reinstalling if from GOG.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

j.harshaw wrote: Fri, 28. Jun 19, 09:28 Then, with the GUI, import all of the .cat files in your X4 Foundations directory. There should be eleven files, numbered 01.cat to 11.cat. (you won't need the *_sig.cat files, but won't hurt to get those as well.)

Then extract all.

Sorry if you've already done all this, but it sounds like you might be missing some files and would like to cover all of the bases.
That did the trick.

Seems the batch version only does half the job.

The Gui version does the whole job.

Thanks. :)
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Anyone know where the cargo bay size is located for corvettes?

Edit: Found it.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Anyone know why the cargo bay size isn't changing?

I've tried editing the the ship's storage file. No change. Changed the ship file to point to an l storage file instead. No change.

Or is it the storage has changed, but the ship information screen is hardcoded?

Anyway other than the ship information screen to tell how much cargo space there actually is?

Or what am I missing?
albysmith
Posts: 37
Joined: Thu, 6. Dec 18, 14:57
x4

Re: Where are the ship configuration files?

Post by albysmith »

apricotslice wrote: Fri, 28. Jun 19, 16:16 Anyone know why the cargo bay size isn't changing?

I've tried editing the the ship's storage file. No change. Changed the ship file to point to an l storage file instead. No change.

Or is it the storage has changed, but the ship information screen is hardcoded?

Anyway other than the ship information screen to tell how much cargo space there actually is?

Or what am I missing?

How are you making the edits? A diff into the storage file to change the cargo number will update in the UI if you've done it right.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <replace sel="//cargo">
    <cargo max="120000" tags="container" />
  </replace>
</diff>
I'm assuming you're using the root extensions folder rather than the one in Documents? Some things don't work right if you put it in the wrong place.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Yes, using extensions, and trying to do it for a game start. I'm pretty sure I've got the folder structure right. But whatever I do, seems to be ignored.

Now actually well into a game, so can it be done on the fly as a once of MD? If so, can you send it to me?
albysmith
Posts: 37
Joined: Thu, 6. Dec 18, 14:57
x4

Re: Where are the ship configuration files?

Post by albysmith »

apricotslice wrote: Sat, 29. Jun 19, 16:11 Yes, using extensions, and trying to do it for a game start. I'm pretty sure I've got the folder structure right. But whatever I do, seems to be ignored.

Now actually well into a game, so can it be done on the fly as a once of MD? If so, can you send it to me?

No, cargo can't be changed by MD, but if you change it in the storage file, it will update when you reload the game, even if you load a save.

Folder structure should look like:
Extensions/MODFOLDER/assets/units/size_s/macros/STORAGEFILE

And also in your mod folder you need to include a contents.xml file to name your mod, etc. The game doesn't recognize the mod without it.
albysmith
Posts: 37
Joined: Thu, 6. Dec 18, 14:57
x4

Re: Where are the ship configuration files?

Post by albysmith »

You can also join the discord server to talk with other modders and ask questions there, too: https://discord.gg/WM5sAs
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

albysmith wrote: Sat, 29. Jun 19, 17:20 Folder structure should look like:
Extensions/MODFOLDER/assets/units/size_s/macros/STORAGEFILE

And also in your mod folder you need to include a contents.xml file to name your mod, etc. The game doesn't recognize the mod without it.
The folder path is correct. Except I'm modding an m ship.

There is a content.xml not a contents.xml. Which is right?

The mod does work. I get a custom start and the ship changes.

Just not the cargo bay change.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Cargo problem sorted in Discord.

Apparently the par m storage files dont like being copied into a mod.

But a diff file worked when I finally got the syntax right.

Main issue for me, I had no idea diff files existed. I saw them, but had no idea what it was. :oops:

Anyway, problem solvered.

Thanks to those who helped.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

Interesting side effect of making the cargo bay larger.

I put 34000 in it, and suddenly my Corvette is behaving like a drunk dog. Slow to speed up, and all over the place when trying to turn. Using travel was an exercise in WTF writ large.

Interesting. Kind of puts you off hauling cargo in your medium fighter. :lol:
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Where are the ship configuration files?

Post by BrummBear02 »

thats because your ship gains mass. edit the drag values in the macro file to compensate for that i guess.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: Where are the ship configuration files?

Post by apricotslice »

BrummBear02 wrote: Mon, 1. Jul 19, 02:37 thats because your ship gains mass. edit the drag values in the macro file to compensate for that i guess.
Good point. Thanks.

Return to “X4: Foundations - Scripts and Modding”