What tools do i need as of 6.2 ?

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

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

Post Reply
Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

What tools do i need as of 6.2 ?

Post by Poacher886 » Thu, 2. Nov 23, 21:06

Hi, so im wanting to create a few Paint mods, by adjusting some existing paint mods, i.e just open up the file of some i dont like and adjust to my specs then put them back in. Im also wanting to adjust a few stats mainly pricing in VRO.

It seems i need to open .dat files to access the data required for this.

What tools do i need to open the .dat files, and in case of VRO, some sort of editor to adjust the stats as of 6.2, as a lot of the tools im seeing like X4 Editir seem very old and suspect if they still work.?

Thanks

Caldari Navy
Posts: 68
Joined: Tue, 18. Jul 23, 18:43

Re: What tools do i need as of 6.2 ?

Post by Caldari Navy » Fri, 3. Nov 23, 10:28

For dat files
X catalog tool on the bottom
https://www.egosoft.com/download/x4/bonus_en.php


And for xml notepad or notepad ++

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Fri, 3. Nov 23, 17:13

Thanks for this

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Sat, 4. Nov 23, 17:19

Ok Im needing some help if possible.

Im guessing this should be an easy job, but its only easy when you know how eh.

Basically i have a Paint mod called 'FreeqsPaintmods' which adds a whole bunch of ship paintmods to x4. It works a treat except there isnt a simple dark 'battleship' grey colour in there. So what im wanting to do is simply open up his mod, choose a paint job i dont like (Purple) and change the RGB values to a Dark grey, so when in game i select the 'Purple' it actually comes out my Dark grey.

Ive down loaded the GUI catalog tool.

So in Extensions / FreeqsPaintmods folder are the following files:

content.xml
ext_01.cat
ext_01.dat
readme.txt

Using the GUI Catalog tool I hit 'import catalogs..' and import the data from ext_01.cat (im guessing this is right so far).
Then scrolling through the data i see libaries/paintmods.xml, so i extract that into FreeqsPaintmods folder. FreeqsPaintmods folder now looks like this:

assets
libraries
content.xml
ext_01.cat
ext_01.dat
readme.txt

Opening up the 'libraries' folder reveals the 'Paintmods.xml' file. I open this via notepad and adjust the 'Purple' paintjob with different values. save file.

My problem starts here. I booted up the game to see if the changes were made, but it hadn't changed anything. Im guessing I need to put the 'library' folder back into ext_01.cat, but i cant figure out how to use the GUI Catalog tool to do that! ??


Any help here would be much appreciated, im sure its a simple task. Thanks

Caldari Navy
Posts: 68
Joined: Tue, 18. Jul 23, 18:43

Re: What tools do i need as of 6.2 ?

Post by Caldari Navy » Sun, 5. Nov 23, 06:27

I belive axeface have dark color skin i think wraith or revenant or something

https://www.nexusmods.com/x4foundations/mods/481

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Mon, 6. Nov 23, 09:52

I have Paintjobs galore, but no grey

Im really wanting to tinker myself anyway so i can create what ever and learn simple modding. Any idea of my question about files and the Cat GUI ??
Last edited by Poacher886 on Tue, 7. Nov 23, 11:04, edited 1 time in total.

Caldari Navy
Posts: 68
Joined: Tue, 18. Jul 23, 18:43

Re: What tools do i need as of 6.2 ?

Post by Caldari Navy » Mon, 6. Nov 23, 15:43

I always hated CBJ for moving people post and teling them how they lazy to search but i got feeling i start understand his daily frustration whith people not reading sticky post :mrgreen:


Anyway try here and pay attention to axeface posts

viewtopic.php?f=181&t=402382

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Tue, 7. Nov 23, 09:20

So reading through, and trying to understand tons of modding info just to find the answer to a single question, is alot harder and less efficient than someone directly answering your issue in laymen's terms.

I have tried googling my issue and dont understand alot of what is said because i dont understand coding. This is why its my more desirable for someone who knows, to simply answer your issue in an understandable way.

I will look through the link you gave anyway,

User avatar
Dj_FRedy
Posts: 230
Joined: Mon, 27. Jun 11, 05:58
x4

Re: What tools do i need as of 6.2 ?

Post by Dj_FRedy » Tue, 7. Nov 23, 16:21

Hi Poacher886,
It's understandable that you might feel lost if you've never modified or used the "X Catalog Tool," but you'll find that it's very easy.

The first thing before anything else is to know if the mod you are trying to modify is downloaded from the 'Steam Workshop', that is, if it is a mod to which you are subscribed, or on the contrary, it is a mod installed by yourself. If it is the first option, a Workshop mod, keep in mind that these mods are automatically downloaded in 'catlog' format, we will have to act differently, make a 'diff to the xml file' so as not to overwrite the original mod and thus allow future updates, if ever there is, and that they do not overwrite our own changes.

To create/save as catlog simply open the tool and drag the folders with the already modified files to the content box, you will find a [Save as catalog] button, drop down and choose the 'XR/X4 catlog' format. A dialog box will open requesting the destination.

Please tell us how you obtained the mod.
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Tue, 7. Nov 23, 22:38

Thanks alot for your help, this sounds like exactly what i need. I've done simple modding for Skyrim / Fallout 4, but the tools provided really do, do the hard work for you. This is my first attempt at trying anything with the X games and im not familiar with the X catalog tool. I figured start simple.

"To create/save as catlog simply open the tool and drag the folders with the already modified files to the content box, you will find a [Save as catalog] button, drop down and choose the 'XR/X4 catlog' format. A dialog box will open requesting the destination."

>Knowledge like this makes all the difference.

So the Paintjob mod i was going to 'adjust' was 'subscribed' via the Steam Workshop, however i have many mods via the Nexus aswell, and it would be no probs to remove it from the Steam Workshop and download it from the Nexus.

Is there a preference ?

Thanks again.

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Wed, 8. Nov 23, 11:49

Thanks Dj_FRedy

Ive now sussed this and have a great battleship grey Paintjob due to this info :

"To create/save as catlog simply open the tool and drag the folders with the already modified files to the content box, you will find a [Save as catalog] button, drop down and choose the 'XR/X4 catlog' format. A dialog box will open requesting the destination."

I could not find or see this info anywhere and was instrumental in solving my issue.

@Caldari Navy, This is testament to my point made. A simple answer from someone who knows can end weeks and possibly months of searching and reading or indeed just giving up.!!

@Dj, Im understanding that a 'diff' file is needed so that any updates to the original mod, dont interfere with my adjustment ? while im not expecting any further mod updates for this mod, i would be interested to know how this works and what is required.

Thanks again, your a hero!!

User avatar
Dj_FRedy
Posts: 230
Joined: Mon, 27. Jun 11, 05:58
x4

Re: What tools do i need as of 6.2 ?

Post by Dj_FRedy » Wed, 8. Nov 23, 15:33

I wrote a response to your penultimate message in a dirty txt that I was currently editing. Although it seems that you have already solved things on your side, I would not want to waste this information, which will surely be useful to you when continuing to modify the game. There is:

=========================
Ok, then it would be best to cancel the subscription if it is only for personal use, and since you will surely change more values, work more comfortably with the files in terms of code.

· launch the game and cancel the mod subscription in the 'Extensions' section, it will ask you to restart the game, but we will just close it for now.
· If the same mod is hosted on the Nexus platform, it is not necessary to download it again, simply changing the 'ID' in the 'content.xml' file to unlink the mod from the steam workshop will be enough, and thus prevent it from being downloaded again when Let's turn it back on. We can give it as id the name of the mod's containing folder, like this:

Code: Select all

<content id="z_name_mod_folder"
Now a little info about the use of catalogs in X4: Foundations, this info can be found in the 'Readme.txt' of the official 'X Catalog Tool':
At first, the game load catalogs of the form ##.cat (## = 01..99). Loading stops at the first missing file.
In each enabled extension, the game then tries to load the following files:

- ext_##.cat (starting with ext_01.cat)
- ext_v###.cat (### = current game version, e.g. ext_v130.cat)
- subst_##.cat (starting with subst_01.cat)
- subst_v###.cat (### = current game version, e.g. subst_v130.cat)

The files in the ext_* catalogs are interpreted as part of the extension.
This is the recommended way of altering the game, it allows for a high degree of compatibility between mods.

The files in the subst_* catalogs are interpreted as relative to the game root (adding/replacing base game files).
This should only be used if there is no other way to adjust the game assets.
and I add: the unpacked files, without catlog format, are also valid in one extension, that is, the game reads them perfectly, even mixing the two formats, but I do not recommend the latter for the sake of readability.

· Unpack the mod, if you haven't already, and make your changes. Stick with single files or repackage, but not both formats at the same time.
I'm sure this was the mistake you made and why your changes weren't taking effect. The system ultimately uses files in 'catlog' format, taking precedence over single files, although the '-prefersinglefiles' command can be added to the launcher to avoid this.
In case you are interested in some more launcher commands:
link to egosoft website: https://www.egosoft.com/support/faq/faq ... &version=0
· Relaunch the game and turn on the mod, if it isn't already, and with our custom id and changes made trust my writing to get everything working as expected.
=========================

...and now answering your question:
Yes, what we achieve with a 'diff' is to patch only what we want to change in an extension or main file without replacing said file. It is the way we add, remove or replace code and the correct way to modify the game, and in the case of the workshop extensions, which we have no control over when they will be updated and which are downloaded replacing files, although I believe that a copy is made if the files do not correspond to the originals, it will always be better to patch.

For example, to change the RGB values of a specific 'paint' in the 'paintmods.xml' file, ensuring future updates of the mod, since we do not edit any file for this:
We would create a new extension ...

Code: Select all

z_template_mod
│   content.xml
│
└───libraries
        paintmods.xml
... with a file called 'paintmods.xml' and with the following code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff> 
    <!-- <paint ware="fmetallicpurple" quality="1" hue="129" brightness="-0.9" saturation="-0.5" metal="1" smooth="0.2" dirt="0.5" extradirt="0.1" pattern="extensions\Z_FreeqsPaintjobs\assets\textures\patterns\fmatte" strength="0.5" scale="10" sharpness="100" invert="0" red="184" green="255" blue="255" alpha="255"/> -->
    <replace sel="/paintmods/paint[@ware='fmetallicpurple']/@red">184</replace>
    <replace sel="/paintmods/paint[@ware='fmetallicpurple']/@green">255</replace>
    <replace sel="/paintmods/paint[@ware='fmetallicpurple']/@blue">255</replace>
</diff>
More ifo... yes more for reading lool:
[TUTORIAL] XML Patch Guide: viewtopic.php?t=354310#p4248504
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

Poacher886
Posts: 552
Joined: Mon, 4. Jul 05, 20:22
x4

Re: What tools do i need as of 6.2 ?

Post by Poacher886 » Wed, 8. Nov 23, 22:58

Thanks so much for this DJ, it really is gold when starting modding X4.

Ive just started a new campaign with the Galaxy mod 'Reemergence' coupled with 'VRO' as my base. I have a dozen or so other ship / quality of life' and minor mods on top. Straight of the bat, while VRO is defo going to be a staple from here on in, i do see some pricing anomalies or preferences that i would prefer to balance so this will be my next minor modding attempt. Here clearly ,as this is a very updated mod , the 'diff' option you suggest makes perfect sense.

I have skimmed over your last, and will take a more in-depth look over the weekend before trying to adjust some values in VRO. Thank you very much for your effort and response, a big help.

Ultimately i would like to actually create a ship and insert it into the game, using i think the blender tool provided. But one step at a time i guess.

Post Reply

Return to “X4: Foundations - Scripts and Modding”